Skip to main content

Snapshot

Trait Snapshot 

Source
pub trait Snapshot<T: Value> {
    // Required method
    fn get_named(&self, name: &str) -> Result<Ref<T>, Error>;

    // Provided methods
    fn get(&self) -> Result<Ref<T>, Error> { ... }
    fn get_unchecked(&self) -> Ref<T> { ... }
    fn get_named_unchecked(&self, name: &str) -> Ref<T> { ... }
}
Expand description

Defines the behavior for a snapshot of configuration options.

Required Methods§

Source

fn get_named(&self, name: &str) -> Result<Ref<T>, Error>

Gets the configuration options with the specified name.

§Arguments
  • name - The optional name of the options to retrieve

Provided Methods§

Source

fn get(&self) -> Result<Ref<T>, Error>

Gets the default, unnamed configuration options.

Source

fn get_unchecked(&self) -> Ref<T>

Gets the default, unnamed configuration options.

§Remarks

This function panics if the configuration options could not be successfully retrieved.

Source

fn get_named_unchecked(&self, name: &str) -> Ref<T>

Gets the configuration options with the specified name.

§Arguments
  • name - The optional name of the options to retrieve
§Remarks

This function panics if the configuration options could not be successfully retrieved.

Implementors§

Source§

impl<T: Value> Snapshot<T> for Manager<T>