C5Store

Trait C5Store 

Source
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§

Source

fn get(&self, key_path: &str) -> Option<C5DataValue>

Source

fn get_ref(&self, key_path: &str) -> Option<C5StoreDataValueRef<'_>>

Source

fn get_into<Val>(&self, key_path: &str) -> Result<Val, ConfigError>
where C5DataValue: TryInto<Val, Error = ConfigError>,

Source

fn get_into_struct<Val>(&self, key_path: &str) -> Result<Val, ConfigError>
where Val: DeserializeOwned,

Source

fn exists(&self, key_path: &str) -> bool

Source

fn path_exists(&self, key: &str) -> bool

Source

fn subscribe(&self, key_path: &str, listener: Box<ChangeListener>)

Source

fn subscribe_detailed( &self, key_path: &str, listener: Box<DetailedChangeListener>, )

Source

fn branch(&self, key_path: &str) -> C5StoreBranch

Source

fn key_paths_with_prefix(&self, key_path: Option<&str>) -> Vec<String>

Source

fn current_key_path(&self) -> &str

Source

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.

Implementors§