pub trait ApiService {
// Required methods
fn with_config(storage: Storage, config: Arc<Config>) -> Self;
fn start(
&self,
server_shutdown: Arc<AtomicBool>,
signal_server_ready: Sender<()>,
) -> Result<(), String>;
fn stop(&self);
fn keys(&self) -> Vec<String>;
fn set_item(&self, key: &str, item: StorageItem) -> bool;
fn get_item(&self, key: &str) -> Option<StorageItem>;
fn remove_item(&self, key: &str) -> bool;
}Required Methods§
fn with_config(storage: Storage, config: Arc<Config>) -> Self
fn start( &self, server_shutdown: Arc<AtomicBool>, signal_server_ready: Sender<()>, ) -> Result<(), String>
fn stop(&self)
fn keys(&self) -> Vec<String>
fn set_item(&self, key: &str, item: StorageItem) -> bool
fn get_item(&self, key: &str) -> Option<StorageItem>
fn remove_item(&self, key: &str) -> bool
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.