[−][src]Struct suspend::Listener
The result of acquiring a Suspend
using either Suspend::listen
or
Suspend::try_listen
. It may be used to wait for a notification with
.await
or by parking the current thread.
Implementations
impl<'_> Listener<'_>
[src]
pub fn wait(&mut self)
[src]
Wait for a notification on the associated Suspend
instance, parking
the current thread until that time.
pub fn wait_deadline(&mut self, expire: Instant) -> bool
[src]
Wait for a notification on the associated Suspend
instance, parking
the current thread until the result is available or the deadline is
reached. If a timeout occurs then false
is returned, otherwise
true
.
pub fn wait_timeout(&self, timeout: Duration) -> bool
[src]
Wait for a notification on the associated Suspend
instance, parking
the current thread until the result is available or the timeout
expires. If a timeout does occur then false
is returned, otherwise
true
.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Listener<'a>
impl<'a> Send for Listener<'a>
impl<'a> Sync for Listener<'a>
impl<'a> Unpin for Listener<'a>
impl<'a> !UnwindSafe for Listener<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,