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