canic_core/dto/
topology.rs1use crate::dto::{canister::CanisterInfo, prelude::*};
2
3#[derive(CandidType, Deserialize)]
8pub struct AppRegistryResponse(pub Vec<AppRegistryEntry>);
9
10#[derive(CandidType, Deserialize)]
15pub struct AppRegistryEntry {
16 pub subnet_pid: Principal,
17 pub root_pid: Principal,
18}
19
20#[derive(CandidType, Deserialize)]
27pub struct SubnetRegistryResponse(pub Vec<SubnetRegistryEntry>);
28
29#[derive(CandidType, Deserialize)]
36pub struct SubnetRegistryEntry {
37 pub pid: Principal,
38 pub role: CanisterRole,
39 pub record: CanisterInfo,
40}
41
42#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq)]
47pub struct AppIndexArgs(pub Vec<IndexEntryInput>);
48
49#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq)]
54pub struct SubnetIndexArgs(pub Vec<IndexEntryInput>);
55
56#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq)]
61pub struct IndexEntryInput {
62 pub role: CanisterRole,
63 pub pid: Principal,
64}
65
66#[derive(CandidType, Debug, Deserialize, Eq, PartialEq)]
71pub struct IndexEntryResponse {
72 pub role: CanisterRole,
73 pub pid: Principal,
74}