pub fn record_remote_fallible(
        &mut self,
        addr: RemotePtr<Void>,
        num_bytes: usize,
    ) -> Result<usize, ()> {
        if self.record_remote_by_local_map(addr, num_bytes) {
            return Ok(num_bytes);
        }

        let mut buf = Vec::new();
        let mut nread = 0;
        if !addr.is_null() {
            buf.resize(num_bytes, 0u8);
            nread = self.read_bytes_fallible(addr, &mut buf)?;
            buf.truncate(nread);
        }
        self.trace_writer_mut().write_raw(self.rec_tid, &buf, addr);

        Ok(nread)
    }
/// Record as much as we can of the bytes in this range. Will record only
/// contiguous mapped data starting at `addr`.
Record as much as we can of the bytes in this range. Will record only
contiguous mapped data starting at `addr`.
Record as much as we can of the bytes in this range . Will record only contiguous mapped data starting at ` addr ` .
pub fn record_remote_fallible(
        &mut self,
        addr: RemotePtr<Void>,
        num_bytes: usize,
    ) -> Result<usize, ()> {
        if self.record_remote_by_local_map(addr, num_bytes) {
            return Ok(num_bytes);
        }
        let mut buf = Vec::new();
        let mut nread = 0;
        if !addr.is_null() {
            buf.resize(num_bytes, 0u8);
            nread = self.read_bytes_fallible(addr, &mut buf)?;
            buf.truncate(nread);
        }
        self.trace_writer_mut().write_raw(self.rec_tid, &buf, addr);
        Ok(nread)
    }
pub fn record_remote_fallible ( & mut self , addr : RemotePtr < Void > , num_bytes : usize , ) -> Result < usize , ( ) > { if self . record_remote_by_local_map ( addr , num_bytes ) { return Ok ( num_bytes ) ; } let mut buf = Vec :: new ( ) ; let mut nread = 0 ; if ! addr . is_null ( ) { buf . resize ( num_bytes , 0u8 ) ; nread = self . read_bytes_fallible ( addr , & mut buf ) ? ; buf . truncate ( nread ) ; } self . trace_writer_mut ( ) . write_raw ( self . rec_tid , & buf , addr ) ; Ok ( nread ) }
Record as much as we can of the bytes in this range.
Record as much as we can of the bytes in this range .
&mut self
addr
RemotePtr<Void>
num_bytes
usize