pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub fn new(base_url: Url) -> Self
pub fn into_authenticated<A: Authorization + Sync>( self, authorization: A, ) -> AuthenticatedClient<Self, A>
Trait Implementations§
Source§impl Client for Client
impl Client for Client
Source§type ClientError = ReqwestClientError
type ClientError = ReqwestClientError
An error that can be returned during request execution by the
Client.Source§fn execute<'life0, 'async_trait, R>(
&'life0 self,
request: R,
) -> Pin<Box<dyn Future<Output = Result<R::Response, Self::ClientError>> + 'async_trait>>where
R: 'async_trait + HttpRequest + Send,
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait, R>(
&'life0 self,
request: R,
) -> Pin<Box<dyn Future<Output = Result<R::Response, Self::ClientError>> + 'async_trait>>where
R: 'async_trait + HttpRequest + Send,
Self: 'async_trait,
'life0: 'async_trait,
Execute a
http_request_derive::HttpRequest, and read the typed response.Source§impl IsAuthenticated for Client
impl IsAuthenticated for Client
fn is_authenticated(&self) -> bool
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin 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