pub fn write_obj<T>(&self, pos: isize, obj: &T) -> Result<(), RTTError> {
        let size = mem::size_of::<T>();

        return if size
            != rttbase_device_write(
                self.handle.raw(),
                pos,
                obj as *const T as *const CVoid,
                size,
            ) {
            Err(RTTError::DeviceWriteFailed)
        } else {
            Ok(())
        };
    }
/// You can send an object by this function
///
/// # Note:
/// this function will not deal with big/little endian problem
You can send an object by this function
You can send an object by this function
pub fn write_obj<T>(&self, pos: isize, obj: &T) -> Result<(), RTTError> {
        let size = mem::size_of::<T>();
        return if size
            != rttbase_device_write(
                self.handle.raw(),
                pos,
                obj as *const T as *const CVoid,
                size,
            ) {
            Err(RTTError::DeviceWriteFailed)
        } else {
            Ok(())
        };
    }
pub fn write_obj < T > ( & self , pos : isize , obj : & T ) -> Result < ( ) , RTTError > { let size = mem :: size_of :: < T > ( ) ; return if size != rttbase_device_write ( self . handle . raw ( ) , pos , obj as * const T as * const CVoid , size , ) { Err ( RTTError :: DeviceWriteFailed ) } else { Ok ( ( ) ) } ; }
You can send an object by this function
You can send an object by this function
&self
pos
isize
obj
&T
&self
pos
isize
obj
&T
note:
this function will not deal with big/little endian problem
this function will not deal with big / little endian problem