[][src]Enum component_future::Async

pub enum Async<Item> {
    Ready(Item),
    NotReady,
    DidWork,
    NothingToDo,
}

Return type of a component of a future or stream, indicating whether a value is ready, or if not, what actions were taken.

Variants

Ready(Item)

We have a value for the main loop to return immediately.

NotReady

One of our inner futures returned futures::Async::NotReady. If all of our other components return either NothingToDo or NotReady, then our overall future should return NotReady and wait to be polled again.

DidWork

We did some work (moved our internal state closer to being ready to return a value), but we aren't ready to return a value yet. We should re-run all of the poll functions to see if the state modification made any of them also able to make progress.

NothingToDo

We didn't poll any inner futures or otherwise change our internal state at all, so rerunning is unlikely to make progress. If all components return either NothingToDo or NotReady (and at least one returns NotReady), then we should just return NotReady and wait to be polled again. It is an error (panic) for all component poll methods to return NothingToDo.

Trait Implementations

impl<Item: Clone> Clone for Async<Item>[src]

impl<Item: Copy> Copy for Async<Item>[src]

impl<Item: Eq> Eq for Async<Item>[src]

impl<Item: PartialEq> PartialEq<Async<Item>> for Async<Item>[src]

impl<Item: Debug> Debug for Async<Item>[src]

Auto Trait Implementations

impl<Item> Send for Async<Item> where
    Item: Send

impl<Item> Sync for Async<Item> where
    Item: Sync

impl<Item> Unpin for Async<Item> where
    Item: Unpin

impl<Item> UnwindSafe for Async<Item> where
    Item: UnwindSafe

impl<Item> RefUnwindSafe for Async<Item> where
    Item: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]