pub struct ConfigOps;Expand description
ConfigOps
Ops-layer façade for configuration access.
Responsibilities:
- Provide fallible lookups over the config model (
try_get_subnet,try_get_canister). - Provide “current context” helpers (
cfg_current_subnet,cfg_current_canister) that combineEnvOps(who am I?) with the static configuration model.
Implementations§
Source§impl ConfigOps
impl ConfigOps
Sourcepub fn try_get_subnet(role: &SubnetRole) -> Result<SubnetConfig, Error>
pub fn try_get_subnet(role: &SubnetRole) -> Result<SubnetConfig, Error>
Fetch a subnet configuration by type.
Sourcepub fn try_get_canister(
subnet_role: &SubnetRole,
canister_role: &CanisterRole,
) -> Result<CanisterConfig, Error>
pub fn try_get_canister( subnet_role: &SubnetRole, canister_role: &CanisterRole, ) -> Result<CanisterConfig, Error>
Get a canister configuration inside a specific subnet.
Sourcepub fn current_subnet() -> Result<SubnetConfig, Error>
pub fn current_subnet() -> Result<SubnetConfig, Error>
Fetch the configuration record for the current subnet.