canic_core/dto/
state.rs

1use crate::dto::prelude::*;
2
3///
4/// AppCommand
5///
6
7#[derive(CandidType, Clone, Copy, Debug, Deserialize, Eq, PartialEq)]
8pub enum AppCommand {
9    Start,
10    Readonly,
11    Stop,
12}
13
14///
15/// AppModeView
16///
17
18#[derive(CandidType, Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
19pub enum AppModeView {
20    Enabled,
21    Readonly,
22    Disabled,
23}
24
25///
26/// AppStateView
27/// Read-only snapshot of application state for transfer and inspection.
28///
29
30#[derive(CandidType, Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
31pub struct AppStateView {
32    pub mode: AppModeView,
33}
34
35///
36/// SubnetStateView
37///
38
39#[derive(CandidType, Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
40pub struct SubnetStateView {}