pub enum PathSegment {
Key(String),
Index(usize),
}Expand description
One step of a path into a value tree: an object key or an array index.
This is the canonical path-segment type for the whole crate; the document
layer aliases it as CommentPathSegment for nested-comment paths.
Variants§
Trait Implementations§
Source§impl Clone for PathSegment
impl Clone for PathSegment
Source§fn clone(&self) -> PathSegment
fn clone(&self) -> PathSegment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PathSegment
impl Debug for PathSegment
impl Eq for PathSegment
Source§impl From<&PathSegment> for CommentPathSegmentV0_92_0
impl From<&PathSegment> for CommentPathSegmentV0_92_0
Source§fn from(seg: &CommentPathSegment) -> Self
fn from(seg: &CommentPathSegment) -> Self
Converts to this type from the input type.
Source§impl From<&PathSegment> for PathStepWire
impl From<&PathSegment> for PathStepWire
Source§fn from(seg: &PathSegment) -> Self
fn from(seg: &PathSegment) -> Self
Converts to this type from the input type.
Source§impl From<&PathStepWire> for PathSegment
impl From<&PathStepWire> for PathSegment
Source§fn from(seg: &PathStepWire) -> Self
fn from(seg: &PathStepWire) -> Self
Converts to this type from the input type.
Source§impl From<CommentPathSegmentV0_92_0> for CommentPathSegment
impl From<CommentPathSegmentV0_92_0> for CommentPathSegment
Source§fn from(seg: CommentPathSegmentV0_92_0) -> Self
fn from(seg: CommentPathSegmentV0_92_0) -> Self
Converts to this type from the input type.
Source§impl Hash for PathSegment
impl Hash for PathSegment
Source§impl PartialEq for PathSegment
impl PartialEq for PathSegment
Source§fn eq(&self, other: &PathSegment) -> bool
fn eq(&self, other: &PathSegment) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PathSegment
Auto Trait Implementations§
impl Freeze for PathSegment
impl RefUnwindSafe for PathSegment
impl Send for PathSegment
impl Sync for PathSegment
impl Unpin for PathSegment
impl UnsafeUnpin for PathSegment
impl UnwindSafe for PathSegment
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.