pub struct Client<C>{ /* private fields */ }Implementations§
Source§impl<C> Client<C>
impl<C> Client<C>
pub fn new( connector: C, endpoint: String, credentials: Option<Credentials>, ) -> Self
pub fn builder() -> Builder<C>
pub fn set_endpoint(&mut self, endpoint: String)
pub fn set_credentials(&mut self, credentials: Option<Credentials>)
pub fn inner(&self) -> &Client<C>
Trait Implementations§
Source§impl Default for Client<HttpsConnector<HttpConnector<GaiResolver>>>
impl Default for Client<HttpsConnector<HttpConnector<GaiResolver>>>
Source§impl From<Credentials> for Client<HttpsConnector<HttpConnector<GaiResolver>>>
impl From<Credentials> for Client<HttpsConnector<HttpConnector<GaiResolver>>>
Source§fn from(credentials: Credentials) -> Self
fn from(credentials: Credentials) -> Self
Converts to this type from the input type.
Source§impl<C> Request for Client<C>
impl<C> Request for Client<C>
type Error = ClientError
fn request<'life0, 'life1, 'life2, 'life3, 'async_trait, T, U>( &'life0 self, method: &'life1 Method, endpoint: &'life2 str, payload: &'life3 T, ) -> Pin<Box<dyn Future<Output = Result<U, Self::Error>> + Send + 'async_trait>>
fn execute<'life0, 'async_trait>(
&'life0 self,
request: Request<Body>,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl<C> RestClient for Client<C>
impl<C> RestClient for Client<C>
type Error = ClientError
fn get<'life0, 'life1, 'async_trait, T>(
&'life0 self,
endpoint: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<T, Self::Error>> + Send + 'async_trait>>where
T: DeserializeOwned + Debug + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn post<'life0, 'life1, 'life2, 'async_trait, T, U>( &'life0 self, endpoint: &'life1 str, payload: &'life2 T, ) -> Pin<Box<dyn Future<Output = Result<U, Self::Error>> + Send + 'async_trait>>
fn put<'life0, 'life1, 'life2, 'async_trait, T, U>( &'life0 self, endpoint: &'life1 str, payload: &'life2 T, ) -> Pin<Box<dyn Future<Output = Result<U, Self::Error>> + Send + 'async_trait>>
fn patch<'life0, 'life1, 'life2, 'async_trait, T, U>( &'life0 self, endpoint: &'life1 str, payload: &'life2 T, ) -> Pin<Box<dyn Future<Output = Result<U, Self::Error>> + Send + 'async_trait>>
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
endpoint: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl<C> Freeze for Client<C>where
C: Freeze,
impl<C> !RefUnwindSafe for Client<C>
impl<C> Send for Client<C>
impl<C> Sync for Client<C>
impl<C> Unpin for Client<C>where
C: Unpin,
impl<C> !UnwindSafe for Client<C>
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