Skip to main content

Client

Trait Client 

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

    // Required method
    fn req(
        &self,
        request: Request<Vec<u8>>,
    ) -> impl Future<Output = Result<Response<Vec<u8>>, <Self as Client>::Error>> + Send + use<Self>;
}
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>>, ) -> impl Future<Output = Result<Response<Vec<u8>>, <Self as Client>::Error>> + Send + use<Self>

Send a request

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

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>>, ) -> impl Future<Output = Result<Response<Vec<u8>>, Self::Error>> + Send + use<>

Implementors§