pub struct Event { /* private fields */ }Expand description
A kernel event object that threads can signal and wait on.
Implementations§
Source§impl Event
impl Event
Sourcepub fn new(signaled: bool, clear_mode: EventClearMode) -> Self
pub fn new(signaled: bool, clear_mode: EventClearMode) -> Self
Creates a new event. If signaled is true the event starts in the signaled state.
Sourcepub fn try_wait(&self) -> bool
pub fn try_wait(&self) -> bool
Returns true if the event is currently signaled without blocking.
Sourcepub fn wait_timeout(&self, timeout: Duration) -> bool
pub fn wait_timeout(&self, timeout: Duration) -> bool
Blocks until the event is signaled or timeout elapses. Returns true if signaled.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Event
impl !RefUnwindSafe for Event
impl !Sync for Event
impl Send for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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