canic_core/dto/
cascade.rs1use crate::dto::{
2 prelude::*,
3 state::{AppStateInput, SubnetStateInput},
4 topology::{AppDirectoryArgs, SubnetDirectoryArgs},
5};
6
7#[derive(CandidType, Clone, Debug, Deserialize)]
14pub struct StateSnapshotInput {
15 pub app_state: Option<AppStateInput>,
16 pub subnet_state: Option<SubnetStateInput>,
17 pub app_directory: Option<AppDirectoryArgs>,
18 pub subnet_directory: Option<SubnetDirectoryArgs>,
19}
20
21#[derive(CandidType, Clone, Debug, Deserialize)]
34pub struct TopologySnapshotInput {
35 pub parents: Vec<TopologyPathNode>,
36 pub children_map: Vec<TopologyChildren>,
38}
39
40#[derive(CandidType, Clone, Debug, Deserialize)]
46pub struct TopologyChildren {
47 pub parent_pid: Principal,
48 pub children: Vec<TopologyDirectChild>,
49}
50
51#[derive(CandidType, Clone, Debug, Deserialize)]
57pub struct TopologyDirectChild {
58 pub pid: Principal,
59 pub role: CanisterRole,
60}
61
62#[derive(CandidType, Clone, Debug, Deserialize)]
68pub struct TopologyPathNode {
69 pub pid: Principal,
70 pub role: CanisterRole,
71 pub parent_pid: Option<Principal>,
72}