Trait ic_utils::call::SyncCall[][src]

pub trait SyncCall<O> where
    O: for<'de> ArgumentDecoder<'de> + Send
{ #[must_use] fn call<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = Result<O, AgentError>> + Send + 'async_trait>>
    where
        Self: Sized + Send,
        O: 'async_trait,
        Self: 'async_trait
; }
Expand description

A type that implements synchronous calls (ie. ‘query’ calls).

Required methods

#[must_use]
fn call<'async_trait>(
    self
) -> Pin<Box<dyn Future<Output = Result<O, AgentError>> + Send + 'async_trait>> where
    Self: Sized + Send,
    O: 'async_trait,
    Self: 'async_trait, 
[src]

Execute the call, returning either the value returned by the canister, or an error returned by the Agent.

Implementors

impl<'agent, Out> SyncCall<Out> for SyncCaller<'agent, Out> where
    Self: Sized,
    Out: 'agent + for<'de> ArgumentDecoder<'de> + Send
[src]

fn call<'async_trait>(
    self
) -> Pin<Box<dyn Future<Output = Result<Out, AgentError>> + Send + 'async_trait>> where
    Self: 'async_trait, 
[src]