pub struct Device<T: Operations> { /* private fields */ }Expand description
A fwctl device.
#[repr(C)] with the fwctl_device at offset 0, matching the C fwctl_alloc_device() layout
convention. Contains a pointer to the Registration’s data, set at registration time and
cleared on unregistration.
§Invariants
devis embedded at offset 0 and is initialised by fwctl.- The fwctl refcount owns the allocation lifetime.
registration_datais eitherNonNull::dangling()(before registration / after unregistration) or points to valid data owned by theRegistration.
Implementations§
Trait Implementations§
Source§impl<T: Operations> AlwaysRefCounted for Device<T>
impl<T: Operations> AlwaysRefCounted for Device<T>
impl<T: Operations> Send for Device<T>
impl<T: Operations> Sync for Device<T>
Auto Trait Implementations§
impl<T> !Freeze for Device<T>
impl<T> !RefUnwindSafe for Device<T>
impl<T> !Unpin for Device<T>
impl<T> !UnsafeUnpin for Device<T>
impl<T> UnwindSafe for Device<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<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.