pub struct Wake<P: PlatformThreading> { /* private fields */ }Expand description
RAII wrapper around the platform’s wake primitive.
Implementations§
Source§impl<P: PlatformThreading> Wake<P>
impl<P: PlatformThreading> Wake<P>
Sourcepub fn new() -> Result<Self, WakeInitError>
pub fn new() -> Result<Self, WakeInitError>
Construct a new wake primitive in the inline buffer.
Sourcepub fn wait_ms(&self, timeout_ms: u32) -> WakeReason
pub fn wait_ms(&self, timeout_ms: u32) -> WakeReason
Block until signaled or timeout_ms elapses.
Sourcepub fn signal_from_isr(&self) -> bool
pub fn signal_from_isr(&self) -> bool
ISR-safe variant. Returns false when the backend has no
ISR path and the caller should fall back to
Self::signal.
Trait Implementations§
Source§impl<P: PlatformThreading> Drop for Wake<P>
impl<P: PlatformThreading> Drop for Wake<P>
impl<P: PlatformThreading> Sync for Wake<P>
Auto Trait Implementations§
impl<P> !Freeze for Wake<P>
impl<P> !RefUnwindSafe for Wake<P>
impl<P> Send for Wake<P>where
P: Send,
impl<P> Unpin for Wake<P>where
P: Unpin,
impl<P> UnsafeUnpin for Wake<P>
impl<P> UnwindSafe for Wake<P>where
P: UnwindSafe,
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