canic_core/dto/
cascade.rs1use crate::dto::{
2 prelude::*,
3 state::AppStateInput,
4 topology::{AppIndexArgs, SubnetIndexArgs},
5};
6
7#[derive(CandidType, Clone, Debug, Deserialize)]
14pub struct StateSnapshotInput {
15 pub app_state: Option<AppStateInput>,
16 pub app_index: Option<AppIndexArgs>,
17 pub subnet_index: Option<SubnetIndexArgs>,
18}
19
20#[derive(CandidType, Clone, Debug, Deserialize)]
27pub struct TopologySnapshotInput {
28 pub parents: Vec<TopologyPathNode>,
29 pub children_map: Vec<TopologyChildren>,
31}
32
33#[derive(CandidType, Clone, Debug, Deserialize)]
40pub struct TopologyChildren {
41 pub parent_pid: Principal,
42 pub children: Vec<TopologyDirectChild>,
43}
44
45#[derive(CandidType, Clone, Debug, Deserialize)]
52pub struct TopologyDirectChild {
53 pub pid: Principal,
54 pub role: CanisterRole,
55}
56
57#[derive(CandidType, Clone, Debug, Deserialize)]
64pub struct TopologyPathNode {
65 pub pid: Principal,
66 pub role: CanisterRole,
67 pub parent_pid: Option<Principal>,
68}