Trait torn_api::send::ApiClient

source ·
pub trait ApiClient: Send + Sync {
    type Error: Error + Sync + Send;

    // Required method
    fn request<'life0, 'async_trait>(
        &'life0 self,
        url: String
    ) -> Pin<Box<dyn Future<Output = Result<Value, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn torn_api<S>(&self, key: S) -> ApiProvider<'_, Self, DirectExecutor<Self>>
       where Self: Sized,
             S: ToString { ... }
}

Required Associated Types§

Required Methods§

source

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

Provided Methods§

source

fn torn_api<S>(&self, key: S) -> ApiProvider<'_, Self, DirectExecutor<Self>>where Self: Sized, S: ToString,

Implementations on Foreign Types§

source§

impl ApiClient for Client

§

type Error = Error

source§

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

Implementors§