pub struct ConfigSchema {
pub fields: Vec<ConfigField>,
}Fields§
§fields: Vec<ConfigField>Implementations§
Source§impl ConfigSchema
impl ConfigSchema
Sourcepub fn normalize(&mut self) -> Result<(), ConfigError>
pub fn normalize(&mut self) -> Result<(), ConfigError>
Normalize set-like schema content and reject ambiguous declarations.
Sourcepub fn canonicalize(
&self,
supplied: &BTreeMap<String, ConfigValue>,
) -> Result<BTreeMap<String, ConfigValue>, ConfigError>
pub fn canonicalize( &self, supplied: &BTreeMap<String, ConfigValue>, ) -> Result<BTreeMap<String, ConfigValue>, ConfigError>
Validate an instance and materialize defaults into one canonical map.
Trait Implementations§
Source§impl Clone for ConfigSchema
impl Clone for ConfigSchema
Source§fn clone(&self) -> ConfigSchema
fn clone(&self) -> ConfigSchema
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConfigSchema
impl Debug for ConfigSchema
Source§impl Default for ConfigSchema
impl Default for ConfigSchema
Source§fn default() -> ConfigSchema
fn default() -> ConfigSchema
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ConfigSchema
impl<'de> Deserialize<'de> for ConfigSchema
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ConfigSchema
Source§impl PartialEq for ConfigSchema
impl PartialEq for ConfigSchema
Source§impl Serialize for ConfigSchema
impl Serialize for ConfigSchema
impl StructuralPartialEq for ConfigSchema
Auto Trait Implementations§
impl Freeze for ConfigSchema
impl RefUnwindSafe for ConfigSchema
impl Send for ConfigSchema
impl Sync for ConfigSchema
impl Unpin for ConfigSchema
impl UnsafeUnpin for ConfigSchema
impl UnwindSafe for ConfigSchema
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