peace_rt_model_core/
lib.rs

1//! Core runtime traits for the peace automation framework.
2//!
3//! These types are in this crate so that the `rt_model_native` and
4//! `rt_model_web` crates are able to reference them and either use or provide
5//! default implementations.
6
7// Re-exports
8pub use async_trait::async_trait;
9pub use indexmap::IndexMap;
10pub use indicatif;
11
12pub mod output;
13pub mod params;
14
15pub use crate::{
16    error::{
17        ApplyCmdError, Error, ParamsSpecsDeserializeError, StateDowncastError,
18        StatesDeserializeError,
19    },
20    items_state_stored_stale::ItemsStateStoredStale,
21    state_stored_and_discovered::StateStoredAndDiscovered,
22};
23
24mod error;
25mod items_state_stored_stale;
26mod state_stored_and_discovered;
27
28cfg_if::cfg_if! {
29    if #[cfg(feature = "output_progress")] {
30        pub use peace_progress_model::ProgressUpdate;
31
32        pub use crate::cmd_progress_tracker::CmdProgressTracker;
33
34        mod cmd_progress_tracker;
35    }
36}
37
38cfg_if::cfg_if! {
39    if #[cfg(not(target_arch = "wasm32"))] {
40        pub use crate::error::NativeError;
41    } else {
42        pub use crate::error::WebError;
43    }
44}