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)]
28pub struct TopologySnapshotInput {
29 pub parents: Vec<TopologyPathNode>,
30 pub children_map: Vec<TopologyChildren>,
32}
33
34#[derive(CandidType, Clone, Debug, Deserialize)]
41pub struct TopologyChildren {
42 pub parent_pid: Principal,
43 pub children: Vec<TopologyDirectChild>,
44}
45
46#[derive(CandidType, Clone, Debug, Deserialize)]
53pub struct TopologyDirectChild {
54 pub pid: Principal,
55 pub role: CanisterRole,
56}
57
58#[derive(CandidType, Clone, Debug, Deserialize)]
65pub struct TopologyPathNode {
66 pub pid: Principal,
67 pub role: CanisterRole,
68 pub parent_pid: Option<Principal>,
69}