pub struct MiscDeviceRegistration<T> { /* private fields */ }Expand description
A registration of a miscdevice.
§Invariants
innercontains astruct miscdevicethat is registered usingmisc_register().- This registration remains valid for the entire lifetime of the
MiscDeviceRegistrationinstance. - Deregistration occurs exactly once in
Dropviamisc_deregister(). innerwraps a valid, pinnedmiscdevicecreated usingMiscDeviceOptions::into_raw.
Implementations§
Source§impl<T> MiscDeviceRegistration<T>
impl<T> MiscDeviceRegistration<T>
Sourcepub fn project<'__this>(
self: Pin<&'__this mut Self>,
) -> __Projection<'__this, T>
pub fn project<'__this>( self: Pin<&'__this mut Self>, ) -> __Projection<'__this, T>
Pin-projects all fields of Self.
These fields are structurally pinned:
inner
These fields are not structurally pinned:
_t
Sourcepub fn with_project<'__this, R>(
self: Pin<&'__this mut Self>,
f: impl FnOnce(__ProjectionLt<'__this, T>) -> R,
) -> R
pub fn with_project<'__this, R>( self: Pin<&'__this mut Self>, f: impl FnOnce(__ProjectionLt<'__this, T>) -> R, ) -> R
Pin-projects all fields of Self with proper lifetime.
These fields are structurally pinned:
inner
These fields are not structurally pinned:
_t
Sourcepub fn with_project_ref<'__this, R>(
self: Pin<&'__this Self>,
f: impl FnOnce(__ProjectionRef<'__this, T>) -> R,
) -> R
pub fn with_project_ref<'__this, R>( self: Pin<&'__this Self>, f: impl FnOnce(__ProjectionRef<'__this, T>) -> R, ) -> R
Pin-projects all fields of Self from a shared reference with proper lifetime.
These fields are structurally pinned:
inner
These fields are not structurally pinned:
_t
Source§impl<T: MiscDevice> MiscDeviceRegistration<T>
impl<T: MiscDevice> MiscDeviceRegistration<T>
Trait Implementations§
Source§impl<T> Drop for MiscDeviceRegistration<T>
impl<T> Drop for MiscDeviceRegistration<T>
Source§impl<T> HasPinData for MiscDeviceRegistration<T>
impl<T> HasPinData for MiscDeviceRegistration<T>
Source§impl<T> PinnedDrop for MiscDeviceRegistration<T>
impl<T> PinnedDrop for MiscDeviceRegistration<T>
impl<T> Send for MiscDeviceRegistration<T>
impl<T> Sync for MiscDeviceRegistration<T>
Auto Trait Implementations§
impl<T> !Freeze for MiscDeviceRegistration<T>
impl<T> !RefUnwindSafe for MiscDeviceRegistration<T>
impl<T> !UnsafeUnpin for MiscDeviceRegistration<T>
impl<T> UnwindSafe for MiscDeviceRegistration<T>where
PhantomData<T>: UnwindSafe,
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<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
Convert
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
Convert
self into a T. This operation is guaranteed to be lossless.