pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub async fn do_get(&self, url: &str) -> Result<Response>
pub async fn do_delete(&self, url: &str) -> Result<Response>
pub async fn do_post( &self, url: &str, content: impl Into<PostContent>, ) -> Result<Response>
pub async fn do_put( &self, url: &str, content: impl Into<PostContent>, ) -> Result<Response>
pub async fn do_patch( &self, url: &str, content: impl Into<PostContent>, ) -> Result<Response>
pub async fn get<T>(&self, url: &str) -> Result<T>where
T: DeserializeOwned,
pub async fn delete<T>(&self, url: &str) -> Result<T>where
T: DeserializeOwned,
pub async fn post<T>(
&self,
url: &str,
content: impl Into<PostContent>,
) -> Result<T>where
T: DeserializeOwned,
pub async fn put<T>(
&self,
url: &str,
content: impl Into<PostContent>,
) -> Result<T>where
T: DeserializeOwned,
pub async fn patch<T>(
&self,
url: &str,
content: impl Into<PostContent>,
) -> Result<T>where
T: DeserializeOwned,
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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