pub struct ConfigModel {
pub controllers: Vec<Principal>,
pub standards: Option<Standards>,
pub log: LogConfig,
pub app_directory: BTreeSet<CanisterRole>,
pub subnets: BTreeMap<SubnetRole, SubnetConfig>,
pub whitelist: Option<Whitelist>,
}Expand description
ConfigModel
Fields§
§controllers: Vec<Principal>§standards: Option<Standards>§log: LogConfig§app_directory: BTreeSet<CanisterRole>§subnets: BTreeMap<SubnetRole, SubnetConfig>§whitelist: Option<Whitelist>Implementations§
Source§impl ConfigModel
impl ConfigModel
Sourcepub fn get_subnet(&self, ty: &SubnetRole) -> Option<SubnetConfig>
pub fn get_subnet(&self, ty: &SubnetRole) -> Option<SubnetConfig>
Get a subnet configuration by type.
Sourcepub fn is_whitelisted(&self, principal: &Principal) -> bool
pub fn is_whitelisted(&self, principal: &Principal) -> bool
Return true if the given principal is present in the whitelist.
Sourcepub fn icrc21_enabled(&self) -> bool
pub fn icrc21_enabled(&self) -> bool
Return whether ICRC-21 standard support is enabled.
Trait Implementations§
Source§impl Clone for ConfigModel
impl Clone for ConfigModel
Source§fn clone(&self) -> ConfigModel
fn clone(&self) -> ConfigModel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConfigModel
impl Debug for ConfigModel
Source§impl Default for ConfigModel
impl Default for ConfigModel
Source§fn default() -> ConfigModel
fn default() -> ConfigModel
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ConfigModel
impl<'de> Deserialize<'de> for ConfigModel
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 Serialize for ConfigModel
impl Serialize for ConfigModel
Source§impl Validate for ConfigModel
impl Validate for ConfigModel
Auto Trait Implementations§
impl Freeze for ConfigModel
impl RefUnwindSafe for ConfigModel
impl Send for ConfigModel
impl Sync for ConfigModel
impl Unpin for ConfigModel
impl UnwindSafe for ConfigModel
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