pub fn new<T: Clone + Serialize + DeserializeOwned + Send + 'static>(
    id: Identifier,
    default: T,
    custom_path: Option<&Path>,
) -> Result<()> {
    use std::ops::DerefMut;
    let config: Configuration<T> = Configuration::new(id.clone(), default, custom_path)?;
    let mut guard = lock(&SINGLETONS);
    guard.deref_mut().insert(id, Box::new(config));
    Ok(())
}
/// new initializes a new configuration singleton with the given identifer,
/// default set of configuration values, and custom disk persistence path
/// (optional). An error might occur if determining the persistence path to use
/// fails, or if deserializing the previously persisted configuration (if any)
/// fails.
new initializes a new configuration singleton with the given identifer,
default set of configuration values, and custom disk persistence path
(optional). An error might occur if determining the persistence path to use
fails, or if deserializing the previously persisted configuration (if any)
fails.
new initializes a new configuration singleton with the given identifer default set of configuration values and custom disk persistence path ( optional ) . An error might occur if determining the persistence path to use fails or if deserializing the previously persisted configuration ( if any ) fails .
pub fn new<T: Clone + Serialize + DeserializeOwned + Send + 'static>(
    id: Identifier,
    default: T,
    custom_path: Option<&Path>,
) -> Result<()> {
    use std::ops::DerefMut;
    let config: Configuration<T> = Configuration::new(id.clone(), default, custom_path)?;
    let mut guard = lock(&SINGLETONS);
    guard.deref_mut().insert(id, Box::new(config));
    Ok(())
}
pub fn new < T : Clone + Serialize + DeserializeOwned + Send + ' static > ( id : Identifier , default : T , custom_path : Option < & Path > , ) -> Result < ( ) > { use std :: ops :: DerefMut ; let config : Configuration < T > = Configuration :: new ( id . clone ( ) , default , custom_path ) ? ; let mut guard = lock ( & SINGLETONS ) ; guard . deref_mut ( ) . insert ( id , Box :: new ( config ) ) ; Ok ( ( ) ) }
new initializes a new configuration singleton with the given identifer,
default set of configuration values, and custom disk persistence path
(optional).
new initializes a new configuration singleton with the given identifer default set of configuration values and custom disk persistence path ( optional ) .
id
Identifier
default
T
custom_path
Option<&Path>
id
Identifier
default
T
custom_path
Option<&Path>