Struct ConfigStore
pub struct ConfigStore {
values: HashMap<String, ConfigValue, FxBuildHasher>,
def: Definition,
}Fields§
§values: HashMap<String, ConfigValue, FxBuildHasher>§def: DefinitionImplementations§
§impl ConfigStore
impl ConfigStore
pub fn with_values( values: HashMap<String, ConfigValue, FxBuildHasher>, ) -> ConfigStore
pub fn with_table_value(value: ConfigValue) -> Option<ConfigStore>
pub fn read_layer(
path: &Path,
definition_kind: DefinitionKind,
) -> Result<ConfigStore, Error>
pub fn read_layer( path: &Path, definition_kind: DefinitionKind, ) -> Result<ConfigStore, Error>
Loads configuration from a path without processing includes.
pub fn into_value(self) -> ConfigValue
pub fn definition(&self) -> &Definition
pub fn merge(&mut self, from: ConfigStore, force: bool) -> Result<(), Error>
pub fn merge(&mut self, from: ConfigStore, force: bool) -> Result<(), Error>
Merge the given values into self.
If force is true, primitive (non-container) types will override existing values
of equal priority. For arrays, incoming values of equal priority will be placed later.
Container types (tables and arrays) are merged with existing values.
Container and non-container types cannot be mixed.
pub fn values(&self) -> &HashMap<String, ConfigValue, FxBuildHasher>
pub fn values_mut(&mut self) -> &mut HashMap<String, ConfigValue, FxBuildHasher>
Trait Implementations§
§impl Debug for ConfigStore
impl Debug for ConfigStore
§impl Default for ConfigStore
impl Default for ConfigStore
§fn default() -> ConfigStore
fn default() -> ConfigStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Forget for ConfigStore
impl Freeze for ConfigStore
impl Move for ConfigStore
impl RefUnwindSafe for ConfigStore
impl Send for ConfigStore
impl Sync for ConfigStore
impl Unpin for ConfigStore
impl UnsafeUnpin for ConfigStore
impl UnwindSafe for ConfigStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 64 bytes