Skip to main content

scientific_workflow/
state.rs

1//! Template-defined scientific state and ordered in-memory state collections.
2//!
3//! Application authors normally import [`basic`] to load a JSON state schema,
4//! initialize concrete payloads, evolve one [`basic::SystemState`], and collect
5//! complete snapshots in a [`basic::StateSeries`]. Workflow internals and
6//! integrations import [`advanced`], which adds schema inspection and explicit
7//! structural maintenance without exposing the private erasure or slot layers.
8
9mod error;
10mod field;
11mod schema;
12mod series;
13#[allow(clippy::module_inception)]
14mod state;
15mod time;
16mod value;
17
18/// Ordinary application-facing state API.
19pub mod basic {
20    pub use super::error::{PayloadInsertError, StateError, StateSeriesError};
21    pub use super::schema::SystemStateSchema;
22    pub use super::series::{StateSeries, StateSeriesPushError};
23    pub use super::state::SystemState;
24    pub use super::time::StateTime;
25}
26
27/// Supported state API for advanced users and Workflow peer subsystems.
28///
29/// This scope is a strict superset of [`basic`]. Importing its extension traits
30/// enables metadata inspection and structural lifecycle operations.
31pub mod advanced {
32    pub use super::basic::*;
33    pub use super::field::StateFieldSchema;
34    pub use super::schema::StateSchemaAccess;
35    #[doc(hidden)]
36    pub use super::state::PayloadTuple;
37    pub use super::state::StateMaintenance;
38}