pub struct KvNamespaceClient {
pub account_id: String,
pub api_key: String,
pub namespace_id: String,
/* private fields */
}Fields§
§account_id: String§api_key: String§namespace_id: StringImplementations§
Source§impl KvNamespaceClient
impl KvNamespaceClient
pub fn new(account_id: &str, api_key: &str, namespace_id: &str) -> Self
pub fn from_kvclient(kvclient: &KvClient, namespace_id: &str) -> Self
pub async fn delete_namespace(&self) -> Result<(), Box<dyn Error>>
pub async fn rename_namespace( &self, new_title: &str, ) -> Result<(), Box<dyn Error>>
pub async fn write(&self, payload: KvRequest) -> Result<(), Box<dyn Error>>
pub async fn write_multiple( &self, payload: Vec<KvRequest>, ) -> Result<(), Box<dyn Error>>
pub async fn delete(&self, key: &str) -> Result<(), Box<dyn Error>>
pub async fn delete_multiple( &self, keys: Vec<&str>, ) -> Result<(), Box<dyn Error>>
pub async fn list_all_keys(&self) -> Result<Vec<String>, Box<dyn Error>>
pub async fn read_metadata(&self, key: &str) -> Result<Value, Box<dyn Error>>
pub async fn get(&self, key: &str) -> Result<String, Box<dyn Error>>
Trait Implementations§
Source§impl Clone for KvNamespaceClient
impl Clone for KvNamespaceClient
Source§fn clone(&self) -> KvNamespaceClient
fn clone(&self) -> KvNamespaceClient
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 KvNamespaceClient
impl !RefUnwindSafe for KvNamespaceClient
impl Send for KvNamespaceClient
impl Sync for KvNamespaceClient
impl Unpin for KvNamespaceClient
impl !UnwindSafe for KvNamespaceClient
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