pub struct WakeupReason(/* private fields */);Expand description
The source(s) that caused the most recent wakeup from sleep.
Returned by wakeup_cause. This is a thin wrapper around the set of WakeupSources that
were reported by the hardware. The set is empty if the chip was not woken from sleep.
Note that the available sources depend on the target chip.
Implementations§
Source§impl WakeupReason
impl WakeupReason
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if the chip was not woken from sleep by any source.
Sourcepub fn contains(&self, source: WakeupSource) -> bool
pub fn contains(&self, source: WakeupSource) -> bool
Returns true if the given source caused the most recent wakeup.
Sourcepub fn iter(&self) -> impl Iterator<Item = WakeupSource>
pub fn iter(&self) -> impl Iterator<Item = WakeupSource>
Returns an iterator over the sources that caused the most recent wakeup.
Trait Implementations§
Source§impl Clone for WakeupReason
Available on crate feature unstable only.
impl Clone for WakeupReason
Available on crate feature
unstable only.Source§fn clone(&self) -> WakeupReason
fn clone(&self) -> WakeupReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WakeupReason
Available on crate feature unstable only.
impl Debug for WakeupReason
Available on crate feature
unstable only.Source§impl Default for WakeupReason
Available on crate feature unstable only.
impl Default for WakeupReason
Available on crate feature
unstable only.Source§fn default() -> WakeupReason
fn default() -> WakeupReason
Returns the “default value” for a type. Read more
Source§impl PartialEq for WakeupReason
Available on crate feature unstable only.
impl PartialEq for WakeupReason
Available on crate feature
unstable only.impl Copy for WakeupReason
Available on crate feature
unstable only.impl Eq for WakeupReason
Available on crate feature
unstable only.impl StructuralPartialEq for WakeupReason
Available on crate feature
unstable only.Auto Trait Implementations§
impl Freeze for WakeupReason
impl RefUnwindSafe for WakeupReason
impl Send for WakeupReason
impl Sync for WakeupReason
impl Unpin for WakeupReason
impl UnsafeUnpin for WakeupReason
impl UnwindSafe for WakeupReason
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)