pub struct ConfigNamePathBuf(/* private fields */);Expand description
Dotted config name path.
Implementations§
source§impl ConfigNamePathBuf
impl ConfigNamePathBuf
sourcepub fn root() -> Self
pub fn root() -> Self
Creates an empty path pointing to the root table.
This isn’t a valid TOML key expression, but provided for convenience.
sourcepub fn is_root(&self) -> bool
pub fn is_root(&self) -> bool
Returns true if the path is empty (i.e. pointing to the root table.)
sourcepub fn components(&self) -> Iter<'_, Key>
pub fn components(&self) -> Iter<'_, Key>
Returns iterator of path components (or keys.)
sourcepub fn lookup_value(&self, config: &Config) -> Result<Value, ConfigError>
pub fn lookup_value(&self, config: &Config) -> Result<Value, ConfigError>
Looks up value in the given config.
This is a workaround for the config.get() API, which doesn’t support
literal path expression. If we implement our own config abstraction,
this method should be moved there.
Trait Implementations§
source§impl AsRef<[Key]> for ConfigNamePathBuf
impl AsRef<[Key]> for ConfigNamePathBuf
source§impl Clone for ConfigNamePathBuf
impl Clone for ConfigNamePathBuf
source§fn clone(&self) -> ConfigNamePathBuf
fn clone(&self) -> ConfigNamePathBuf
Returns a copy 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 Debug for ConfigNamePathBuf
impl Debug for ConfigNamePathBuf
source§impl Display for ConfigNamePathBuf
impl Display for ConfigNamePathBuf
source§impl<K: Into<Key>> FromIterator<K> for ConfigNamePathBuf
impl<K: Into<Key>> FromIterator<K> for ConfigNamePathBuf
source§fn from_iter<I: IntoIterator<Item = K>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = K>>(iter: I) -> Self
Creates a value from an iterator. Read more
source§impl FromStr for ConfigNamePathBuf
impl FromStr for ConfigNamePathBuf
source§impl Hash for ConfigNamePathBuf
impl Hash for ConfigNamePathBuf
source§impl Ord for ConfigNamePathBuf
impl Ord for ConfigNamePathBuf
source§fn cmp(&self, other: &ConfigNamePathBuf) -> Ordering
fn cmp(&self, other: &ConfigNamePathBuf) -> Ordering
1.21.0 · 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 ConfigNamePathBuf
impl PartialEq for ConfigNamePathBuf
source§impl PartialOrd for ConfigNamePathBuf
impl PartialOrd for ConfigNamePathBuf
impl Eq for ConfigNamePathBuf
impl StructuralPartialEq for ConfigNamePathBuf
Auto Trait Implementations§
impl Freeze for ConfigNamePathBuf
impl RefUnwindSafe for ConfigNamePathBuf
impl Send for ConfigNamePathBuf
impl Sync for ConfigNamePathBuf
impl Unpin for ConfigNamePathBuf
impl UnwindSafe for ConfigNamePathBuf
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
source§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more