[][src]Struct ic_utils::canister::CanisterBuilder

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

A canister builder, which can be used to create a canister abstraction.

Implementations

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

pub fn with_canister_id<E, P>(self, canister_id: P) -> Self where
    E: Error,
    P: TryInto<Principal, Error = E>, 
[src]

Attach a canister ID to this canister.

pub fn with_agent(self, agent: &'agent Agent) -> Self[src]

Assign an agent to the canister being built.

pub fn build(self) -> Result<Canister<'agent, T>, CanisterBuilderError>[src]

Create this canister abstraction after passing in all the necessary state.

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

pub fn new() -> CanisterBuilder<'static, ()>[src]

Create a canister builder with no value.

pub fn with_interface<T>(self, interface: T) -> CanisterBuilder<'agent, T>[src]

Apply an interface to this canister. An interface can add methods to the canister's type. For example, see the Management Canister.

Trait Implementations

impl Default for CanisterBuilder<'static, ()>[src]

Auto Trait Implementations

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

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

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

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

impl<'agent, T = ()> !UnwindSafe for CanisterBuilder<'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>,