Struct ic_utils::call::SyncCaller

source ·
pub struct SyncCaller<'agent, Out>
where Out: for<'de> ArgumentDecoder<'de> + Send,
{ /* private fields */ }
Expand description

A synchronous call encapsulation.

Trait Implementations§

source§

impl<'agent, Out> Debug for SyncCaller<'agent, Out>
where Out: for<'de> ArgumentDecoder<'de> + Send + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'agent, Out> IntoFuture for SyncCaller<'agent, Out>
where Self: Sized, Out: 'agent + for<'de> ArgumentDecoder<'de> + Send,

§

type IntoFuture = Pin<Box<dyn Future<Output = Result<Out, AgentError>> + Send + 'agent>>

Which kind of future are we turning this into?
§

type Output = Result<Out, AgentError>

The output that the future will produce on completion.
source§

fn into_future(self) -> Self::IntoFuture

Creates a future from a value. Read more
source§

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

§

type Value = Out

The return type of the Candid function being called.
source§

fn call_raw<'async_trait>( self ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, AgentError>> + Send + 'async_trait>>
where Self: 'async_trait,

Available on crate feature raw only.
Execute the call, return an array of bytes directly from the canister.
source§

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

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

Auto Trait Implementations§

§

impl<'agent, Out> Freeze for SyncCaller<'agent, Out>

§

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

§

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

§

impl<'agent, Out> Sync for SyncCaller<'agent, Out>
where Out: Sync,

§

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

§

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

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

source§

fn vzip(self) -> V