Struct atomicmonitor::AtomMonitor
source · pub struct AtomMonitor<T: Copy> { /* private fields */ }
Implementations
sourceimpl<T: Copy> AtomMonitor<T>
impl<T: Copy> AtomMonitor<T>
pub fn new(value: T) -> Self
pub fn mutate<O>(&self, mutator: impl FnMut(&Atomic<T>) -> O) -> O
pub fn get(&self) -> T
pub fn set(&self, value: T)
pub fn wait_until(&self, condition: impl FnMut(T) -> bool) -> T
pub fn wait_until_timeout(
&self,
condition: impl FnMut(T) -> bool,
timeout: Duration
) -> Option<T>
pub fn notify_all(&self)
Auto Trait Implementations
impl<T> !RefUnwindSafe for AtomMonitor<T>
impl<T> Send for AtomMonitor<T>where
T: Send,
impl<T> Sync for AtomMonitor<T>where
T: Send,
impl<T> Unpin for AtomMonitor<T>where
T: Unpin,
impl<T> UnwindSafe for AtomMonitor<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