Struct clevercloud_sdk::Client
source · [−]pub struct Client<C> where
C: Connect + Clone + Debug + Send + Sync + 'static, { /* private fields */ }Implementations
sourceimpl<C> Client<C> where
C: Connect + Clone + Debug + Send + Sync + 'static,
impl<C> Client<C> where
C: Connect + Clone + Debug + Send + Sync + 'static,
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>)
Trait Implementations
sourceimpl Default for Client<HttpsConnector<HttpConnector<GaiResolver>>>
impl Default for Client<HttpsConnector<HttpConnector<GaiResolver>>>
sourceimpl From<Credentials> for Client<HttpsConnector<HttpConnector<GaiResolver>>>
impl From<Credentials> for Client<HttpsConnector<HttpConnector<GaiResolver>>>
sourcefn from(credentials: Credentials) -> Self
fn from(credentials: Credentials) -> Self
Converts to this type from the input type.
sourceimpl<C> Request for Client<C> where
C: Connect + Clone + Debug + Send + Sync + 'static,
impl<C> Request for Client<C> where
C: Connect + Clone + Debug + Send + Sync + 'static,
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>> where
T: Serialize + Debug + Send + Sync,
U: DeserializeOwned + Debug + Send + Sync,
T: 'async_trait,
U: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
sourceimpl<C> RestClient for Client<C> where
C: Connect + Clone + Debug + Send + Sync + 'static,
impl<C> RestClient for Client<C> where
C: Connect + Clone + Debug + Send + Sync + 'static,
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,
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: '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>> where
T: Serialize + Debug + Send + Sync,
U: DeserializeOwned + Debug + Send + Sync,
T: 'async_trait,
U: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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>> where
T: Serialize + Debug + Send + Sync,
U: DeserializeOwned + Debug + Send + Sync,
T: 'async_trait,
U: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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>> where
T: Serialize + Debug + Send + Sync,
U: DeserializeOwned + Debug + Send + Sync,
T: 'async_trait,
U: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more