Trait MetaModel

Source
pub trait MetaModel {
Show 17 associated items type StateId; type MessageId; type InvalidId; type ConfigurationId; type Payload; type AgentTypeRc; type Message; type Reaction; type Action; type Emit; type Invalid; type Configuration; type ConfigurationHashEntry; type Validator; type Condition; const MAX_AGENTS: usize; const MAX_MESSAGES: usize;
}
Expand description

Allow querying the model’s meta-parameters for public types.

Required Associated Constants§

Source

const MAX_AGENTS: usize

The maximal number of agents.

Source

const MAX_MESSAGES: usize

The maximal number of in-flight messages.

Required Associated Types§

Source

type StateId

The type of state identifiers.

Source

type MessageId

The type of message identifiers.

Source

type InvalidId

The type of invalid condition identifiers.

Source

type ConfigurationId

The type of configuration identifiers.

Source

type Payload

The type of message payloads.

Source

type AgentTypeRc

The type of boxed agent type.

Source

type Message

The type of in-flight messages.

Source

type Reaction

The type of a event handling by an agent.

Source

type Action

The type of an action from an agent.

Source

type Emit

The type of an emitted messages.

Source

type Invalid

The type of invalid conditions.

Source

type Configuration

The type of the included configurations.

Source

type ConfigurationHashEntry

The type of a hash table entry for the configurations (should be cache-friendly).

Source

type Validator

The type of a configuration validation function.

Source

type Condition

A condition on model configurations.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<StateId: IndexLike, MessageId: IndexLike, InvalidId: IndexLike, ConfigurationId: IndexLike, Payload: DataLike, const MAX_AGENTS: usize, const MAX_MESSAGES: usize> MetaModel for Model<StateId, MessageId, InvalidId, ConfigurationId, Payload, MAX_AGENTS, MAX_MESSAGES>

Source§

const MAX_AGENTS: usize = MAX_AGENTS

Source§

const MAX_MESSAGES: usize = MAX_MESSAGES

Source§

type StateId = StateId

Source§

type MessageId = MessageId

Source§

type InvalidId = InvalidId

Source§

type ConfigurationId = ConfigurationId

Source§

type Payload = Payload

Source§

type AgentTypeRc = Rc<dyn AgentType<StateId, Payload>>

Source§

type Message = Message<Payload>

Source§

type Reaction = Reaction<StateId, Payload>

Source§

type Action = Action<StateId, Payload>

Source§

type Emit = Emit<Payload>

Source§

type Invalid = Invalid<MessageId>

Source§

type Configuration = Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES>

Source§

type ConfigurationHashEntry = (Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES>, ConfigurationId)

Source§

type Validator = fn(&Model<StateId, MessageId, InvalidId, ConfigurationId, Payload, MAX_AGENTS, MAX_MESSAGES>, &Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES>) -> Option<&'static str>

Source§

type Condition = fn(&Model<StateId, MessageId, InvalidId, ConfigurationId, Payload, MAX_AGENTS, MAX_MESSAGES>, &Configuration<StateId, MessageId, InvalidId, MAX_AGENTS, MAX_MESSAGES>) -> bool