pub trait BufferHandle: Sized {
// Required methods
fn try_clone(&self) -> Result<Self, Error>;
fn get_mapping(
&self,
offset: usize,
size: usize,
) -> Result<MemoryMappingArena, MmapError>;
}Expand description
Trait for types that can serve as video buffer backing memory.
Required Methods§
Sourcefn try_clone(&self) -> Result<Self, Error>
fn try_clone(&self) -> Result<Self, Error>
Try to clone this handle. This must only create a new reference to the same backing memory and not duplicate the buffer itself.
Sourcefn get_mapping(
&self,
offset: usize,
size: usize,
) -> Result<MemoryMappingArena, MmapError>
fn get_mapping( &self, offset: usize, size: usize, ) -> Result<MemoryMappingArena, MmapError>
Returns a linear mapping of [offset..offset+size] of the memory backing this buffer.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.