pub struct Client { /* private fields */ }
Implementations§
Source§impl Client
impl Client
pub fn builder() -> ClientBuilder
pub fn get<'de, E: Endpoint<'de>>( &self, params: E::Parameters, ) -> Result<ParsedResponse<E::ReturnType>, Error>
Sourcepub fn get_custom_return_type<'a, 'b, E: Endpoint<'a>, R: Deserialize<'b>>(
&self,
params: E::Parameters,
) -> Result<ParsedResponse<R>, Error>
pub fn get_custom_return_type<'a, 'b, E: Endpoint<'a>, R: Deserialize<'b>>( &self, params: E::Parameters, ) -> Result<ParsedResponse<R>, Error>
This method is here to allow users of this library to change the type the response is parsed as.
Use Client::get
where possible to use the regular types.
Use serde_json::Value
as R
to parse any valid response.
Sourcepub fn get_url<'de, R>(&self, url: Url) -> Result<ParsedResponse<R>, Error>where
R: Deserialize<'de>,
pub fn get_url<'de, R>(&self, url: Url) -> Result<ParsedResponse<R>, Error>where
R: Deserialize<'de>,
This method only modifies the given url in that it will add the user token if applicable
Trait Implementations§
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