pub struct GenericManualResetEvent<MutexType: RawMutex> { /* private fields */ }
Expand description
A synchronization primitive which can be either in the set or reset state.
Tasks can wait for the event to get set by obtaining a Future via wait
.
This Future will get fulfilled when the event has been set.
Implementations§
Source§impl<MutexType: RawMutex> GenericManualResetEvent<MutexType>
impl<MutexType: RawMutex> GenericManualResetEvent<MutexType>
Sourcepub fn new(is_set: bool) -> GenericManualResetEvent<MutexType>
pub fn new(is_set: bool) -> GenericManualResetEvent<MutexType>
Creates a new ManualResetEvent in the given state
Sourcepub fn wait(&self) -> GenericWaitForEventFuture<'_, MutexType> ⓘ
pub fn wait(&self) -> GenericWaitForEventFuture<'_, MutexType> ⓘ
Returns a future that gets fulfilled when the event is set.
Trait Implementations§
Source§impl<MutexType: RawMutex> Debug for GenericManualResetEvent<MutexType>
impl<MutexType: RawMutex> Debug for GenericManualResetEvent<MutexType>
impl<MutexType: RawMutex + Send> Send for GenericManualResetEvent<MutexType>
impl<MutexType: RawMutex + Sync> Sync for GenericManualResetEvent<MutexType>
Auto Trait Implementations§
impl<MutexType> !Freeze for GenericManualResetEvent<MutexType>
impl<MutexType> !RefUnwindSafe for GenericManualResetEvent<MutexType>
impl<MutexType> Unpin for GenericManualResetEvent<MutexType>where
MutexType: Unpin,
impl<MutexType> UnwindSafe for GenericManualResetEvent<MutexType>where
MutexType: 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