pub trait GatewayClient: Send + Sync {
    type Owned: GatewayClient;

    // Required methods
    fn get_gateway_url(&self) -> &str;
    fn with_appended_url(&self, url: &str) -> Self::Owned;
    fn get<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn post<'life0, 'life1, 'async_trait, Body>(
        &'life0 self,
        body: &'life1 Body
    ) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Body: Serialize + Send + Sync + 'async_trait,
             Self: 'async_trait;
}

Required Associated Types§

Required Methods§

source

fn get_gateway_url(&self) -> &str

source

fn with_appended_url(&self, url: &str) -> Self::Owned

source

fn get<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>>where 'life0: 'async_trait, Self: 'async_trait,

source

fn post<'life0, 'life1, 'async_trait, Body>( &'life0 self, body: &'life1 Body ) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>>where 'life0: 'async_trait, 'life1: 'async_trait, Body: Serialize + Send + Sync + 'async_trait, Self: 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> GatewayClient for Twhere T: Borrow<str> + Send + Sync + ?Sized,