canic_core/dto/
cascade.rs1use crate::dto::{
2 prelude::*,
3 state::{AppStateView, SubnetStateView},
4 topology::{AppDirectoryView, SubnetDirectoryView},
5};
6
7#[derive(CandidType, Clone, Debug, Default, Deserialize)]
18pub struct StateSnapshotView {
19 pub app_state: Option<AppStateView>,
20 pub subnet_state: Option<SubnetStateView>,
21 pub app_directory: Option<AppDirectoryView>,
22 pub subnet_directory: Option<SubnetDirectoryView>,
23}
24
25#[derive(CandidType, Clone, Debug, Deserialize)]
38pub struct TopologySnapshotView {
39 pub parents: Vec<TopologyPathNodeView>,
40 pub children_map: Vec<TopologyChildrenView>,
42}
43
44#[derive(CandidType, Clone, Debug, Deserialize)]
50pub struct TopologyChildrenView {
51 pub parent_pid: Principal,
52 pub children: Vec<TopologyDirectChildView>,
53}
54
55#[derive(CandidType, Clone, Debug, Deserialize)]
61pub struct TopologyDirectChildView {
62 pub pid: Principal,
63 pub role: CanisterRole,
64}
65
66#[derive(CandidType, Clone, Debug, Deserialize)]
72pub struct TopologyPathNodeView {
73 pub pid: Principal,
74 pub role: CanisterRole,
75 pub parent_pid: Option<Principal>,
76}