[][src]Enum holly::actor::State

pub enum State<A, T> {
    Ready(A),
    Stream(A, Box<dyn Stream<Item = T, Error = Void> + Send>),
    Close(A),
    Done,
}

The processing state an actor transitions to after receiving a message.

Variants

Ready(A)

The actor is ready to accept more messages.

Stream(A, Box<dyn Stream<Item = T, Error = Void> + Send>)

The actor is ready to accept more messages and wants to add another stream of messages to its mailbox.

Close(A)

The actor wants to close its mailbox.

This will prevent other actors from sending any more messages to this actor's address. All enqueued messages will still be processed. Note that it is the actor's responsibility to close streams added via State::Stream.

Done

The actor has finished processing (terminal state).

Trait Implementations

impl<A, T> Into<State<A, T, ()>> for State<A, T>[src]

Auto Trait Implementations

impl<A, T> Send for State<A, T> where
    A: Send

impl<A, T> !Sync for State<A, T>

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.