pub struct EnvData {
pub prime_root_pid: Option<Principal>,
pub subnet_type: Option<SubnetRole>,
pub subnet_pid: Option<Principal>,
pub root_pid: Option<Principal>,
pub canister_type: Option<CanisterRole>,
pub parent_pid: Option<Principal>,
}Expand description
EnvData
prime_root_pid : passed to the root during install arguments.
parent_pid : passed to the root during install arguments.
All other fields are derived during install/upgrade and cached locally so every canister can answer questions about its environment without touching global state.
Fields§
§prime_root_pid: Option<Principal>§subnet_type: Option<SubnetRole>§subnet_pid: Option<Principal>§root_pid: Option<Principal>§canister_type: Option<CanisterRole>§parent_pid: Option<Principal>Trait Implementations§
Source§impl CandidType for EnvData
impl CandidType for EnvData
Source§impl<'de> Deserialize<'de> for EnvData
impl<'de> Deserialize<'de> for EnvData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Storable for EnvData
impl Storable for EnvData
Source§fn to_bytes(&self) -> Cow<'_, [u8]>
fn to_bytes(&self) -> Cow<'_, [u8]>
Converts the element into a possibly borrowed byte slice. Read more
Source§fn from_bytes(bytes: Cow<'_, [u8]>) -> Self
fn from_bytes(bytes: Cow<'_, [u8]>) -> Self
Converts bytes into an element.
Source§fn to_bytes_checked(&self) -> Cow<'_, [u8]>
fn to_bytes_checked(&self) -> Cow<'_, [u8]>
Like
to_bytes, but checks that bytes conform to declared bounds.Source§fn into_bytes_checked(self) -> Vec<u8> ⓘwhere
Self: Sized,
fn into_bytes_checked(self) -> Vec<u8> ⓘwhere
Self: Sized,
Like
into_bytes, but checks that bytes conform to declared bounds.Source§fn check_bounds(bytes: &[u8])
fn check_bounds(bytes: &[u8])
Validates that a byte slice fits within this type’s declared bounds.
Auto Trait Implementations§
impl Freeze for EnvData
impl RefUnwindSafe for EnvData
impl Send for EnvData
impl Sync for EnvData
impl Unpin for EnvData
impl UnwindSafe for EnvData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more