Struct kernel::power::NoOperations
source · [−]pub struct NoOperations<T: PointerWrapper>(_);
Expand description
Implements the Operations
trait as no-ops.
This is useful when one doesn’t want to provide the implementation of any power-manager related operation.
Trait Implementations
sourceimpl<T: PointerWrapper + Send + Sync> Operations for NoOperations<T>
impl<T: PointerWrapper + Send + Sync> Operations for NoOperations<T>
type Data = T
type Data = T
The type of the context data stored by the driver on each device.
sourcefn suspend(_data: <Self::Data as PointerWrapper>::Borrowed<'_>) -> Result
fn suspend(_data: <Self::Data as PointerWrapper>::Borrowed<'_>) -> Result
Called before the system goes into a sleep state.
sourcefn resume(_data: <Self::Data as PointerWrapper>::Borrowed<'_>) -> Result
fn resume(_data: <Self::Data as PointerWrapper>::Borrowed<'_>) -> Result
Called after the system comes back from a sleep state.
impl<T: PointerWrapper> Send for NoOperations<T>
impl<T: PointerWrapper> Sync for NoOperations<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for NoOperations<T> where
T: RefUnwindSafe,
impl<T> Unpin for NoOperations<T> where
T: Unpin,
impl<T> UnwindSafe for NoOperations<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more