pub struct Env;Expand description
Env
Implementations§
Source§impl Env
impl Env
pub fn get_prime_root_pid() -> Option<Principal>
pub fn try_get_prime_root_pid() -> Result<Principal, Error>
pub fn set_prime_root_pid(pid: Principal)
pub fn is_prime_root() -> bool
pub fn get_subnet_type() -> Option<SubnetType>
pub fn try_get_subnet_type() -> Result<SubnetType, Error>
pub fn set_subnet_type(ty: SubnetType)
pub fn get_subnet_pid() -> Option<Principal>
pub fn try_get_subnet_pid() -> Result<Principal, Error>
pub fn set_subnet_pid(pid: Principal)
pub fn get_root_pid() -> Option<Principal>
pub fn try_get_root_pid() -> Result<Principal, Error>
pub fn set_root_pid(pid: Principal)
pub fn is_root() -> bool
pub fn get_canister_type() -> Option<CanisterType>
Sourcepub fn try_get_canister_type() -> Result<CanisterType, Error>
pub fn try_get_canister_type() -> Result<CanisterType, Error>
Try to get the current canister type, or error if missing.
Sourcepub fn set_canister_type(ty: CanisterType)
pub fn set_canister_type(ty: CanisterType)
Set/replace the current canister type.
pub fn get_parent_pid() -> Option<Principal>
pub fn set_parent_pid(pid: Principal)
pub fn export() -> EnvData
Auto Trait Implementations§
impl Freeze for Env
impl RefUnwindSafe for Env
impl Send for Env
impl Sync for Env
impl Unpin for Env
impl UnwindSafe for Env
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