pub unsafe trait RutabagaMappedRegion: Send + Sync {
    // Required methods
    fn as_ptr(&self) -> *mut u8;
    fn size(&self) -> usize;
    fn as_rutabaga_mapping(&self) -> RutabagaMapping;
}
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.

source

fn as_rutabaga_mapping(&self) -> RutabagaMapping

Returns rutabaga mapping representation of the region

Implementors§