pub struct Client { /* private fields */ }Expand description
Represents a (Hyper) HTTP client.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(token: &str, server_url: &str) -> Self
pub fn new(token: &str, server_url: &str) -> Self
Create a new instance
§Fields
token: provide the 1Password Connect API token.server_url: provide full URL to the host server, i.e.http://localhost:8080
Trait Implementations§
Source§impl HTTPClient for Client
impl HTTPClient for Client
Source§fn send_request<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait, T>(
&'life0 self,
method: &'life1 str,
endpoint: &'life2 str,
params: &'life3 [(&'life4 str, &'life5 str)],
body: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(T, Value), Error>> + Send + 'async_trait>>where
T: DeserializeOwned + Debug + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn send_request<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait, T>(
&'life0 self,
method: &'life1 str,
endpoint: &'life2 str,
params: &'life3 [(&'life4 str, &'life5 str)],
body: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(T, Value), Error>> + Send + 'async_trait>>where
T: DeserializeOwned + Debug + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Send a request using the underlying HTTP client
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