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 fn project<'__this>(
self: Pin<&'__this mut Self>,
) -> __Projection<'__this, 'a, T>
pub fn project<'__this>( self: Pin<&'__this mut Self>, ) -> __Projection<'__this, 'a, T>
Pin-projects all fields of Self.
These fields are structurally pinned:
data_pin
These fields are not structurally pinned:
drm
Sourcepub fn with_project<'__this, R>(
self: Pin<&'__this mut Self>,
f: impl FnOnce(__ProjectionLt<'__this, 'a, T>) -> R,
) -> R
pub fn with_project<'__this, R>( self: Pin<&'__this mut Self>, f: impl FnOnce(__ProjectionLt<'__this, 'a, T>) -> R, ) -> R
Pin-projects all fields of Self with proper lifetime.
These fields are structurally pinned:
data_pin
These fields are not structurally pinned:
drm
Sourcepub fn with_project_ref<'__this, R>(
self: Pin<&'__this Self>,
f: impl FnOnce(__ProjectionRef<'__this, 'a, T>) -> R,
) -> R
pub fn with_project_ref<'__this, R>( self: Pin<&'__this Self>, f: impl FnOnce(__ProjectionRef<'__this, 'a, T>) -> R, ) -> R
Pin-projects all fields of Self from a shared reference with proper lifetime.
These fields are structurally pinned:
data_pin
These fields are not structurally pinned:
drm
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>,
data: impl PinInit<T::RegistrationData<'a>, E>,
) -> impl PinInit<Self, Error>
pub unsafe fn new<E>( dev: &'a Device<Bound>, drm: UnregisteredDevice<T>, data: impl PinInit<T::RegistrationData<'a>, E>, ) -> impl PinInit<Self, Error>
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<'a, T: Driver> Drop for Registration<'a, T>
impl<'a, T: Driver> Drop for Registration<'a, T>
Source§impl<'a, T: Driver> HasPinData for Registration<'a, T>
impl<'a, T: Driver> HasPinData for Registration<'a, T>
Source§impl<T: Driver> PinnedDrop for Registration<'_, T>
impl<T: Driver> PinnedDrop 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> !UnsafeUnpin for Registration<'a, T>
impl<'a, T> !UnwindSafe for Registration<'a, T>
impl<'a, T> Freeze 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<S, T> IntoSafeCast<T> for Swhere
T: FromSafeCast<S>,
impl<S, T> IntoSafeCast<T> for Swhere
T: FromSafeCast<S>,
Source§fn into_safe_cast(self) -> T
fn into_safe_cast(self) -> T
self into a T. This operation is guaranteed to be lossless.Source§impl<S, T> IntoSafeCastArch<T> for Swhere
T: FromSafeCastArch<S>,
impl<S, T> IntoSafeCastArch<T> for Swhere
T: FromSafeCastArch<S>,
Source§fn into_safe_cast_arch(self) -> T
fn into_safe_cast_arch(self) -> T
self into a T. This operation is guaranteed to be lossless.