pub struct Path { /* private fields */ }Expand description
A place in a document: a root name the document kind gives, then keys and indexes.
Written as root.key[2].other; a key that is empty or holds ., [, ], ", \,
whitespace or a control character is written quoted, root["a key"].
Implementations§
Source§impl Path
impl Path
Sourcepub fn join(&self, segments: impl IntoIterator<Item = Segment>) -> Self
pub fn join(&self, segments: impl IntoIterator<Item = Segment>) -> Self
The path with segments added.
Sourcepub fn starts_with(&self, other: &Self) -> bool
pub fn starts_with(&self, other: &Self) -> bool
Whether self is other or lies inside it (roots compared too).
Sourcepub fn starred(&self) -> String
pub fn starred(&self) -> String
The written form with every index replaced by *, which groups one problem repeated
over a list.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Path
impl<'de> Deserialize<'de> for Path
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Path
impl StructuralPartialEq for Path
Auto Trait Implementations§
impl Forget for Path
impl Freeze for Path
impl Move for Path
impl RefUnwindSafe for Path
impl Send for Pathwhere
RawVecInner: Send,
impl Sync for Pathwhere
RawVecInner: Sync,
impl Unpin for Path
impl UnsafeUnpin for Pathwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Segment>: UnsafeUnpin,
impl UnwindSafe for Pathwhere
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