pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub fn new( client: Client, endpoint: String, credentials: Option<Credentials>, ) -> Self
pub fn builder() -> Builder
pub fn set_endpoint(&mut self, endpoint: String)
pub fn set_credentials(&mut self, credentials: Option<Credentials>)
pub fn inner(&self) -> &Client
Trait Implementations§
Source§impl From<Credentials> for Client
impl From<Credentials> for Client
Source§fn from(credentials: Credentials) -> Self
fn from(credentials: Credentials) -> Self
Converts to this type from the input type.
Source§impl Request for Client
impl Request for Client
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,
) -> Pin<Box<dyn Future<Output = Result<Response, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl RestClient for Client
impl RestClient for Client
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 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