pub unsafe trait MappedRegion: Send + Sync {
    // Required methods
    fn as_ptr(&self) -> *mut u8;
    fn size(&self) -> usize;
}
Expand description

Safety

Caller must ensure that MappedRegion’s lifetime contains the lifetime of pointer returned.

Required Methods§

source

fn as_ptr(&self) -> *mut u8

Returns a pointer to the beginning of the memory region. Should only be used for passing this region to ioctls for setting guest memory.

source

fn size(&self) -> usize

Returns the size of the memory region in bytes.

Implementors§