canic_cdk/spec/governance/nns/mod.rs
1//!
2//! Handy wrappers for selected NNS candid types with consistent naming.
3//!
4
5use crate::spec::prelude::*;
6
7///
8/// GetSubnetForCanisterRequest
9///
10
11#[derive(CandidType, Debug, Deserialize)]
12pub struct GetSubnetForCanisterRequest {
13 pub principal: Principal,
14}
15
16///
17/// GetSubnetForCanisterResponse
18/// Minimal NNS response describing the assigned subnet for a canister.
19///
20
21pub type GetSubnetForCanisterResponse = Result<GetSubnetForCanisterPayload, String>;
22
23///
24/// GetSubnetForCanisterPayload
25///
26
27#[derive(CandidType, Debug, Deserialize)]
28pub struct GetSubnetForCanisterPayload {
29 pub subnet_id: Option<Principal>,
30}