pub struct Object<T: DriverObject + Send + Sync, Ctx: DeviceContext = Registered> { /* private fields */ }Expand description
A base GEM object.
§Invariants
self.objis a valid instance of astruct drm_gem_object.- Any type invariants of
Ctxapply to the parent DRM device for this GEM object.
Implementations§
Source§impl<T: DriverObject + Send + Sync, Ctx: DeviceContext> Object<T, Ctx>
impl<T: DriverObject + Send + Sync, Ctx: DeviceContext> Object<T, Ctx>
Trait Implementations§
Source§impl<T: DriverObject, Ctx: DeviceContext> AllocImpl for Object<T, Ctx>
impl<T: DriverObject, Ctx: DeviceContext> AllocImpl for Object<T, Ctx>
Source§impl<T, C> AlwaysRefCounted for Object<T, C>
impl<T, C> AlwaysRefCounted for Object<T, C>
Source§impl<T: DriverObject, Ctx: DeviceContext> Deref for Object<T, Ctx>
impl<T: DriverObject, Ctx: DeviceContext> Deref for Object<T, Ctx>
Source§impl<T: DriverObject + Send + Sync, Ctx: DeviceContext> HasPinData for Object<T, Ctx>
impl<T: DriverObject + Send + Sync, Ctx: DeviceContext> HasPinData for Object<T, Ctx>
Source§impl<T: DriverObject, Ctx: DeviceContext> IntoGEMObject for Object<T, Ctx>
impl<T: DriverObject, Ctx: DeviceContext> IntoGEMObject for Object<T, Ctx>
Auto Trait Implementations§
impl<T, Ctx = Registered> !Freeze for Object<T, Ctx>
impl<T, Ctx = Registered> !RefUnwindSafe for Object<T, Ctx>
impl<T, Ctx = Registered> !Send for Object<T, Ctx>
impl<T, Ctx = Registered> !Sync for Object<T, Ctx>
impl<T, Ctx = Registered> !UnsafeUnpin for Object<T, Ctx>
impl<T, Ctx> UnwindSafe for Object<T, Ctx>where
T: UnwindSafe,
Ctx: UnwindSafe,
Blanket Implementations§
Source§impl<T> BaseObject for Twhere
T: IntoGEMObject,
impl<T> BaseObject for Twhere
T: IntoGEMObject,
Source§fn create_handle<D, F>(&self, file: &File<F>) -> Result<u32>where
Self: AllocImpl<Driver = D>,
D: Driver<Object<Registered> = Self, File = F>,
F: DriverFile<Driver = D>,
fn create_handle<D, F>(&self, file: &File<F>) -> Result<u32>where
Self: AllocImpl<Driver = D>,
D: Driver<Object<Registered> = Self, File = F>,
F: DriverFile<Driver = D>,
Creates a new handle for the object associated with a given
File
(or returns an existing one).Source§fn lookup_handle<D, F>(file: &File<F>, handle: u32) -> Result<ARef<Self>>where
Self: AllocImpl<Driver = D>,
D: Driver<Object<Registered> = Self, File = F>,
F: DriverFile<Driver = D>,
fn lookup_handle<D, F>(file: &File<F>, handle: u32) -> Result<ARef<Self>>where
Self: AllocImpl<Driver = D>,
D: Driver<Object<Registered> = Self, File = F>,
F: DriverFile<Driver = D>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
Initializes
slot. Read more