pub struct Path { /* private fields */ }Expand description
Path through the graph (history of traversed elements)
Implementations§
Source§impl Path
impl Path
Sourcepub fn start(value: TraverserValue) -> Self
pub fn start(value: TraverserValue) -> Self
Create path starting with an element
Sourcepub fn extend(&mut self, value: TraverserValue)
pub fn extend(&mut self, value: TraverserValue)
Extend path with a new element
Sourcepub fn extend_with_label(&mut self, value: TraverserValue, label: String)
pub fn extend_with_label(&mut self, value: TraverserValue, label: String)
Extend with label
Sourcepub fn objects(&self) -> &[TraverserValue]
pub fn objects(&self) -> &[TraverserValue]
Get objects in path
Sourcepub fn get(&self, label: &str) -> Option<&TraverserValue>
pub fn get(&self, label: &str) -> Option<&TraverserValue>
Get object by label
Sourcepub fn get_all(&self, label: &str) -> Vec<&TraverserValue>
pub fn get_all(&self, label: &str) -> Vec<&TraverserValue>
Get all objects by label (if multiple positions have same label)
Sourcepub fn head(&self) -> Option<&TraverserValue>
pub fn head(&self) -> Option<&TraverserValue>
Get head (last element)
Sourcepub fn clone_and_extend(&self, value: TraverserValue) -> Self
pub fn clone_and_extend(&self, value: TraverserValue) -> Self
Clone path and extend
Trait Implementations§
Auto Trait Implementations§
impl Forget for Path
impl Freeze for Pathwhere
*const u8 is !null: Freeze,
PhantomData<TraverserValue>: Freeze,
PhantomData<Vec<String>>: Freeze,
impl Move for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnsafeUnpin for Pathwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<TraverserValue>: UnsafeUnpin,
PhantomData<Vec<String>>: UnsafeUnpin,
impl UnwindSafe for Pathwhere
RawVecInner: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
HashMap<String, Value>: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request