Crate odem_rs_core

Crate odem_rs_core 

Source
Expand description

The core crate is the central component of the ODEM-rs library, providing the foundational elements for object-based discrete-event modeling. It defines key structures, traits, and functions that enable the modeling of concurrent systems through cooperative concurrency. The core crate includes essential components like configuration handling, error management, and core simulation functionalities.

Modules§

agent
This module provides the Agent structure, representing an isolated execution context within the simulation, along with supporting traits and types.
config
This module is about preparing the simulation library for the execution of a simulation model, defining traits and a default configuration for specifying various data types and constants.
continuation
The continuation module provides the implementation of a type-erased, intrusively linked futures abstraction used in the scheduler of the simulation library.
erased
Provides type-erased and object-safe traits that can be used to dynamically dispatch over Simulators, regardless of their configuration.
error
A module for core-specific error types.
fsm
A module providing infrastructure for building safe and controlled type state machines in ODEM-rs.
job
Provides Job, a lightweight, cooperatively scheduled unit of execution within the simulation framework.
ops
Module for basic scheduling operations that can be called as free functions.
ptr
Module containing a type of reference-counting smart-pointer that works in no_std-environments and for stack-bound values.
simulator
This module contains the heart of the library: the Simulator and the simulation context.

Macros§

model_time
Constructs a constant ModelTime instance that may be used to return the model time of the currently active simulator for this thread.

Structs§

Failure
A return value indicating unsuccessful termination of a process.
Success
A return value indicating successful termination of a process.

Traits§

Active
Trait that is implemented by all active elements and used as part of the activate- and schedule-methods of the simulation context.
Dispatch
A dyn-compatible trait for providing hooks for custom events in the life of an Active object.
Puck
Trait that represents a form of join handle for simulation runs which is returned by the bind-method of the Active-trait and will commonly be encountered as the result type of the activate- and schedule-methods.

Type Aliases§

DefaultPlan
Type-alias for the default Scheduler.
ExitStatus
Represents the exit code at the end of a process’ life.