pub struct PathRef<'buf>(/* private fields */);
Expand description
A path to a JSON Element
where the path components are borrowed from the source JSON &str
.
The Display impl outputs strings like:
$
The root is represented by a dollar.$.object_key
Dots separate the path elements.$.object_key.2
Arrays are represented as integers.
Implementations§
Source§impl<'buf> PathRef<'buf>
impl<'buf> PathRef<'buf>
Sourcepub fn components(&self) -> PathComponents<'buf> ⓘ
pub fn components(&self) -> PathComponents<'buf> ⓘ
Return an Iterator
over the components of this path.
Trait Implementations§
Source§impl PartialEq<&str> for PathRef<'_>
The PathRef
can be compared with other strings just like a String
.
impl PartialEq<&str> for PathRef<'_>
The PathRef
can be compared with other strings just like a String
.
Auto Trait Implementations§
impl<'buf> Freeze for PathRef<'buf>
impl<'buf> RefUnwindSafe for PathRef<'buf>
impl<'buf> !Send for PathRef<'buf>
impl<'buf> !Sync for PathRef<'buf>
impl<'buf> Unpin for PathRef<'buf>
impl<'buf> UnwindSafe for PathRef<'buf>
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