Struct total_space::AgentTypeData[][src]

pub struct AgentTypeData<State: DataLike, StateId: IndexLike, Payload: DataLike> { /* fields omitted */ }

The data we need to implement an agent type.

This should be placed in a Singleton to allow the agent states to get services from it.

Implementations

impl<State: DataLike, StateId: IndexLike, Payload: DataLike> AgentTypeData<State, StateId, Payload>[src]

pub fn new(
    name: &'static str,
    instances: Instances,
    prev_agent_type: Option<Rc<dyn AgentType<StateId, Payload>>>
) -> Self
[src]

Create new agent type data with the specified name and number of instances.

pub fn set_order(&mut self, instance: usize, order: usize)[src]

Set the horizontal order of an instance of the agent in a sequence diagram.

pub fn get_state(&self, state_id: StateId) -> State[src]

Access the actual state by its identifier.

Trait Implementations

impl<State: DataLike, StateId: IndexLike, Payload: DataLike> AgentInstances<StateId, Payload> for AgentTypeData<State, StateId, Payload>[src]

impl<State: DataLike + AgentState<State, Payload>, StateId: IndexLike, Payload: DataLike> AgentType<StateId, Payload> for AgentTypeData<State, StateId, Payload>[src]

impl<State: DataLike, StateId: IndexLike, Payload: DataLike> Name for AgentTypeData<State, StateId, Payload>[src]

impl<State: DataLike, StateId: IndexLike, Payload: DataLike> PartType<State, StateId> for AgentTypeData<State, StateId, Payload>[src]

Auto Trait Implementations

impl<State, StateId, Payload> !RefUnwindSafe for AgentTypeData<State, StateId, Payload>

impl<State, StateId, Payload> !Send for AgentTypeData<State, StateId, Payload>

impl<State, StateId, Payload> !Sync for AgentTypeData<State, StateId, Payload>

impl<State, StateId, Payload> Unpin for AgentTypeData<State, StateId, Payload> where
    Payload: Unpin,
    State: Unpin,
    StateId: Unpin

impl<State, StateId, Payload> !UnwindSafe for AgentTypeData<State, StateId, Payload>

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.