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 more