pub struct Canister { /* private fields */ }
Expand description

Can be used to represent a canister and different method on the canister.

Implementations

Create a new canister with the given principal id, this handler rejects any call to a different canister id.

Return a reference to the context associated with this canister.

Update the balance of this canister.

Add the given method to the canister.

Panics

If a method with the same name is already defined on the canister.

Add a default handler to the canister.

Panics

If a default handler is already set.

Trait Implementations

Whatever the handler can handle the given call or not, if this method returns false, we skip this handler and try to find the next handler that can handle the call. Read more

Perform the call using this handler. Only called if accept() first returned true.

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.

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.