[][src]Enum act_zero::Produces

#[non_exhaustive]pub enum Produces<T> {
    None,
    Value(T),
    Deferred(Receiver<Produces<T>>),
}

A concrete type similar to a BoxFuture<'static, Result<T, oneshot::Canceled>>, but without requiring an allocation if the value is immediately ready. This type implements the Future trait and can be directly awaited.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None

No value was produced.

Value(T)

A value is ready.

Deferred(Receiver<Produces<T>>)

A value may be sent in the future.

Implementations

impl<T> Produces<T>[src]

pub fn ok(value: T) -> ActorResult<T>[src]

Returns Ok(Produces::Value(value))

Trait Implementations

impl<T: Debug> Debug for Produces<T>[src]

impl<T> Future for Produces<T>[src]

type Output = Result<T, Canceled>

The type of value produced on completion.

impl<T> Unpin for Produces<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Produces<T>[src]

impl<T> Send for Produces<T> where
    T: Send
[src]

impl<T> Sync for Produces<T> where
    T: Send + Sync
[src]

impl<T> !UnwindSafe for Produces<T>[src]

Blanket Implementations

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

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

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

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

impl<T> FutureExt for T where
    T: Future + ?Sized

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

impl<F> IntoFuture for F where
    F: Future
[src]

type Output = <F as Future>::Output

🔬 This is a nightly-only experimental API. (into_future)

The output that the future will produce on completion.

type Future = F

🔬 This is a nightly-only experimental API. (into_future)

Which kind of future are we turning this into?

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<F, T, E> TryFuture for F where
    F: Future<Output = Result<T, E>> + ?Sized

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<Fut> TryFutureExt for Fut where
    Fut: TryFuture + ?Sized

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.