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) -> Path
pub fn start(value: TraverserValue) -> Path
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) -> Path
pub fn clone_and_extend(&self, value: TraverserValue) -> Path
Clone path and extend
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnsafeUnpin for Path
impl UnwindSafe for Path
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<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