pub struct EmbeddedLocalAutoResetEventRef { /* private fields */ }Expand description
Handle to an embedded LocalAutoResetEvent.
Created via LocalAutoResetEvent::embedded(). The caller is
responsible for ensuring the EmbeddedLocalAutoResetEvent outlives
all handles and wait futures.
The API is identical to LocalAutoResetEvent.
Implementations§
Source§impl EmbeddedLocalAutoResetEventRef
impl EmbeddedLocalAutoResetEventRef
Sourcepub fn set(&self)
pub fn set(&self)
Signals the event, releasing at most one waiter.
If one or more waiters are registered, a single waiter is released and the event remains unset. If no one is waiting, the event transitions to the set state.
Sourcepub fn try_wait(&self) -> bool
pub fn try_wait(&self) -> bool
Attempts to consume the signal without blocking.
Returns true if the event was set, transitioning it back to the
unset state. Returns false if the event was not set.
Sourcepub fn wait(&self) -> EmbeddedLocalAutoResetWaitFuture ⓘ
pub fn wait(&self) -> EmbeddedLocalAutoResetWaitFuture ⓘ
Returns a future that completes when the event is signaled.
Trait Implementations§
Source§impl Clone for EmbeddedLocalAutoResetEventRef
impl Clone for EmbeddedLocalAutoResetEventRef
Source§fn clone(&self) -> EmbeddedLocalAutoResetEventRef
fn clone(&self) -> EmbeddedLocalAutoResetEventRef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EmbeddedLocalAutoResetEventRef
impl RefUnwindSafe for EmbeddedLocalAutoResetEventRef
impl UnwindSafe for EmbeddedLocalAutoResetEventRef
Auto Trait Implementations§
impl Freeze for EmbeddedLocalAutoResetEventRef
impl !Send for EmbeddedLocalAutoResetEventRef
impl !Sync for EmbeddedLocalAutoResetEventRef
impl Unpin for EmbeddedLocalAutoResetEventRef
impl UnsafeUnpin for EmbeddedLocalAutoResetEventRef
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