pub enum PathStep {
Field(String),
Element,
}Expand description
One structural step from a value’s root to a node inside it: an object key, or the position of an array element.
A written path and the route it resolves to are different things. The
grammar above spells an array element by index or by an identifier its
Addressing matches against the element’s
content (servers.reviewer.port); either way the route records
PathStep::Element. An identifier is data
inside the element, not a field name on the route, so nothing that judges a
route by its keys — Redactor::value_at
above all — ever sees it. Produced by
locate.
Variants§
Field(String)
The member of an object with this exact (unescaped) key.
Element
An array element, independent of how it was addressed.
Trait Implementations§
impl Eq for PathStep
impl StructuralPartialEq for PathStep
Auto Trait Implementations§
impl Forget for PathStep
impl Freeze for PathStep
impl Move for PathStep
impl RefUnwindSafe for PathStep
impl Send for PathStepwhere
RawVecInner: Send,
impl Sync for PathStepwhere
RawVecInner: Sync,
impl Unpin for PathStep
impl UnsafeUnpin for PathStep
impl UnwindSafe for PathStepwhere
RawVecInner: UnwindSafe,
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§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.