pub struct WaiterRef(/* private fields */);Expand description
A weak reference to a Waiter. Intended for holding in wait queues or stashing elsewhere for calling queue_events later.
Implementations§
Source§impl WaiterRef
impl WaiterRef
pub fn from_abort_handle(handle: &Arc<AbortHandle>) -> WaiterRef
Sourcepub fn from_object_waiter(guard: &ObjectWaitGuard<'_>) -> WaiterRef
pub fn from_object_waiter(guard: &ObjectWaitGuard<'_>) -> WaiterRef
Returns a WaiterRef for the ObjectWaiter.
Interrupting the returned WaiterRef interrupts the underlying ObjectWaiter, causing
ObjectWaitGuard::wait_many to return ObjectWaitError::Interrupted. A task blocking in
wait_many passes this WaiterRef to RunState::Waiter so that signals, task exit, and
freezing can interrupt the wait. Accepting &ObjectWaitGuard ensures that
ObjectWaiter::begin_wait was called before entering RunState::Waiter, preventing missed
interruptions.
pub fn is_valid(&self) -> bool
pub fn interrupt(&self)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WaiterRef
impl !UnwindSafe for WaiterRef
impl Freeze for WaiterRef
impl Send for WaiterRef
impl Sync for WaiterRef
impl Unpin for WaiterRef
impl UnsafeUnpin for WaiterRef
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§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>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]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> ⓘ
Converts
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> ⓘ
Converts
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