pub struct SyncFlag { /* private fields */ }Available on crate feature
std only.Expand description
A Synchronous Signal Flag that can be asserted or cleared.
Implementations§
Source§impl SyncFlag
impl SyncFlag
Sourcepub fn clear_flag(&self)
pub fn clear_flag(&self)
Clears the signal flag and notifies any waiters.
Sourcepub fn await_flag_notified(&self) -> bool
pub fn await_flag_notified(&self) -> bool
Waits until the flag is notified and returns the current value of the signal.
Sourcepub fn await_flag_set(&self)
pub fn await_flag_set(&self)
If the flag is set, immediately returns. Otherwise waits until the flag is set and then returns.
Sourcepub fn await_flag_unset(&self)
pub fn await_flag_unset(&self)
If the flag is cleared, immediately returns. Otherwise waits until the flag is cleared and then returns.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SyncFlag
impl RefUnwindSafe for SyncFlag
impl Send for SyncFlag
impl Sync for SyncFlag
impl Unpin for SyncFlag
impl UnwindSafe for SyncFlag
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