pub struct ConfigPath { /* private fields */ }Expand description
A validated dotted configuration path.
Implementations§
Source§impl ConfigPath
impl ConfigPath
Sourcepub fn parse(input: &str) -> Result<ConfigPath, ConfigKeyError>
pub fn parse(input: &str) -> Result<ConfigPath, ConfigKeyError>
Parses a dotted configuration path.
§Errors
Returns ConfigKeyError when the path is empty or contains an invalid segment.
Sourcepub fn from_segments<I, S>(segments: I) -> Result<ConfigPath, ConfigKeyError>
pub fn from_segments<I, S>(segments: I) -> Result<ConfigPath, ConfigKeyError>
Creates a path from already separated segments.
§Errors
Returns ConfigKeyError when no segments are provided or any segment is invalid.
Trait Implementations§
Source§impl Clone for ConfigPath
impl Clone for ConfigPath
Source§fn clone(&self) -> ConfigPath
fn clone(&self) -> ConfigPath
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 ConfigPath
impl Debug for ConfigPath
Source§impl Display for ConfigPath
impl Display for ConfigPath
Source§impl From<ConfigKey> for ConfigPath
impl From<ConfigKey> for ConfigPath
Source§fn from(key: ConfigKey) -> ConfigPath
fn from(key: ConfigKey) -> ConfigPath
Converts to this type from the input type.
Source§impl FromStr for ConfigPath
impl FromStr for ConfigPath
Source§type Err = ConfigKeyError
type Err = ConfigKeyError
The associated error which can be returned from parsing.
Source§fn from_str(input: &str) -> Result<ConfigPath, <ConfigPath as FromStr>::Err>
fn from_str(input: &str) -> Result<ConfigPath, <ConfigPath as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for ConfigPath
impl Hash for ConfigPath
Source§impl Ord for ConfigPath
impl Ord for ConfigPath
Source§fn cmp(&self, other: &ConfigPath) -> Ordering
fn cmp(&self, other: &ConfigPath) -> 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 ConfigPath
impl PartialEq for ConfigPath
Source§fn eq(&self, other: &ConfigPath) -> bool
fn eq(&self, other: &ConfigPath) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ConfigPath
impl PartialOrd for ConfigPath
impl Eq for ConfigPath
impl StructuralPartialEq for ConfigPath
Auto Trait Implementations§
impl Freeze for ConfigPath
impl RefUnwindSafe for ConfigPath
impl Send for ConfigPath
impl Sync for ConfigPath
impl Unpin for ConfigPath
impl UnsafeUnpin for ConfigPath
impl UnwindSafe for ConfigPath
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