pub fn write(&mut self, ptr: *const u8, len: usize, offset: usize) {
        unsafe {
            // Get current memory position.
            let dst = self.map().offset(offset as _) as *mut u8;

            // Copy data
            ptr::copy_nonoverlapping(ptr, dst, len);
        }

        self.unmap();
    }
/// Write data to the specific offset of the buffer.
Write data to the specific offset of the buffer.
Write data to the specific offset of the buffer .
pub fn write(&mut self, ptr: *const u8, len: usize, offset: usize) {
        unsafe {
            // Get current memory position.
            let dst = self.map().offset(offset as _) as *mut u8;
            // Copy data
            ptr::copy_nonoverlapping(ptr, dst, len);
        }
        self.unmap();
    }
pub fn write ( & mut self , ptr : * const u8 , len : usize , offset : usize ) { unsafe { // Get current memory position. let dst = self . map ( ) . offset ( offset as _ ) as * mut u8 ; // Copy data ptr :: copy_nonoverlapping ( ptr , dst , len ) ; } self . unmap ( ) ; }
Write data to the specific offset of the buffer.
Write data to the specific offset of the buffer .
&mut self
ptr
*const u8
len
usize
offset
usize
&mut self
ptr
*const u8
len
usize
offset
usize