Trait zng_ext_config::FallbackConfigReset
source · pub trait FallbackConfigReset: AnyConfig + Sync {
// Required methods
fn reset(&self, key: &ConfigKey);
fn can_reset(&self, key: ConfigKey) -> BoxedVar<bool>;
fn clone_boxed(&self) -> Box<dyn FallbackConfigReset>;
}
Expand description
Reset controls of a FallbackConfig
.
Required Methods§
sourcefn reset(&self, key: &ConfigKey)
fn reset(&self, key: &ConfigKey)
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.
sourcefn can_reset(&self, key: ConfigKey) -> BoxedVar<bool>
fn can_reset(&self, key: ConfigKey) -> BoxedVar<bool>
Returns a read-only var that is true
when the key
has an entry in the read-write config.
sourcefn clone_boxed(&self) -> Box<dyn FallbackConfigReset>
fn clone_boxed(&self) -> Box<dyn FallbackConfigReset>
Clone a reference to the config.