Trait total_space::AgentState [−][src]
A trait for a single agent state.
Required methods
fn reaction(
&self,
instance: usize,
payload: &Payload
) -> Reaction<State, Payload>
[src]
&self,
instance: usize,
payload: &Payload
) -> Reaction<State, Payload>
Return the actions that may be taken by an agent instance with this state when receiving a payload.
Provided methods
fn activity(&self, _instance: usize) -> Activity<Payload>
[src]
Return the actions that may be taken by an agent with some state when time passes.
fn is_deferring(&self, _instance: usize) -> bool
[src]
Whether any agent in this state is deferring messages.
fn invalid_because(&self, _instance: usize) -> Option<&'static str>
[src]
If this object is invalid, return why.
fn max_in_flight_messages(&self, _instance: usize) -> Option<usize>
[src]
The maximal number of messages sent by this agent which may be in-flight when it is in this state.