miniconf

Struct Path

source
#[repr(transparent)]
pub struct Path<T: ?Sized, const S: char>(pub T);
Expand description

Path with named keys separated by a separator char

The path will either be empty or start with the separator.

  • path: T: A Write to write the separators and node names into during Transcode. See also TreeKey::traverse_all() and Metadata::max_length() for upper bounds on path length. Can also be a AsRef<str> to implement IntoKeys (see KeysIter).
  • const S: char: The path hierarchy separator to be inserted before each name, e.g. '/'.

Tuple Fields§

§0: T

Implementations§

source§

impl<T: ?Sized, const S: char> Path<T, S>

source

pub const fn separator(&self) -> char

The path hierarchy separator

source§

impl<T, const S: char> Path<T, S>

source

pub fn into_inner(self) -> T

Extract just the path

Trait Implementations§

source§

impl<T: Clone + ?Sized, const S: char> Clone for Path<T, S>

source§

fn clone(&self) -> Path<T, S>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + ?Sized, const S: char> Debug for Path<T, S>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Default + ?Sized, const S: char> Default for Path<T, S>

source§

fn default() -> Path<T, S>

Returns the “default value” for a type. Read more
source§

impl<T: ?Sized, const S: char> Deref for Path<T, S>

source§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<T: ?Sized, const S: char> DerefMut for Path<T, S>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<'de, T, const S: char> Deserialize<'de> for Path<T, S>
where T: Deserialize<'de> + ?Sized,

source§

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<T, const S: char> From<T> for Path<T, S>

source§

fn from(value: T) -> Self

Converts to this type from the input type.
source§

impl<'a, T: AsRef<str> + ?Sized, const S: char> IntoKeys for &'a Path<T, S>

source§

type IntoKeys = KeysIter<PathIter<'a, S>>

The specific Keys implementor.
source§

fn into_keys(self) -> Self::IntoKeys

Convert self into a Keys implementor.
source§

impl<'a, T: AsRef<str> + ?Sized, const S: char> IntoKeys for Path<&'a T, S>

source§

type IntoKeys = KeysIter<PathIter<'a, S>>

The specific Keys implementor.
source§

fn into_keys(self) -> Self::IntoKeys

Convert self into a Keys implementor.
source§

impl<T: Ord + ?Sized, const S: char> Ord for Path<T, S>

source§

fn cmp(&self, other: &Path<T, S>) -> Ordering

This method returns an Ordering between self and other. Read more
source§

impl<T: PartialEq + ?Sized, const S: char> PartialEq for Path<T, S>

source§

fn eq(&self, other: &Path<T, S>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: PartialOrd + ?Sized, const S: char> PartialOrd for Path<T, S>

source§

fn partial_cmp(&self, other: &Path<T, S>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<T, const S: char> Serialize for Path<T, S>
where T: Serialize + ?Sized,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T: Write + ?Sized, const S: char> Transcode for Path<T, S>

source§

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

Perform a node lookup of a K: IntoKeys on a M: TreeKey<Y> and transcode it. Read more
source§

impl<T: Copy + ?Sized, const S: char> Copy for Path<T, S>

source§

impl<T: Eq + ?Sized, const S: char> Eq for Path<T, S>

source§

impl<T: ?Sized, const S: char> StructuralPartialEq for Path<T, S>

Auto Trait Implementations§

§

impl<T, const S: char> Freeze for Path<T, S>
where T: Freeze + ?Sized,

§

impl<T, const S: char> RefUnwindSafe for Path<T, S>
where T: RefUnwindSafe + ?Sized,

§

impl<T, const S: char> Send for Path<T, S>
where T: Send + ?Sized,

§

impl<T, const S: char> Sync for Path<T, S>
where T: Sync + ?Sized,

§

impl<T, const S: char> Unpin for Path<T, S>
where T: Unpin + ?Sized,

§

impl<T, const S: char> UnwindSafe for Path<T, S>
where T: UnwindSafe + ?Sized,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,