[][src]Trait misskey_core::Client

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

Abstraction over API clients.

Associated Types

type Error: Error[src]

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

Loading content...

Required methods

pub fn request<R: Request>(
    &self,
    request: R
) -> BoxFuture<'_, Result<ApiResult<R::Response>, Self::Error>>
[src]

Dispatch an API request.

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

Loading content...

Implementations on Foreign Types

impl<C: Client + ?Sized, '_> Client for &'_ C[src]

type Error = C::Error

impl<C: Client + ?Sized, '_> Client for &'_ mut C[src]

type Error = C::Error

impl<C: Client + ?Sized> Client for Box<C>[src]

type Error = C::Error

Loading content...

Implementors

Loading content...