pub enum Reaction<State: KeyLike, Payload: DataLike> {
Unexpected,
Defer,
Ignore,
Do1(Action<State, Payload>),
Do1Of([Option<Action<State, Payload>>; 6]),
}Expand description
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§
Source§impl<State: PartialEq + KeyLike, Payload: PartialEq + DataLike> PartialEq for Reaction<State, Payload>
impl<State: PartialEq + KeyLike, Payload: PartialEq + DataLike> PartialEq for Reaction<State, Payload>
impl<State: Eq + KeyLike, Payload: Eq + DataLike> Eq for Reaction<State, Payload>
impl<State: KeyLike, Payload: DataLike> StructuralPartialEq for Reaction<State, Payload>
Auto Trait Implementations§
impl<State, Payload> Freeze for Reaction<State, Payload>
impl<State, Payload> RefUnwindSafe for Reaction<State, Payload>where
State: RefUnwindSafe,
Payload: RefUnwindSafe,
impl<State, Payload> Send for Reaction<State, Payload>
impl<State, Payload> Sync for Reaction<State, Payload>
impl<State, Payload> Unpin for Reaction<State, Payload>
impl<State, Payload> UnwindSafe for Reaction<State, Payload>where
State: UnwindSafe,
Payload: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more