pub struct KEvent { /* private fields */ }Expand description
A wrapper around Zircon’s C++ Event.
Implementations§
Source§impl KEvent
impl KEvent
Sourcepub fn init(initial: bool) -> impl PinInit<Self, Infallible>
pub fn init(initial: bool) -> impl PinInit<Self, Infallible>
Creates a new KEvent with the given initial signaled state.
Sourcepub fn signal_etc(&self, status: Status)
pub fn signal_etc(&self, status: Status)
Signals the event with a specific status.
Sourcepub fn wait(&self) -> Result<(), Status>
pub fn wait(&self) -> Result<(), Status>
Waits for the event to be signaled.
Returns Ok(()) if signaled, or an error status.
Sourcepub fn wait_deadline(&self, deadline: zx_instant_mono_t) -> Result<(), Status>
pub fn wait_deadline(&self, deadline: zx_instant_mono_t) -> Result<(), Status>
Waits for the event to be signaled with a deadline.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for KEvent
impl !RefUnwindSafe for KEvent
impl Send for KEvent
impl Sync for KEvent
impl UnsafeUnpin for KEvent
impl UnwindSafe for KEvent
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
Source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
Initializes
slot. Read moreSource§fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>where
F: FnOnce(Pin<&mut T>) -> Result<(), E>,
fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>where
F: FnOnce(Pin<&mut T>) -> Result<(), E>,
First initializes the value using
self then calls the function f with the initialized
value. Read more