Enum breadx::display::AsyncStatus
source · [−]pub enum AsyncStatus<T> {
Ready(T),
Read,
Write,
UserControlled,
}
Expand description
The status of an async function.
An async function can either be ready, or be unready for a number of reasons. This enum is used to represent the status of an async function.
It can be thought of as similar to Poll
, but instead of returning
Pending
, it returns the exact reason why it is pending.
Variants
Ready(T)
The function’s result is ready.
Read
We are waiting for a read to be available.
Write
We are waiting for a write to be available.
UserControlled
We are waiting for something else.
The implementation is expected to wake the provided waker once the function is ready to be called again.
Implementations
sourceimpl<T> AsyncStatus<T>
impl<T> AsyncStatus<T>
sourceimpl<T: Copy> AsyncStatus<&T>
impl<T: Copy> AsyncStatus<&T>
sourcepub fn copied(self) -> AsyncStatus<T>
pub fn copied(self) -> AsyncStatus<T>
Copy the reference in an AsyncStatus
to a value.
Trait Implementations
sourceimpl<T: Clone> Clone for AsyncStatus<T>
impl<T: Clone> Clone for AsyncStatus<T>
sourcefn clone(&self) -> AsyncStatus<T>
fn clone(&self) -> AsyncStatus<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<T: Debug> Debug for AsyncStatus<T>
impl<T: Debug> Debug for AsyncStatus<T>
sourceimpl<T: Hash> Hash for AsyncStatus<T>
impl<T: Hash> Hash for AsyncStatus<T>
sourceimpl<T: Ord> Ord for AsyncStatus<T>
impl<T: Ord> Ord for AsyncStatus<T>
sourceimpl<T: PartialEq> PartialEq<AsyncStatus<T>> for AsyncStatus<T>
impl<T: PartialEq> PartialEq<AsyncStatus<T>> for AsyncStatus<T>
sourcefn eq(&self, other: &AsyncStatus<T>) -> bool
fn eq(&self, other: &AsyncStatus<T>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &AsyncStatus<T>) -> bool
fn ne(&self, other: &AsyncStatus<T>) -> bool
This method tests for !=
.
sourceimpl<T: PartialOrd> PartialOrd<AsyncStatus<T>> for AsyncStatus<T>
impl<T: PartialOrd> PartialOrd<AsyncStatus<T>> for AsyncStatus<T>
sourcefn partial_cmp(&self, other: &AsyncStatus<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &AsyncStatus<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<T: Copy> Copy for AsyncStatus<T>
impl<T: Eq> Eq for AsyncStatus<T>
impl<T> StructuralEq for AsyncStatus<T>
impl<T> StructuralPartialEq for AsyncStatus<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for AsyncStatus<T> where
T: RefUnwindSafe,
impl<T> Send for AsyncStatus<T> where
T: Send,
impl<T> Sync for AsyncStatus<T> where
T: Sync,
impl<T> Unpin for AsyncStatus<T> where
T: Unpin,
impl<T> UnwindSafe for AsyncStatus<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more