pub trait HttpClient {
// Required methods
async fn delete(
&self,
uri: &str,
token: &Option<String>,
) -> AgdbApiResult<u16>;
async fn get<T: DeserializeOwned + Send>(
&self,
uri: &str,
token: &Option<String>,
) -> AgdbApiResult<(u16, T)>;
async fn post<T: Serialize, R: DeserializeOwned + Send>(
&self,
uri: &str,
json: &Option<T>,
token: &Option<String>,
) -> AgdbApiResult<(u16, R)>;
async fn put<T: Serialize>(
&self,
uri: &str,
json: &Option<T>,
token: &Option<String>,
) -> AgdbApiResult<u16>;
}Required Methods§
async fn delete(&self, uri: &str, token: &Option<String>) -> AgdbApiResult<u16>
async fn get<T: DeserializeOwned + Send>( &self, uri: &str, token: &Option<String>, ) -> AgdbApiResult<(u16, T)>
async fn post<T: Serialize, R: DeserializeOwned + Send>( &self, uri: &str, json: &Option<T>, token: &Option<String>, ) -> AgdbApiResult<(u16, R)>
async fn put<T: Serialize>( &self, uri: &str, json: &Option<T>, token: &Option<String>, ) -> AgdbApiResult<u16>
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.