pub struct Client {
pub host: String,
pub port: u16,
pub auth_token: String,
pub timeout: u8,
}Fields§
§host: String§port: u16§auth_token: String§timeout: u8Implementations§
Source§impl Client
impl Client
pub fn new( host: String, port: u16, auth_token: String, timeout: u8, ) -> Box<Client>
pub async fn get( &self, uri: String, headers: Option<HeaderMap>, ) -> Result<Response, Box<dyn Error>>
pub async fn post( &self, uri: String, headers: Option<HeaderMap>, body: Option<HashMap<String, String>>, ) -> Result<Response, Box<dyn Error>>
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