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§
sourcefn reset(&self, key: &Txt)
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.
sourcefn can_reset(&self, key: Txt) -> Box<dyn VarBoxed<bool>>
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.
sourcefn clone_boxed(&self) -> Box<dyn FallbackConfigReset>
fn clone_boxed(&self) -> Box<dyn FallbackConfigReset>
Clone a reference to the config.
Trait Implementations§
source§impl Clone for Box<dyn FallbackConfigReset>
impl Clone for Box<dyn FallbackConfigReset>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more