pub struct CanisterSettings {
pub controllers: Option<Vec<Principal>>,
pub compute_allocation: Option<Nat>,
pub memory_allocation: Option<Nat>,
pub freezing_threshold: Option<Nat>,
pub reserved_cycles_limit: Option<Nat>,
pub log_visibility: Option<LogVisibility>,
pub wasm_memory_limit: Option<Nat>,
}
Expand description
Canister settings.
The settings are optional. If they are not explicitly set, the default values will be applied automatically.
See settings
.
Fields§
§controllers: Option<Vec<Principal>>
A list of at most 10 principals.
The principals in this list become the controllers of the canister.
Default value: A list containing only the caller of the create_canister call.
compute_allocation: Option<Nat>
Must be a number between 0 and 100, inclusively.
It indicates how much compute power should be guaranteed to this canister, expressed as a percentage of the maximum compute power that a single canister can allocate.
If the IC cannot provide the requested allocation, for example because it is oversubscribed, the call will be rejected.
Default value: 0
memory_allocation: Option<Nat>
Must be a number between 0 and 248 (i.e 256TB), inclusively.
It indicates how much memory the canister is allowed to use in total.
If the IC cannot provide the requested allocation, for example because it is oversubscribed, the call will be rejected.
If set to 0, then memory growth of the canister will be best-effort and subject to the available memory on the IC.
Default value: 0
freezing_threshold: Option<Nat>
Must be a number between 0 and 264-1, inclusively.
It indicates a length of time in seconds.
Default value: 2592000 (approximately 30 days).
reserved_cycles_limit: Option<Nat>
Must be a number between 0 and 2128-1, inclusively.
It indicates the upper limit on reserved_cycles
of the canister.
Default value: 5_000_000_000_000 (5 trillion cycles).
log_visibility: Option<LogVisibility>
Defines who is allowed to read the canister’s logs.
Default value: Controllers
wasm_memory_limit: Option<Nat>
Must be a number between 0 and 248-1 (i.e 256TB), inclusively.
It indicates the upper limit on the WASM heap memory consumption of the canister.
Default value: 3_221_225_472 (3 GiB).
Trait Implementations§
Source§impl CandidType for CanisterSettings
impl CandidType for CanisterSettings
Source§impl Clone for CanisterSettings
impl Clone for CanisterSettings
Source§fn clone(&self) -> CanisterSettings
fn clone(&self) -> CanisterSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CanisterSettings
impl Debug for CanisterSettings
Source§impl Default for CanisterSettings
impl Default for CanisterSettings
Source§fn default() -> CanisterSettings
fn default() -> CanisterSettings
Source§impl<'de> Deserialize<'de> for CanisterSettings
impl<'de> Deserialize<'de> for CanisterSettings
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>,
Source§impl Hash for CanisterSettings
impl Hash for CanisterSettings
Source§impl Ord for CanisterSettings
impl Ord for CanisterSettings
Source§fn cmp(&self, other: &CanisterSettings) -> Ordering
fn cmp(&self, other: &CanisterSettings) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for CanisterSettings
impl PartialEq for CanisterSettings
Source§impl PartialOrd for CanisterSettings
impl PartialOrd for CanisterSettings
Source§impl Serialize for CanisterSettings
impl Serialize for CanisterSettings
impl Eq for CanisterSettings
impl StructuralPartialEq for CanisterSettings
Auto Trait Implementations§
impl Freeze for CanisterSettings
impl RefUnwindSafe for CanisterSettings
impl Send for CanisterSettings
impl Sync for CanisterSettings
impl Unpin for CanisterSettings
impl UnwindSafe for CanisterSettings
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)