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§
Sourcefn part_state_by_id(&self, state_id: StateId) -> State
fn part_state_by_id(&self, state_id: StateId) -> State
Access the part state by the state identifier.
Sourcefn part_first_index(&self) -> usize
fn part_first_index(&self) -> usize
The index of the first agent of this type.
Sourcefn parts_count(&self) -> usize
fn parts_count(&self) -> usize
The number of agent instances of this type.