pub struct ReqwestClient {
pub client: Client,
}Fields§
§client: ClientImplementations§
Source§impl ReqwestClient
impl ReqwestClient
pub fn new() -> Self
pub fn with_client(client: Client) -> Self
Trait Implementations§
Source§impl HttpClient for ReqwestClient
impl HttpClient for ReqwestClient
async fn delete(&self, uri: &str, token: &Option<String>) -> AgdbApiResult<u16>
async fn get<T: DeserializeOwned>( &self, uri: &str, token: &Option<String>, ) -> AgdbApiResult<(u16, T)>
async fn post<T: Serialize, R: DeserializeOwned>( &self, uri: &str, json: Option<T>, token: &Option<String>, ) -> AgdbApiResult<(u16, R)>
async fn put<T: Serialize + Send>( &self, uri: &str, json: Option<T>, token: &Option<String>, ) -> AgdbApiResult<u16>
Auto Trait Implementations§
impl Freeze for ReqwestClient
impl !RefUnwindSafe for ReqwestClient
impl Send for ReqwestClient
impl Sync for ReqwestClient
impl Unpin for ReqwestClient
impl !UnwindSafe for ReqwestClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more