[][src]Trait misskey::Client

pub trait Client {
    type Error: Error;
    pub fn request<R>(
        &self,
        request: R
    ) -> Pin<Box<dyn Future<Output = Result<ApiResult<<R as Request>::Response>, Self::Error>> + Send, Global>>
    where
        R: Request
; }

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>(
    &self,
    request: R
) -> Pin<Box<dyn Future<Output = Result<ApiResult<<R as Request>::Response>, Self::Error>> + Send, Global>> where
    R: Request
[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 for &'_ mut C where
    C: Client + ?Sized
[src]

type Error = <C as Client>::Error

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

type Error = <C as Client>::Error

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

type Error = <C as Client>::Error

Loading content...

Implementors

impl Client for HttpClient[src]

type Error = Error

impl Client for WebSocketClient[src]

type Error = Error

Loading content...