Skip to main content

rstm_actors/
lib.rs

1/*
2    Appellation: rstm-actors <library>
3    Created At: 2025.09.03:18:46:32
4    Contrib: @FL03
5*/
6//! The [`actors`](self) module establishes a framework for defining and managing Turing
7//! machines
8//!
9//! ## Overview
10//!
11//! Here, we define the concept of an _actor_ as a fundamental computational entity capable of
12//! executing actions based on a set of rules or stimuli. This abstraction allows us to define
13//! a distinct separation between the _actor_ and the _rulespace_, where the actor operates
14//! independently of the specific logic that governs its behavior. By isolating the actor from
15//! the rulespace, we can create a more modular and flexible system that can adapt to different
16//! sets of rules without altering the core functionality of the actor itself.
17//!
18//! That being said, the design of an actor
19#![allow(
20    clippy::missing_safety_doc,
21    clippy::module_inception,
22    clippy::needless_doctest_main,
23    clippy::self_named_constructors,
24    clippy::should_implement_trait
25)]
26#![cfg_attr(not(feature = "std"), no_std)]
27#![cfg_attr(feature = "nightly", feature(allocator_api))]
28
29#[cfg(feature = "alloc")]
30extern crate alloc;
31
32extern crate rstm_core as rstm;
33
34#[cfg(not(any(feature = "alloc", feature = "std")))]
35compile_error! {
36    "Either the `alloc` or `std` feature must be enabled for this crate to compile."
37}
38
39#[macro_use]
40mod macros {
41    #[macro_use]
42    pub(crate) mod seal;
43}
44
45#[doc(inline)]
46pub use self::{engine::prelude::*, error::*, tmh::TMH, traits::*};
47
48pub mod engine;
49#[cfg(feature = "alloc")]
50pub(crate) mod tmh;
51
52pub mod error;
53
54pub mod traits {
55    //! the traits supporting the actors within the framework
56    #[doc(inline)]
57    pub use self::prelude::*;
58
59    mod actor;
60    mod handle;
61
62    mod prelude {
63        #[doc(inline)]
64        pub use super::actor::*;
65        #[doc(inline)]
66        pub use super::handle::*;
67    }
68}
69
70#[doc(hidden)]
71pub mod prelude {
72    #[doc(inline)]
73    pub use crate::engine::prelude::*;
74    #[cfg(feature = "alloc")]
75    #[doc(inline)]
76    pub use crate::tmh::TMH;
77    #[doc(inline)]
78    pub use crate::traits::*;
79}