pub struct SettingPath(/* private fields */);Expand description
A dotted path to one setting, such as sources.work.config.root.
Implementations§
Source§impl SettingPath
impl SettingPath
Sourcepub fn new(segments: Vec<String>, source: &str) -> Result<Self, ConfigError>
pub fn new(segments: Vec<String>, source: &str) -> Result<Self, ConfigError>
Build a path from segments, refusing an empty one.
§Errors
Returns ConfigError::Setting when there are no segments or one is empty —
--set .plugin=x and --set a..b=x both address nothing.
Sourcepub fn parse(dotted: &str) -> Result<Self, ConfigError>
pub fn parse(dotted: &str) -> Result<Self, ConfigError>
Parse a dotted path such as sources.work.config.root.
§Errors
Returns ConfigError::Setting when dotted has an empty segment.
Trait Implementations§
Source§impl Clone for SettingPath
impl Clone for SettingPath
Source§fn clone(&self) -> SettingPath
fn clone(&self) -> SettingPath
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 SettingPath
impl Debug for SettingPath
Source§impl Display for SettingPath
impl Display for SettingPath
impl Eq for SettingPath
Source§impl From<SettingPath> for String
impl From<SettingPath> for String
Source§fn from(value: SettingPath) -> Self
fn from(value: SettingPath) -> Self
Converts to this type from the input type.
Source§impl Hash for SettingPath
impl Hash for SettingPath
Source§impl JsonSchema for SettingPath
impl JsonSchema for SettingPath
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for SettingPath
impl Ord for SettingPath
Source§fn cmp(&self, other: &SettingPath) -> Ordering
fn cmp(&self, other: &SettingPath) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SettingPath
impl PartialEq for SettingPath
Source§impl PartialOrd for SettingPath
impl PartialOrd for SettingPath
Source§impl Serialize for SettingPath
impl Serialize for SettingPath
impl StructuralPartialEq for SettingPath
Auto Trait Implementations§
impl Freeze for SettingPath
impl RefUnwindSafe for SettingPath
impl Send for SettingPath
impl Sync for SettingPath
impl Unpin for SettingPath
impl UnsafeUnpin for SettingPath
impl UnwindSafe for SettingPath
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.