PartType

Trait PartType 

Source
pub trait PartType<State: DataLike, StateId: IndexLike> {
    // Required methods
    fn part_state_by_id(&self, state_id: StateId) -> State;
    fn part_first_index(&self) -> usize;
    fn parts_count(&self) -> usize;
}
Expand description

Allow access to state of parts.

Required Methods§

Source

fn part_state_by_id(&self, state_id: StateId) -> State

Access the part state by the state identifier.

Source

fn part_first_index(&self) -> usize

The index of the first agent of this type.

Source

fn parts_count(&self) -> usize

The number of agent instances of this type.

Implementors§

Source§

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