pub struct CloudClient { /* private fields */ }
Expand description
Redis Cloud API client
Implementations§
Source§impl CloudClient
impl CloudClient
Sourcepub fn builder() -> CloudClientBuilder
pub fn builder() -> CloudClientBuilder
Create a new builder for the client
Sourcepub async fn get<T: DeserializeOwned>(&self, path: &str) -> Result<T>
pub async fn get<T: DeserializeOwned>(&self, path: &str) -> Result<T>
Make a GET request with API key authentication
Sourcepub async fn post<B: Serialize, T: DeserializeOwned>(
&self,
path: &str,
body: &B,
) -> Result<T>
pub async fn post<B: Serialize, T: DeserializeOwned>( &self, path: &str, body: &B, ) -> Result<T>
Make a POST request
Sourcepub async fn put<B: Serialize, T: DeserializeOwned>(
&self,
path: &str,
body: &B,
) -> Result<T>
pub async fn put<B: Serialize, T: DeserializeOwned>( &self, path: &str, body: &B, ) -> Result<T>
Make a PUT request
Sourcepub async fn get_raw(&self, path: &str) -> Result<Value>
pub async fn get_raw(&self, path: &str) -> Result<Value>
Execute raw GET request returning JSON Value
Sourcepub async fn post_raw(&self, path: &str, body: Value) -> Result<Value>
pub async fn post_raw(&self, path: &str, body: Value) -> Result<Value>
Execute raw POST request with JSON body
Sourcepub async fn put_raw(&self, path: &str, body: Value) -> Result<Value>
pub async fn put_raw(&self, path: &str, body: Value) -> Result<Value>
Execute raw PUT request with JSON body
Sourcepub async fn patch_raw(&self, path: &str, body: Value) -> Result<Value>
pub async fn patch_raw(&self, path: &str, body: Value) -> Result<Value>
Execute raw PATCH request with JSON body
Sourcepub async fn delete_raw(&self, path: &str) -> Result<Value>
pub async fn delete_raw(&self, path: &str) -> Result<Value>
Execute raw DELETE request returning any response body
Trait Implementations§
Source§impl Clone for CloudClient
impl Clone for CloudClient
Source§fn clone(&self) -> CloudClient
fn clone(&self) -> CloudClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for CloudClient
impl !RefUnwindSafe for CloudClient
impl Send for CloudClient
impl Sync for CloudClient
impl Unpin for CloudClient
impl !UnwindSafe for CloudClient
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