Trait SharedRestClientTrait

Source
pub trait SharedRestClientTrait<RateLimitType: Sync> {
    // Required methods
    fn get_client(&self) -> &Client;
    fn get_signer(&self) -> &dyn SharedSignerTrait;
    fn get_ratelimiter(
        &self,
    ) -> Arc<dyn SharedRatelimiterTrait<RateLimitType> + Sync + Send>;

    // Provided methods
    fn call_with_no_payload<'life0, 'life1, 'async_trait, ResponseType, Err>(
        &'life0 self,
        limits: &'life1 [(RateLimitType, NonZeroU32)],
        signed: bool,
        method: Method,
        url: Url,
    ) -> Pin<Box<dyn Future<Output = Result<ResponseType, SharedRestError<Err>>> + Send + 'async_trait>>
       where ResponseType: 'async_trait + SharedRestResponseTrait,
             Err: 'async_trait + SharedRestClientErrorTrait,
             Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn call_with_no_response<'life0, 'life1, 'life2, 'async_trait, PayloadType, Err>(
        &'life0 self,
        limits: &'life1 [(RateLimitType, NonZeroU32)],
        signed: bool,
        method: Method,
        url: Url,
        payload: Option<&'life2 PayloadType>,
    ) -> Pin<Box<dyn Future<Output = Result<(), SharedRestError<Err>>> + Send + 'async_trait>>
       where PayloadType: 'async_trait + Sync + Send + SharedRestPayloadTrait,
             Err: 'async_trait + SharedRestClientErrorTrait,
             Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn call_with_no_payload_and_response<'life0, 'life1, 'async_trait, Err>(
        &'life0 self,
        limits: &'life1 [(RateLimitType, NonZeroU32)],
        signed: bool,
        method: Method,
        url: Url,
    ) -> Pin<Box<dyn Future<Output = Result<(), SharedRestError<Err>>> + Send + 'async_trait>>
       where Err: 'async_trait + SharedRestClientErrorTrait,
             Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn call<'life0, 'life1, 'life2, 'async_trait, PayloadType, ResponseType, Err>(
        &'life0 self,
        limits: &'life1 [(RateLimitType, NonZeroU32)],
        signed: bool,
        method: Method,
        url: Url,
        payload: Option<&'life2 PayloadType>,
    ) -> Pin<Box<dyn Future<Output = Result<ResponseType, SharedRestError<Err>>> + Send + 'async_trait>>
       where PayloadType: 'async_trait + Sync + Send + SharedRestPayloadTrait,
             ResponseType: 'async_trait + SharedRestResponseTrait,
             Err: 'async_trait + SharedRestClientErrorTrait,
             Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}

Required Methods§

Source

fn get_client(&self) -> &Client

Source

fn get_signer(&self) -> &dyn SharedSignerTrait

Source

fn get_ratelimiter( &self, ) -> Arc<dyn SharedRatelimiterTrait<RateLimitType> + Sync + Send>

Provided Methods§

Source

fn call_with_no_payload<'life0, 'life1, 'async_trait, ResponseType, Err>( &'life0 self, limits: &'life1 [(RateLimitType, NonZeroU32)], signed: bool, method: Method, url: Url, ) -> Pin<Box<dyn Future<Output = Result<ResponseType, SharedRestError<Err>>> + Send + 'async_trait>>
where ResponseType: 'async_trait + SharedRestResponseTrait, Err: 'async_trait + SharedRestClientErrorTrait, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn call_with_no_response<'life0, 'life1, 'life2, 'async_trait, PayloadType, Err>( &'life0 self, limits: &'life1 [(RateLimitType, NonZeroU32)], signed: bool, method: Method, url: Url, payload: Option<&'life2 PayloadType>, ) -> Pin<Box<dyn Future<Output = Result<(), SharedRestError<Err>>> + Send + 'async_trait>>
where PayloadType: 'async_trait + Sync + Send + SharedRestPayloadTrait, Err: 'async_trait + SharedRestClientErrorTrait, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn call_with_no_payload_and_response<'life0, 'life1, 'async_trait, Err>( &'life0 self, limits: &'life1 [(RateLimitType, NonZeroU32)], signed: bool, method: Method, url: Url, ) -> Pin<Box<dyn Future<Output = Result<(), SharedRestError<Err>>> + Send + 'async_trait>>
where Err: 'async_trait + SharedRestClientErrorTrait, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn call<'life0, 'life1, 'life2, 'async_trait, PayloadType, ResponseType, Err>( &'life0 self, limits: &'life1 [(RateLimitType, NonZeroU32)], signed: bool, method: Method, url: Url, payload: Option<&'life2 PayloadType>, ) -> Pin<Box<dyn Future<Output = Result<ResponseType, SharedRestError<Err>>> + Send + 'async_trait>>
where PayloadType: 'async_trait + Sync + Send + SharedRestPayloadTrait, ResponseType: 'async_trait + SharedRestResponseTrait, Err: 'async_trait + SharedRestClientErrorTrait, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

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§