canic_core/dto/
cascade.rs1use crate::dto::{
2 prelude::*,
3 state::FleetStateInput,
4 topology::{FleetDirectoryInput, SubnetDirectoryInput},
5};
6#[derive(CandidType, Clone, Debug, Deserialize)]
13pub struct StateSnapshotInput {
14 pub fleet_state: Option<FleetStateInput>,
15 pub fleet_directory: Option<FleetDirectoryInput>,
16 pub subnet_directory: Option<SubnetDirectoryInput>,
17}
18
19#[derive(CandidType, Clone, Debug, Deserialize)]
26pub struct TopologySnapshotInput {
27 pub parents: Vec<TopologyPathNode>,
28 pub children_map: Vec<TopologyChildren>,
30}
31
32#[derive(CandidType, Clone, Debug, Deserialize)]
39pub struct TopologyChildren {
40 pub parent_pid: Principal,
41 pub children: Vec<TopologyDirectChild>,
42}
43
44#[derive(CandidType, Clone, Debug, Deserialize)]
51pub struct TopologyDirectChild {
52 pub pid: Principal,
53 pub role: CanisterRole,
54}
55
56#[derive(CandidType, Clone, Debug, Deserialize)]
63pub struct TopologyPathNode {
64 pub pid: Principal,
65 pub role: CanisterRole,
66 pub parent_pid: Option<Principal>,
67}