twitch_oauth2::client

Trait Client

Source
pub trait Client: Sync + Send {
    type Error: Error + Send + Sync + 'static;

    // Required method
    fn req(
        &self,
        request: Request<Vec<u8>>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Vec<u8>>, <Self as Client>::Error>> + Send + '_>>;
}
Available on crate feature client only.
Expand description

A client that can do OAUTH2 requests

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Error returned by the client

Required Methods§

Source

fn req( &self, request: Request<Vec<u8>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Vec<u8>>, <Self as Client>::Error>> + Send + '_>>

Send a request

Implementations on Foreign Types§

Source§

impl Client for Client

Available on crate feature reqwest only.
Source§

type Error = Error

Source§

fn req( &self, request: Request<Vec<u8>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Vec<u8>>, Self::Error>> + Send + '_>>

Source§

impl Client for Client

Available on crate feature surf only.
Source§

type Error = SurfError

Source§

fn req( &self, request: Request<Vec<u8>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Vec<u8>>, Self::Error>> + Send + '_>>

Implementors§