[][src]Trait misskey_core::Client

pub trait Client {
    type Error: Error;
    fn request<'a, R>(
        &'a self,
        request: R
    ) -> BoxFuture<'a, Result<ApiResult<R::Response>, Self::Error>>
    where
        R: Request + 'a
; }

Abstraction over API clients.

Associated Types

type Error: Error

The error type produced by the client when an error occurs.

Loading content...

Required methods

fn request<'a, R>(
    &'a self,
    request: R
) -> BoxFuture<'a, Result<ApiResult<R::Response>, Self::Error>> where
    R: Request + 'a, 

Dispatch an API request.

Takes Request and returns a future that waits for the Response.

Loading content...

Implementors

Loading content...