Struct options::OptionsCache
source · [−]pub struct OptionsCache<T> { /* private fields */ }Expand description
Represents a cache for configured options.
Trait Implementations
sourceimpl<T> Default for OptionsCache<T>
impl<T> Default for OptionsCache<T>
sourceimpl<T> OptionsMonitorCache<T> for OptionsCache<T>
impl<T> OptionsMonitorCache<T> for OptionsCache<T>
sourcefn 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
sourcefn 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
Auto Trait Implementations
impl<T> !RefUnwindSafe for OptionsCache<T>
impl<T> Send for OptionsCache<T>where
T: Send,
impl<T> !Sync for OptionsCache<T>
impl<T> Unpin for OptionsCache<T>where
T: Unpin,
impl<T> UnwindSafe for OptionsCache<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more