Struct options::OptionsCache
source · pub struct OptionsCache<T> { /* private fields */ }Expand description
Represents a cache for configured options.
Trait Implementations§
source§impl<T> Default for OptionsCache<T>
impl<T> Default for OptionsCache<T>
source§impl<T> OptionsMonitorCache<T> for OptionsCache<T>
impl<T> OptionsMonitorCache<T> for OptionsCache<T>
source§fn get_or_add(
&self,
name: Option<&str>,
create_options: &dyn Fn(Option<&str>) -> T
) -> &T
fn get_or_add( &self, name: Option<&str>, create_options: &dyn Fn(Option<&str>) -> T ) -> &T
Gets or adds options with the specified name. Read more
source§fn try_add(&self, name: Option<&str>, options: T) -> bool
fn try_add(&self, name: Option<&str>, options: T) -> bool
Attempts to add options with the specified name. Read more