Enum total_space::Reaction[][src]

pub enum Reaction<State: KeyLike, Payload: DataLike> {
    Unexpected,
    Defer,
    Ignore,
    Do1(Action<State, Payload>),
    Do1Of([Option<Action<State, Payload>>; 6]),
}

The reaction of an agent to receiving a message.

Variants

Unexpected

Indicate an unexpected event.

Defer

Defer handling the event.

This has the same effect as Do1(Action.Defer).

Ignore

Ignore the event.

This has the same effect as Do1(Action.Ignore).

Do1(Action<State, Payload>)

A single action (deterministic).

Do1Of([Option<Action<State, Payload>>; 6])

One of several alternative actions (non-deterministic).

Trait Implementations

impl<State: Debug + KeyLike, Payload: Debug + DataLike> Debug for Reaction<State, Payload>[src]

impl<State: Eq + KeyLike, Payload: Eq + DataLike> Eq for Reaction<State, Payload>[src]

impl<State: PartialEq + KeyLike, Payload: PartialEq + DataLike> PartialEq<Reaction<State, Payload>> for Reaction<State, Payload>[src]

impl<State: KeyLike, Payload: DataLike> StructuralEq for Reaction<State, Payload>[src]

impl<State: KeyLike, Payload: DataLike> StructuralPartialEq for Reaction<State, Payload>[src]

Auto Trait Implementations

impl<State, Payload> RefUnwindSafe for Reaction<State, Payload> where
    Payload: RefUnwindSafe,
    State: RefUnwindSafe

impl<State, Payload> Send for Reaction<State, Payload> where
    Payload: Send,
    State: Send

impl<State, Payload> Sync for Reaction<State, Payload> where
    Payload: Sync,
    State: Sync

impl<State, Payload> Unpin for Reaction<State, Payload> where
    Payload: Unpin,
    State: Unpin

impl<State, Payload> UnwindSafe for Reaction<State, Payload> where
    Payload: UnwindSafe,
    State: UnwindSafe

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, 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.