pub struct Registration<'a, T: Driver> { /* private fields */ }Expand description
The registration type of a drm::Device.
Once the Registration structure is dropped, the device is unregistered.
Implementations§
Source§impl<'a, T: Driver> Registration<'a, T>
impl<'a, T: Driver> Registration<'a, T>
Sourcepub unsafe fn new<E>(
dev: &'a Device<Bound>,
drm: UnregisteredDevice<T>,
reg_data: impl PinInit<T::RegistrationData<'a>, E>,
flags: usize,
) -> Result<Self>
pub unsafe fn new<E>( dev: &'a Device<Bound>, drm: UnregisteredDevice<T>, reg_data: impl PinInit<T::RegistrationData<'a>, E>, flags: usize, ) -> Result<Self>
Register a new UnregisteredDevice with userspace.
§Safety
The caller must not mem::forget() the returned Registration or otherwise prevent its
Drop implementation from running, since the registration data may contain borrowed
references that become invalid after 'a ends.
Trait Implementations§
Source§impl<T: Driver> Drop for Registration<'_, T>
impl<T: Driver> Drop for Registration<'_, T>
impl<T: Driver> Send for Registration<'_, T>
impl<T: Driver> Sync for Registration<'_, T>
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for Registration<'a, T>
impl<'a, T> !UnwindSafe for Registration<'a, T>
impl<'a, T> Freeze for Registration<'a, T>
impl<'a, T> Unpin for Registration<'a, T>
impl<'a, T> UnsafeUnpin for Registration<'a, T>
Blanket Implementations§
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> KnownSize for T
impl<T> KnownSize for T
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