zng_ext_config

Type Alias TomlConfig

Source
pub type TomlConfig = SyncConfig<IndexMap<ConfigKey, Value>>;
Expand description

Represents a config source that synchronizes with a TOML file.

Aliased Type§

struct TomlConfig { /* private fields */ }

Implementations

Source§

impl<M: ConfigMap> SyncConfig<M>

Source

pub fn sync(file: impl Into<PathBuf>) -> Self

Open write the file

Trait Implementations

Source§

impl<M: ConfigMap> AnyConfig for SyncConfig<M>

Source§

fn get_raw( &mut self, key: ConfigKey, default: RawConfigValue, insert: bool, shared: bool, ) -> BoxedVar<RawConfigValue>

Gets a weak typed variable to the config key. Read more
Source§

fn contains_key(&mut self, key: ConfigKey) -> BoxedVar<bool>

Gets a read-only variable that tracks if an entry for the key is in the backing storage.
Source§

fn status(&self) -> BoxedVar<ConfigStatus>

Gets a read-only variable that represents the IO status of the config.
Source§

fn remove(&mut self, key: &ConfigKey) -> bool

Removes the key from the backing storage. Read more
Source§

fn low_memory(&mut self)

Cleanup and flush RAM caches.
Source§

impl<M: ConfigMap> Config for SyncConfig<M>

Source§

fn get<T: ConfigValue>( &mut self, key: impl Into<ConfigKey>, default: T, insert: bool, ) -> BoxedVar<T>

Gets a variable that is bound to the config key. Read more