pub struct ObjectWaitGuard<'a> { /* private fields */ }Expand description
A guard object to enforce that clients call begin_wait before wait_many.
The wait ends when the guard is consumed by wait_many, or dropped.
Implementations§
Source§impl<'a> ObjectWaitGuard<'a>
impl<'a> ObjectWaitGuard<'a>
Sourcepub fn waiter(&self) -> &'a Arc<ObjectWaiter> ⓘ
pub fn waiter(&self) -> &'a Arc<ObjectWaiter> ⓘ
The waiter associated with this guard.
Sourcepub fn wait_many<const N: usize>(
self,
items: [WaitItem<'_>; N],
deadline: MonotonicInstant,
) -> Result<[Signals; N], ObjectWaitError>
pub fn wait_many<const N: usize>( self, items: [WaitItem<'_>; N], deadline: MonotonicInstant, ) -> Result<[Signals; N], ObjectWaitError>
Blocks the thread until one of items is signaled, deadline expires, or the wait is
interrupted.
Each of items names an object and the signals to wait for on it, as returned by the
wait_item method of the handle of the object. Once at least one of the objects asserts
one of the signals it is waited for, returns the signals pending on each object, in the
order of items.
Returns ObjectWaitError::Interrupted if interrupt was called after begin_wait and
before the wait ended, even if some of the objects are also signaled, so that
interruptions are never missed.
items must contain fewer than ZX_WAIT_MANY_MAX_ITEMS items, because the waiter adds its
own event to them.
Trait Implementations§
Source§impl<'a> Debug for ObjectWaitGuard<'a>
impl<'a> Debug for ObjectWaitGuard<'a>
Source§impl Drop for ObjectWaitGuard<'_>
impl Drop for ObjectWaitGuard<'_>
Auto Trait Implementations§
impl<'a> Freeze for ObjectWaitGuard<'a>
impl<'a> RefUnwindSafe for ObjectWaitGuard<'a>
impl<'a> Send for ObjectWaitGuard<'a>
impl<'a> Sync for ObjectWaitGuard<'a>
impl<'a> Unpin for ObjectWaitGuard<'a>
impl<'a> UnsafeUnpin for ObjectWaitGuard<'a>
impl<'a> UnwindSafe for ObjectWaitGuard<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more