Request

Trait Request 

Source
pub trait Request {
    // Required methods
    fn new(access_token: String) -> Self;
    fn post<T: Serialize + Send, A: Serialize + Send + Sized>(
        &self,
        url: &str,
        method: &str,
        query: A,
        body: T,
    ) -> impl Future<Output = Result<Value, Error>> + Send;
    fn get<T: Serialize + Send, A: Serialize + Send + Sized>(
        &self,
        url: &str,
        method: &str,
        query: A,
        body: T,
    ) -> impl Future<Output = Result<Value, Error>> + Send;
}

Required Methods§

Source

fn new(access_token: String) -> Self

Source

fn post<T: Serialize + Send, A: Serialize + Send + Sized>( &self, url: &str, method: &str, query: A, body: T, ) -> impl Future<Output = Result<Value, Error>> + Send

Source

fn get<T: Serialize + Send, A: Serialize + Send + Sized>( &self, url: &str, method: &str, query: A, body: T, ) -> impl Future<Output = Result<Value, Error>> + Send

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.

Implementors§