Struct kernel::power::NoOperations
source · [−]pub struct NoOperations<T: ForeignOwnable>(_);
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: ForeignOwnable + Send + Sync> Operations for NoOperations<T>
impl<T: ForeignOwnable + 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 ForeignOwnable>::Borrowed<'_>) -> Result
fn suspend(_data: <Self::Data as ForeignOwnable>::Borrowed<'_>) -> Result
Called before the system goes into a sleep state.
sourcefn resume(_data: <Self::Data as ForeignOwnable>::Borrowed<'_>) -> Result
fn resume(_data: <Self::Data as ForeignOwnable>::Borrowed<'_>) -> Result
Called after the system comes back from a sleep state.
impl<T: ForeignOwnable> Send for NoOperations<T>
impl<T: ForeignOwnable> 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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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