Trait options::OptionsMonitor
source · pub trait OptionsMonitor<T> {
// Required methods
fn get(&self, name: Option<&str>) -> Ref<T>;
fn on_change(
&self,
listener: Box<dyn Fn(Option<&str>, Ref<T>) + Send + Sync>
) -> Subscription<T>;
// Provided method
fn current_value(&self) -> Ref<T> { ... }
}Expand description
Defines the behavior for notifications when Options instances change.
Required Methods§
sourcefn get(&self, name: Option<&str>) -> Ref<T>
fn get(&self, name: Option<&str>) -> Ref<T>
Returns a configured instance with the given name.
Arguments
name- The name associated with the options.
Provided Methods§
sourcefn current_value(&self) -> Ref<T>
fn current_value(&self) -> Ref<T>
Returns the current instance with the default options name.