HttpClient

Trait HttpClient 

Source
pub trait HttpClient {
    // Required methods
    fn delete(
        &self,
        uri: &str,
        token: &Option<String>,
    ) -> impl Future<Output = AgdbApiResult<u16>> + Send;
    fn get<T: DeserializeOwned + Send>(
        &self,
        uri: &str,
        token: &Option<String>,
    ) -> impl Future<Output = AgdbApiResult<(u16, T)>> + Send;
    fn post<T: Serialize + Send, R: DeserializeOwned + Send>(
        &self,
        uri: &str,
        json: Option<T>,
        token: &Option<String>,
    ) -> impl Future<Output = AgdbApiResult<(u16, R)>> + Send;
    fn put<T: Serialize + Send>(
        &self,
        uri: &str,
        json: Option<T>,
        token: &Option<String>,
    ) -> impl Future<Output = AgdbApiResult<u16>> + Send;
}

Required Methods§

Source

fn delete( &self, uri: &str, token: &Option<String>, ) -> impl Future<Output = AgdbApiResult<u16>> + Send

Source

fn get<T: DeserializeOwned + Send>( &self, uri: &str, token: &Option<String>, ) -> impl Future<Output = AgdbApiResult<(u16, T)>> + Send

Source

fn post<T: Serialize + Send, R: DeserializeOwned + Send>( &self, uri: &str, json: Option<T>, token: &Option<String>, ) -> impl Future<Output = AgdbApiResult<(u16, R)>> + Send

Source

fn put<T: Serialize + Send>( &self, uri: &str, json: Option<T>, token: &Option<String>, ) -> impl Future<Output = AgdbApiResult<u16>> + 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§