pub struct CanisterSettings {
    pub controllers: Option<Vec<Principal>>,
    pub compute_allocation: Option<Nat>,
    pub memory_allocation: Option<Nat>,
    pub freezing_threshold: Option<Nat>,
}
Expand description

The set of possible canister settings. Similar to DefiniteCanisterSettings, but all the fields are optional.

Fields

controllers: Option<Vec<Principal>>

The set of canister controllers. Controllers can update the canister via the management canister.

If unspecified and a canister is being created with these settings, defaults to the caller.

compute_allocation: Option<Nat>

The allocation percentage (between 0 and 100 inclusive) for guaranteed compute capacity.

The settings update will be rejected if the IC can’t commit to allocating this much compupte capacity.

If unspecified and a canister is being created with these settings, defaults to 0, i.e. best-effort.

memory_allocation: Option<Nat>

The allocation, in bytes (up to 256 TiB) that the canister is allowed to use for storage.

The settings update will be rejected if the IC can’t commit to allocating this much storage.

If unspecified and a canister is being created with these settings, defaults to 0, i.e. best-effort.

freezing_threshold: Option<Nat>

The IC will freeze a canister protectively if it will run out of cycles before this amount of time, in seconds (up to u64::MAX), has passed.

If unspecified and a canister is being created with these settings, defaults to 2592000, i.e. ~30 days.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more