canic_core/spec/nns/
mod.rs1use crate::spec::prelude::*;
6
7#[derive(CandidType, Debug, Deserialize)]
12pub struct GetSubnetForCanisterRequest {
13 pub principal: Principal,
14}
15
16impl GetSubnetForCanisterRequest {
17 pub fn new(pid: impl Into<Principal>) -> Self {
18 Self {
19 principal: pid.into(),
20 }
21 }
22}
23
24pub type GetSubnetForCanisterResponse = Result<GetSubnetForCanisterPayload, String>;
30
31#[derive(CandidType, Debug, Deserialize)]
32pub struct GetSubnetForCanisterPayload {
33 pub subnet_id: Option<Principal>,
34}