pub struct HumanReadableStructuredConfig {
pub settings: Vec<HumanReadableSetting>,
}Expand description
A human-readable mirror of super::StructuredConfig.
Fields§
§settings: Vec<HumanReadableSetting>Implementations§
Source§impl HumanReadableStructuredConfig
impl HumanReadableStructuredConfig
Sourcepub fn validate(&self) -> bool
pub fn validate(&self) -> bool
Validate that the structure of the settings is valid.
Returns true if it is valid and false otherwise.
Sourcepub fn to_structured_config(&self) -> Option<StructuredConfig>
pub fn to_structured_config(&self) -> Option<StructuredConfig>
Convert this human-readable structure into a runtime StructuredConfig.
Human-facing metadata is preserved where the runtime structure supports it.
Sourcepub fn from_structured_config(config: &StructuredConfig) -> Self
pub fn from_structured_config(config: &StructuredConfig) -> Self
Build a human-readable structure from a runtime StructuredConfig.
Trait Implementations§
Source§impl Clone for HumanReadableStructuredConfig
impl Clone for HumanReadableStructuredConfig
Source§fn clone(&self) -> HumanReadableStructuredConfig
fn clone(&self) -> HumanReadableStructuredConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for HumanReadableStructuredConfig
impl<'de> Deserialize<'de> for HumanReadableStructuredConfig
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
Source§impl PartialEq for HumanReadableStructuredConfig
impl PartialEq for HumanReadableStructuredConfig
Source§fn eq(&self, other: &HumanReadableStructuredConfig) -> bool
fn eq(&self, other: &HumanReadableStructuredConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for HumanReadableStructuredConfig
impl StructuralPartialEq for HumanReadableStructuredConfig
Auto Trait Implementations§
impl Freeze for HumanReadableStructuredConfig
impl RefUnwindSafe for HumanReadableStructuredConfig
impl Send for HumanReadableStructuredConfig
impl Sync for HumanReadableStructuredConfig
impl Unpin for HumanReadableStructuredConfig
impl UnsafeUnpin for HumanReadableStructuredConfig
impl UnwindSafe for HumanReadableStructuredConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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