Skip to main content

appcore_contracts/policy/
runtime.rs

1// =============================================================================
2//        #######
3//     ###       ###     F: runtime.rs
4//    ##   ## ##   ##    P: AppCore-Runtime
5//         ## ##
6//                       C: 2026/07/22 15:41:18 by dnettoRaw
7//    ##   ## ##   ##    U: 2026/07/22 15:41:18 by dnettoRaw
8//      ###########      S: 1.0.1-rc.8
9// =============================================================================
10
11use super::*;
12
13/// Determines whether a runtime is isolated or participates in coordination.
14#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
15#[serde(rename_all = "snake_case")]
16pub enum RuntimeMode {
17    /// Runs without remote coordination, discovery, election or queues.
18    #[default]
19    Standalone,
20    /// Registers with a control plane and can coordinate with peers.
21    Cluster,
22}
23
24/// How a capability is invoked.
25#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
26#[serde(rename_all = "snake_case")]
27pub enum CapabilityMode {
28    /// Side-effect-free request.
29    Query,
30    /// State-changing or important action.
31    Command,
32    /// Long-lived or event-oriented flow.
33    Stream,
34}