pub fn write<T>(&mut self, offset: usize, value: T) {
        assert!((offset + (std::mem::size_of::<T>() - 1)) < self.data.len());
        unsafe {
            *(((self.data.as_mut_ptr() as usize) + offset) as *mut T) = value;
        }
        self.update_checksum();
    }
/// Write a value at the given offset
Write a value at the given offset
Write a value at the given offset
pub fn write<T>(&mut self, offset: usize, value: T) {
        assert!((offset + (std::mem::size_of::<T>() - 1)) < self.data.len());
        unsafe {
            *(((self.data.as_mut_ptr() as usize) + offset) as *mut T) = value;
        }
        self.update_checksum();
    }
pub fn write < T > ( & mut self , offset : usize , value : T ) { assert ! ( ( offset ( std mem size_of T ( ) 1 ) ) self data len ( ) ) ; unsafe { * ( ( ( self . data . as_mut_ptr ( ) as usize ) + offset ) as * mut T ) = value ; } self . update_checksum ( ) ; }
Write a value at the given offset
Write a value at the given offset
&mut self
offset
usize
value
T
&mut self
offset
usize
value
T