multiversx_sdk::gateway

Trait GatewayAsyncService

Source
pub trait GatewayAsyncService {
    type Instant;

    // Required methods
    fn from_uri(uri: &str) -> Self;
    fn request<G>(&self, request: G) -> impl Future<Output = Result<G::Result>>
       where G: GatewayRequest;
    fn sleep(&self, millis: u64) -> impl Future<Output = ()>;
    fn now(&self) -> Self::Instant;
    fn elapsed_seconds(&self, instant: &Self::Instant) -> f32;
}

Required Associated Types§

Source

type Instant

Keeps track of elapsed time.

Required Methods§

Source

fn from_uri(uri: &str) -> Self

Source

fn request<G>(&self, request: G) -> impl Future<Output = Result<G::Result>>
where G: GatewayRequest,

Source

fn sleep(&self, millis: u64) -> impl Future<Output = ()>

Source

fn now(&self) -> Self::Instant

Source

fn elapsed_seconds(&self, instant: &Self::Instant) -> f32

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§