pub struct ConfigKey(/* private fields */);Expand description
A validated single configuration key segment.
Implementations§
Source§impl ConfigKey
impl ConfigKey
Sourcepub fn new(input: impl AsRef<str>) -> Result<ConfigKey, ConfigKeyError>
pub fn new(input: impl AsRef<str>) -> Result<ConfigKey, ConfigKeyError>
Creates a configuration key from one non-empty segment.
§Errors
Returns ConfigKeyError when the input is empty after trimming or contains a dot.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Returns the owned key string.
Trait Implementations§
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 Ord for ConfigKey
impl Ord for ConfigKey
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 PartialOrd for ConfigKey
impl PartialOrd for ConfigKey
impl Eq for ConfigKey
impl StructuralPartialEq for ConfigKey
Auto Trait Implementations§
impl Freeze for ConfigKey
impl RefUnwindSafe for ConfigKey
impl Send for ConfigKey
impl Sync for ConfigKey
impl Unpin for ConfigKey
impl UnsafeUnpin for ConfigKey
impl UnwindSafe for ConfigKey
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