Trait rutabaga_gfx::RutabagaMappedRegion
source · 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§
sourcefn as_ptr(&self) -> *mut u8
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.
sourcefn as_rutabaga_mapping(&self) -> RutabagaMapping
fn as_rutabaga_mapping(&self) -> RutabagaMapping
Returns rutabaga mapping representation of the region