pub struct Client {
pub api_url: String,
pub user_agent: String,
/* private fields */
}
Fields§
§api_url: String
§user_agent: String
Implementations§
Source§impl Client
impl Client
pub fn new(config: Config) -> Self
pub fn new_from_env() -> Self
pub fn api_url(self, value: String) -> Self
pub fn user_agent(self, value: String) -> Self
pub async fn get_response<T: DeserializeOwned>( &mut self, uri: &str, ) -> Result<T, RequestError>
pub async fn authenticate( &mut self, ) -> Result<AuthenticateResponse, RequestError>
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