pub struct Client { /* private fields */ }Expand description
The main entry point into this crate. Hold the access token
currently base_url needs to be post fixed with /api for
this library to actually work.
TODO: that should be fixed.
Implementations§
Source§impl Client
impl Client
Sourcepub fn call<R: Request>(&self, request: R) -> Result<R::Response>
pub fn call<R: Request>(&self, request: R) -> Result<R::Response>
This is our generic calling function for the API, the error handling is somewhat ass since it doesn’t use https://docs.rs/ureq/latest/ureq/enum.Error.html#examples because the error enum in this repository somehow caused an inifinite loop with the transformations.
TODO: The error should properly parse the actually useful error responses from the API.
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