pub trait C5Store {
// Required methods
fn get(&self, key_path: &str) -> Option<C5DataValue>;
fn get_ref(&self, key_path: &str) -> Option<C5StoreDataValueRef<'_>>;
fn get_into<Val>(&self, key_path: &str) -> Result<Val, ConfigError>
where C5DataValue: TryInto<Val, Error = ConfigError>;
fn get_into_struct<Val>(&self, key_path: &str) -> Result<Val, ConfigError>
where Val: DeserializeOwned;
fn exists(&self, key_path: &str) -> bool;
fn path_exists(&self, key: &str) -> bool;
fn subscribe(&self, key_path: &str, listener: Box<ChangeListener>);
fn subscribe_detailed(
&self,
key_path: &str,
listener: Box<DetailedChangeListener>,
);
fn branch(&self, key_path: &str) -> C5StoreBranch;
fn key_paths_with_prefix(&self, key_path: Option<&str>) -> Vec<String>;
fn current_key_path(&self) -> &str;
fn get_source(&self, key_path: &str) -> Option<ConfigSource>;
}Required Methods§
fn get(&self, key_path: &str) -> Option<C5DataValue>
fn get_ref(&self, key_path: &str) -> Option<C5StoreDataValueRef<'_>>
fn get_into<Val>(&self, key_path: &str) -> Result<Val, ConfigError>
fn get_into_struct<Val>(&self, key_path: &str) -> Result<Val, ConfigError>where
Val: DeserializeOwned,
fn exists(&self, key_path: &str) -> bool
fn path_exists(&self, key: &str) -> bool
fn subscribe(&self, key_path: &str, listener: Box<ChangeListener>)
fn subscribe_detailed( &self, key_path: &str, listener: Box<DetailedChangeListener>, )
fn branch(&self, key_path: &str) -> C5StoreBranch
fn key_paths_with_prefix(&self, key_path: Option<&str>) -> Vec<String>
fn current_key_path(&self) -> &str
fn get_source(&self, key_path: &str) -> Option<ConfigSource>
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.