Struct total_space::Configuration[][src]

pub struct Configuration<StateId: IndexLike, MessageId: IndexLike, InvalidId: IndexLike, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> {
    pub state_ids: [StateId; MAX_AGENTS],
    pub message_counts: [MessageIndex; MAX_AGENTS],
    pub message_ids: [MessageId; MAX_MESSAGES],
    pub invalid_id: InvalidId,
}

A complete system configuration.

We will have a lot of these, so keeping their size down and avoiding heap memory as much as possible is critical. The maximal sizes were chosen so that the configuration plus its memoized identifier will fit together inside exactly one cache lines, which should make this more cache-friendly when placed inside a hash table.

Fields

state_ids: [StateId; MAX_AGENTS]

The state of each agent.

message_counts: [MessageIndex; MAX_AGENTS]

The number of messages sent by each agent.

message_ids: [MessageId; MAX_MESSAGES]

The messages sent by each agent.

invalid_id: InvalidId

The invalid condition, if any.

Trait Implementations

impl<StateId: Clone + IndexLike, MessageId: Clone + IndexLike, InvalidId: Clone + IndexLike, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> Clone for Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES>[src]

impl<StateId: Copy + IndexLike, MessageId: Copy + IndexLike, InvalidId: Copy + IndexLike, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> Copy for Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES>[src]

impl<StateId: Debug + IndexLike, MessageId: Debug + IndexLike, InvalidId: Debug + IndexLike, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> Debug for Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES>[src]

impl<StateId: IndexLike, MessageId: IndexLike, InvalidId: IndexLike, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> Default for Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES>[src]

impl<StateId: Eq + IndexLike, MessageId: Eq + IndexLike, InvalidId: Eq + IndexLike, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> Eq for Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES>[src]

impl<StateId: Hash + IndexLike, MessageId: Hash + IndexLike, InvalidId: Hash + IndexLike, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> Hash for Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES>[src]

impl<StateId: PartialEq + IndexLike, MessageId: PartialEq + IndexLike, InvalidId: PartialEq + IndexLike, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> PartialEq<Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES>> for Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES>[src]

impl<StateId: IndexLike, MessageId: IndexLike, InvalidId: IndexLike, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> StructuralEq for Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES>[src]

impl<StateId: IndexLike, MessageId: IndexLike, InvalidId: IndexLike, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> StructuralPartialEq for Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES>[src]

Auto Trait Implementations

impl<StateId, MessageId, InvalidId, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> RefUnwindSafe for Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES> where
    InvalidId: RefUnwindSafe,
    MessageId: RefUnwindSafe,
    StateId: RefUnwindSafe

impl<StateId, MessageId, InvalidId, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> Send for Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES> where
    InvalidId: Send,
    MessageId: Send,
    StateId: Send

impl<StateId, MessageId, InvalidId, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> Sync for Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES> where
    InvalidId: Sync,
    MessageId: Sync,
    StateId: Sync

impl<StateId, MessageId, InvalidId, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> Unpin for Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES> where
    InvalidId: Unpin,
    MessageId: Unpin,
    StateId: Unpin

impl<StateId, MessageId, InvalidId, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> UnwindSafe for Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES> where
    InvalidId: UnwindSafe,
    MessageId: UnwindSafe,
    StateId: UnwindSafe

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> CallHasher for T where
    T: Hash + ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.