pub fn read_bytes(&self, pos: isize, size: usize) -> Result<Vec<u8>, RTTError> {
        let mut buf = Vec::<u8>::new();
        buf.resize(size, 0);
        let len = rttbase_device_read(self.handle.0, pos, buf.as_mut_ptr() as *mut CVoid, size);
        if len > size {
            Err(RTTError::DeviceReadFailed)
        } else {
            unsafe {
                buf.set_len(len);
            }
            Ok(buf)
        }
    }
/// Length information is included in Vec
Length information is included in Vec
Length information is included in Vec
pub fn read_bytes(&self, pos: isize, size: usize) -> Result<Vec<u8>, RTTError> {
        let mut buf = Vec::<u8>::new();
        buf.resize(size, 0);
        let len = rttbase_device_read(self.handle.0, pos, buf.as_mut_ptr() as *mut CVoid, size);
        if len > size {
            Err(RTTError::DeviceReadFailed)
        } else {
            unsafe {
                buf.set_len(len);
            }
            Ok(buf)
        }
    }
pub fn read_bytes ( & self , pos : isize , size : usize ) -> Result < Vec < u8 > , RTTError > { let mut buf = Vec :: < u8 > :: new ( ) ; buf . resize ( size , 0 ) ; let len = rttbase_device_read ( self . handle . 0 , pos , buf . as_mut_ptr ( ) as * mut CVoid , size ) ; if len > size { Err ( RTTError :: DeviceReadFailed ) } else { unsafe { buf . set_len ( len ) ; } Ok ( buf ) } }
Length information is included in Vec
Length information is included in Vec
&self
pos
isize
size
usize
&self
pos
isize
size
usize