miniconf

Struct JsonPath

source
#[repr(transparent)]
pub struct JsonPath<T: ?Sized>(pub T);
Expand description

JSON style path notation

T can be Write for Transcode with the following behavior:

  • Named fields (struct) are encoded in dot notation.
  • Indices (tuple struct, array) are encoded in index notation

T can be AsRef<str> for IntoKeys with the behavior described in JsonPathIter.

Tuple Fields§

§0: T

Implementations§

source§

impl<T> JsonPath<T>

source

pub fn into_inner(self) -> T

Extract the inner value

Trait Implementations§

source§

impl<T: Clone + ?Sized> Clone for JsonPath<T>

source§

fn clone(&self) -> JsonPath<T>

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> Debug for JsonPath<T>

source§

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

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

impl<T: Default + ?Sized> Default for JsonPath<T>

source§

fn default() -> JsonPath<T>

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

impl<T: ?Sized> Deref for JsonPath<T>

source§

type Target = T

The resulting type after dereferencing.
source§

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

Dereferences the value.
source§

impl<T: ?Sized> DerefMut for JsonPath<T>

source§

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

Mutably dereferences the value.
source§

impl<'de, T> Deserialize<'de> for JsonPath<T>
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> From<T> for JsonPath<T>

source§

fn from(value: T) -> Self

Converts to this type from the input type.
source§

impl<T: Hash + ?Sized> Hash for JsonPath<T>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
source§

impl<'a, T: AsRef<str> + ?Sized> IntoKeys for &'a JsonPath<T>

source§

type IntoKeys = KeysIter<JsonPathIter<'a>>

The specific Keys implementor.
source§

fn into_keys(self) -> Self::IntoKeys

Convert self into a Keys implementor.
source§

impl<T: Ord + ?Sized> Ord for JsonPath<T>

source§

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

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

impl<T: PartialEq + ?Sized> PartialEq for JsonPath<T>

source§

fn eq(&self, other: &JsonPath<T>) -> 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> PartialOrd for JsonPath<T>

source§

fn partial_cmp(&self, other: &JsonPath<T>) -> 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> Serialize for JsonPath<T>
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> Transcode for JsonPath<T>

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> Copy for JsonPath<T>

source§

impl<T: Eq + ?Sized> Eq for JsonPath<T>

source§

impl<T: ?Sized> StructuralPartialEq for JsonPath<T>

Auto Trait Implementations§

§

impl<T> Freeze for JsonPath<T>
where T: Freeze + ?Sized,

§

impl<T> RefUnwindSafe for JsonPath<T>
where T: RefUnwindSafe + ?Sized,

§

impl<T> Send for JsonPath<T>
where T: Send + ?Sized,

§

impl<T> Sync for JsonPath<T>
where T: Sync + ?Sized,

§

impl<T> Unpin for JsonPath<T>
where T: Unpin + ?Sized,

§

impl<T> UnwindSafe for JsonPath<T>
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>,