pub struct Client {
pub client: Client,
pub token: Option<String>,
pub hostname: String,
pub password: String,
pub username: String,
}
Fields§
§client: Client
§token: Option<String>
§hostname: String
§password: String
§username: String
Implementations§
Source§impl Client
impl Client
pub fn new(hostname: String, username: String, password: String) -> Self
pub fn get_session_url(&self) -> String
pub fn build_url(&self, endpoint: &str) -> String
pub async fn request(&mut self, action: Action) -> Result<Response>
pub async fn request_and_parse<T>(&mut self, action: Action) -> Result<T>where
T: for<'de> Deserialize<'de>,
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