#[repr(C)]pub struct Object<T: DriverObject + Send + Sync> { /* private fields */ }
Expand description
A base GEM object.
Invariants
self.obj
is a valid instance of astruct drm_gem_object
.self.dev
is always a valid pointer to astruct drm_device
.
Implementations§
Trait Implementations§
Source§impl<T: DriverObject> AllocImpl for Object<T>
impl<T: DriverObject> AllocImpl for Object<T>
Source§impl<T: DriverObject> AlwaysRefCounted for Object<T>
impl<T: DriverObject> AlwaysRefCounted for Object<T>
Source§impl<T: DriverObject> Deref for Object<T>
impl<T: DriverObject> Deref for Object<T>
Source§impl<T: DriverObject> IntoGEMObject for Object<T>
impl<T: DriverObject> IntoGEMObject for Object<T>
Source§type Driver = <T as DriverObject>::Driver
type Driver = <T as DriverObject>::Driver
Owning driver for this type
Source§fn into_gem_obj(&self) -> &Opaque<drm_gem_object>
fn into_gem_obj(&self) -> &Opaque<drm_gem_object>
Returns a reference to the raw
drm_gem_object
structure, which must be valid as long as
this owning object is valid.Source§fn from_gem_obj(obj: *mut drm_gem_object) -> *mut Self
fn from_gem_obj(obj: *mut drm_gem_object) -> *mut Self
Converts a pointer to a
struct drm_gem_object
into a pointer to Self
.Auto Trait Implementations§
impl<T> !Freeze for Object<T>
impl<T> !RefUnwindSafe for Object<T>
impl<T> !Send for Object<T>
impl<T> !Sync for Object<T>
impl<T> !UnwindSafe for Object<T>
Blanket Implementations§
Source§impl<T> BaseObject for Twhere
T: AlwaysRefCounted + IntoGEMObject,
impl<T> BaseObject for Twhere
T: AlwaysRefCounted + IntoGEMObject,
Source§fn create_handle(
&self,
file: &File<<<Self as IntoGEMObject>::Driver as Driver>::File>,
) -> Result<u32>
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>>
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>
fn create_mmap_offset(&self) -> Result<u64>
Creates an mmap offset to map the object from userspace.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more