pub struct CreateCanisterBuilder<'agent, 'canister: 'agent, T> { /* private fields */ }
Expand description

A builder for a create_canister call.

Implementations

Create an CreateCanister builder, which is also an AsyncCall implementation.

Until developers can convert real ICP tokens to provision a new canister with cycles, the system provides the provisional_create_canister_with_cycles method. It behaves as create_canister, but initializes the canister’s balance with amount fresh cycles (using MAX_CANISTER_BALANCE if amount = null, else capping the balance at MAX_CANISTER_BALANCE). Cycles added to this call via ic0.call_cycles_add are returned to the caller. This method is only available in local development instances, and will be removed in the future.

Pass in an optional controller for the canister. If this is None, it will revert the controller to default.

Pass in a designated controller for the canister.

Pass in a compute allocation optional value for the canister. If this is None, it will revert the compute allocation to default.

Pass in a compute allocation value for the canister.

Pass in a memory allocation optional value for the canister. If this is None, it will revert the memory allocation to default.

Pass in a memory allocation value for the canister.

Pass in a freezing threshold optional value for the canister. If this is None, it will revert the freezing threshold to default.

Pass in a freezing threshold value for the canister.

Create an AsyncCall implementation that, when called, will create a canister.

Make a call. This is equivalent to the AsyncCall::call.

Make a call. This is equivalent to the AsyncCall::call_and_wait.

Trait Implementations

Execute the call, but returns the RequestId. Waiting on the request Id must be managed by the caller using the Agent directly. Read more

Execute the call, and wait for an answer using a Waiter strategy. The return type is encoded in the trait. Read more

Apply a transformation function after the call has been successful. The transformation is applied with the result. Read more

Apply a transformation function after the call has been successful. Equivalent to .and_then(|x| async { map(x) }).

Formats the value using the given formatter. 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 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