pub trait SocketClient {
// Required methods
fn with_config(config: Arc<Config>) -> Self;
fn connect(&mut self) -> Result<()>;
fn disconnect(&mut self) -> Result<()>;
fn insert(&self, storage_item: StorageItem);
fn update(&mut self, key: &str, storage_item: StorageItem) -> Result<()>;
fn get(&mut self, key: &str) -> Result<StorageItem>;
fn remove(&self, key: &str) -> bool;
fn keys(&self) -> Vec<String>;
fn clear(&self);
fn flush(&self);
}
Required Methods§
fn with_config(config: Arc<Config>) -> Self
fn connect(&mut self) -> Result<()>
fn disconnect(&mut self) -> Result<()>
fn insert(&self, storage_item: StorageItem)
fn update(&mut self, key: &str, storage_item: StorageItem) -> Result<()>
fn get(&mut self, key: &str) -> Result<StorageItem>
fn remove(&self, key: &str) -> bool
fn keys(&self) -> Vec<String>
fn clear(&self)
fn flush(&self)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.