[][src]Struct ic_utils::canister::Canister

pub struct Canister<'agent, T = ()> { /* fields omitted */ }

Create an encapsulation of a Canister running on the Internet Computer. This supports making calls to methods, installing code if needed, and various utilities related to a canister.

This is the higher level construct for talking to a canister on the Internet Computer.

Implementations

impl<'agent, T> Canister<'agent, T>[src]

pub fn interface_(&self) -> &T[src]

Get the interface object from this canister. Sometimes those interfaces might have custom methods that are useful.

pub fn update_<'canister>(
    &'canister self,
    method_name: &str
) -> AsyncCallBuilder<'agent, 'canister, T>
[src]

Create an AsyncCallBuilder to do an update call.

impl<'agent> Canister<'agent, ()>[src]

pub fn builder() -> CanisterBuilder<'agent, ()>[src]

Create a CanisterBuilder instance to build a canister abstraction.

impl<'agent> Canister<'agent, ManagementCanister>[src]

pub fn canister_status<'canister: 'agent>(
    &'canister self,
    canister_id: &Principal
) -> impl 'agent + AsyncCall<(CanisterStatus,)>
[src]

Get the status of a canister.

pub fn create_canister<'canister: 'agent>(
    &'canister self
) -> impl 'agent + AsyncCall<(Principal,)>
[src]

Create a canister, returning a caller that returns a Canister Id.

pub fn delete_canister<'canister: 'agent>(
    &'canister self,
    canister_id: &Principal
) -> impl 'agent + AsyncCall<()>
[src]

Deletes a canister.

pub fn start_canister<'canister: 'agent>(
    &'canister self,
    canister_id: &Principal
) -> impl 'agent + AsyncCall<()>
[src]

Starts a canister.

pub fn stop_canister<'canister: 'agent>(
    &'canister self,
    canister_id: &Principal
) -> impl 'agent + AsyncCall<()>
[src]

Stop a canister.

pub fn install_code<'canister: 'agent>(
    &'canister self,
    canister_id: &Principal,
    wasm: &'canister [u8]
) -> InstallCodeBuilder<'agent, 'canister, ManagementCanister>
[src]

Install a canister, with all the arguments necessary for creating the canister.

Auto Trait Implementations

impl<'agent, T = ()> !RefUnwindSafe for Canister<'agent, T>

impl<'agent, T> Send for Canister<'agent, T> where
    T: Send

impl<'agent, T> Sync for Canister<'agent, T> where
    T: Sync

impl<'agent, T> Unpin for Canister<'agent, T> where
    T: Unpin

impl<'agent, T = ()> !UnwindSafe for Canister<'agent, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,