Struct ic_utils::canister::AsyncCallBuilder[][src]

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

A builder for an asynchronous call (ie. update) to the Internet Computer.

See AsyncCaller for a description of this structure.

Implementations

impl<'agent, 'canister: 'agent, Interface> AsyncCallBuilder<'agent, 'canister, Interface>[src]

pub fn with_arg<Argument>(
    self,
    arg: Argument
) -> AsyncCallBuilder<'agent, 'canister, Interface> where
    Argument: CandidType + Sync + Send
[src]

Add an argument to the candid argument list. This requires Candid arguments, if there is a raw argument set (using [with_arg_raw]), this will fail.

pub fn with_arg_raw(
    self,
    arg: Vec<u8>
) -> AsyncCallBuilder<'agent, 'canister, Interface>
[src]

Replace the argument with raw argument bytes. This will overwrite the current argument set, so calling this method twice will discard the first argument.

pub fn with_effective_canister_id(
    self,
    canister_id: Principal
) -> AsyncCallBuilder<'agent, 'canister, Interface>
[src]

pub fn build<Output>(self) -> AsyncCaller<'canister, Output> where
    Output: for<'de> ArgumentDecoder<'de> + Send + Sync
[src]

Builds an AsyncCaller from this builder’s state.

Auto Trait Implementations

impl<'agent, 'canister, T> !RefUnwindSafe for AsyncCallBuilder<'agent, 'canister, T>

impl<'agent, 'canister, T> Send for AsyncCallBuilder<'agent, 'canister, T> where
    T: Sync

impl<'agent, 'canister, T> Sync for AsyncCallBuilder<'agent, 'canister, T> where
    T: Sync

impl<'agent, 'canister, T> Unpin for AsyncCallBuilder<'agent, 'canister, T> where
    'agent: 'canister, 

impl<'agent, 'canister, T> !UnwindSafe for AsyncCallBuilder<'agent, 'canister, T>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

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

Immutably borrows from an owned value. Read more

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

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

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

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

fn in_current_span(self) -> Instrumented<Self>[src]

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

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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

pub fn vzip(self) -> V