zng::config

Trait FallbackConfigReset

source
pub trait FallbackConfigReset: AnyConfig + Sync {
    // Required methods
    fn reset(&self, key: &Txt);
    fn can_reset(&self, key: Txt) -> Box<dyn VarBoxed<bool>>;
    fn clone_boxed(&self) -> Box<dyn FallbackConfigReset>;
}
Expand description

Reset controls of a FallbackConfig.

Required Methods§

source

fn reset(&self, key: &Txt)

Removes the key from the config and updates all active config variables back to the fallback value. Note that if you assign the config variable the key will be re-inserted on the config.

source

fn can_reset(&self, key: Txt) -> Box<dyn VarBoxed<bool>>

Returns a read-only var that is true when the key has an entry in the read-write config.

source

fn clone_boxed(&self) -> Box<dyn FallbackConfigReset>

Clone a reference to the config.

Trait Implementations§

source§

impl Clone for Box<dyn FallbackConfigReset>

source§

fn clone(&self) -> Box<dyn FallbackConfigReset>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§

source§

impl<S, F> FallbackConfigReset for FallbackConfig<S, F>
where S: Config, F: Config,