Trait BaseObject

Source
pub trait BaseObject{
    // Provided methods
    fn size(&self) -> usize { ... }
    fn create_handle(
        &self,
        file: &File<<<Self as IntoGEMObject>::Driver as Driver>::File>,
    ) -> Result<u32> { ... }
    fn lookup_handle(
        file: &File<<<Self as IntoGEMObject>::Driver as Driver>::File>,
        handle: u32,
    ) -> Result<ARef<Self>> { ... }
    fn create_mmap_offset(&self) -> Result<u64> { ... }
}
Expand description

Base operations shared by all GEM object classes

Provided Methods§

Source

fn size(&self) -> usize

Returns the size of the object in bytes.

Source

fn create_handle( &self, file: &File<<<Self as IntoGEMObject>::Driver as Driver>::File>, ) -> Result<u32>

Creates a new handle for the object associated with a given File (or returns an existing one).

Source

fn lookup_handle( file: &File<<<Self as IntoGEMObject>::Driver as Driver>::File>, handle: u32, ) -> Result<ARef<Self>>

Looks up an object by its handle for a given File.

Source

fn create_mmap_offset(&self) -> Result<u64>

Creates an mmap offset to map the object from userspace.

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.

Implementors§