[][src]Enum axiom::actors::Status

pub enum Status {
    Processed,
    Skipped,
    ResetSkip,
    Stop,
}

Status of the message and potentially the actor as a resulting from processing a message with the actor.

Variants

Processed

The message was processed and can be removed from the channel. Note that this doesn't necessarily mean that anything was done with the message, just that it can be removed.
It is up to the actor to decide what, if anything, to do with the message.

Skipped

The message was skipped and should remain in the channel. Once a message is skipped a skip cursor will be created in the actor's message channel which will act as the actual head of the channel until an Status::ResetSkip is returned from an actor's processor. This enables an actor to skip messages while working on a process and then clear the skip cursor and resume normal processing. This functionality is critical for actors that implement a finite state machine and thus might temporarily change the implementation of the message processor and then switch back to a state where the previously sent messages are processed.

ResetSkip

Marks the message as processed and clears the skip cursor on the channel. A skip cursor is present when a message has been skipped by an actor returning Status::Skipped from a call to the actor's message processor. If no skip cursor is set than this status is semantically the same as Status::Processed.

Stop

Returned from an actor when the actor wants the system to stop the actor. When this status is returned the actor's ActorId will no longer send any messages and the actor instance itself will be removed from the actors table in the ActorSystem. The user is advised to do any cleanup needed before returning Status::Stop.

Trait Implementations

impl PartialEq<Status> for Status[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Eq for Status[src]

impl Debug for Status[src]

impl Serialize for Status[src]

impl<'de> Deserialize<'de> for Status[src]

Auto Trait Implementations

impl Sync for Status

impl Send for Status

impl Unpin for Status

impl RefUnwindSafe for Status

impl UnwindSafe for Status

Blanket Implementations

impl<T> ActorMessage for T where
    T: 'static + Serialize + DeserializeOwned + Sync + Send + Any + ?Sized
[src]

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

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

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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]