Struct ic_utils::call::AsyncCaller[][src]

pub struct AsyncCaller<'agent, Out> where
    Out: for<'de> ArgumentDecoder<'de> + Send + Sync
{ /* fields omitted */ }

An async caller, encapsulating a call to an update method.

Implementations

impl<'agent, Out> AsyncCaller<'agent, Out> where
    Out: for<'de> ArgumentDecoder<'de> + Send + Sync
[src]

pub fn build_call(self) -> Result<UpdateBuilder<'agent>, AgentError>[src]

Build an UpdateBuilder call that can be used directly with the Agent. This is essentially downleveling this type into the lower level [ic-agent] abstraction.

pub async fn call(self) -> Result<RequestId, AgentError>[src]

Perform this call and returns .

pub async fn call_and_wait<W>(self, waiter: W) -> Result<Out, AgentError> where
    W: Waiter
[src]

pub async fn call_and_wait_one<W, T>(self, waiter: W) -> Result<T, AgentError> where
    W: Waiter,
    T: DeserializeOwned
[src]

pub fn map<Out2, Map>(self, map: Map) -> MappedAsyncCaller<Out, Out2, Self, Map> where
    Out2: for<'de> ArgumentDecoder<'de> + Send + Sync,
    Map: Sync + Send + Fn(Out) -> Out2, 
[src]

Trait Implementations

impl<'agent, Out> AsyncCall<Out> for AsyncCaller<'agent, Out> where
    Out: for<'de> ArgumentDecoder<'de> + Send + Sync
[src]

Auto Trait Implementations

impl<'agent, Out> !RefUnwindSafe for AsyncCaller<'agent, Out>

impl<'agent, Out> Send for AsyncCaller<'agent, Out>

impl<'agent, Out> Sync for AsyncCaller<'agent, Out>

impl<'agent, Out> Unpin for AsyncCaller<'agent, Out> where
    Out: Unpin

impl<'agent, Out> !UnwindSafe for AsyncCaller<'agent, Out>

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> Instrument 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>,