pub struct Core<'a>(/* private fields */);Expand description
The Core context is the context of a bus specific device when it appears as argument of
any bus specific callback, such as probe().
The core context indicates that the Device<Core> reference’s scope is limited to the bus
callback it appears in. It is intended to be used for synchronization purposes. Bus device
implementations can implement methods for Device<Core>, such that they can only be called
from bus callbacks.
The lifetime 'a is for “lifetime branding” purpose. Callbacks need to polymorphic over this
lifetime so the &'bound Device<Core<'_>> provided to them cannot outlive the scope of the
function. For this reason, it needs to be invariant.
Trait Implementations§
impl<'a> DeviceContext for Core<'a>
Auto Trait Implementations§
impl<'a> Freeze for Core<'a>
impl<'a> RefUnwindSafe for Core<'a>
impl<'a> Send for Core<'a>
impl<'a> Sync for Core<'a>
impl<'a> Unpin for Core<'a>
impl<'a> UnsafeUnpin for Core<'a>
impl<'a> UnwindSafe for Core<'a>
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.