pub struct Visitor<Parent, Value> {
pub parent: Parent,
pub value: Value,
}
Expand description
A visitor for tree traversal.
Fields§
§parent: Parent
The parent of the visitor.
value: Value
The value of the visitor.
Implementations§
Trait Implementations§
source§impl<Parent, Value> HasPath for Visitor<Parent, Value>where
Value: HasPathSegment,
Parent: HasPath,
impl<Parent, Value> HasPath for Visitor<Parent, Value>where
Value: HasPathSegment,
Parent: HasPath,
source§impl<Parent, Value> HasPathSegment for Visitor<Parent, Value>where
Value: HasPathSegment,
impl<Parent, Value> HasPathSegment for Visitor<Parent, Value>where
Value: HasPathSegment,
Auto Trait Implementations§
impl<Parent, Value> Freeze for Visitor<Parent, Value>
impl<Parent, Value> RefUnwindSafe for Visitor<Parent, Value>where
Parent: RefUnwindSafe,
Value: RefUnwindSafe,
impl<Parent, Value> Send for Visitor<Parent, Value>
impl<Parent, Value> Sync for Visitor<Parent, Value>
impl<Parent, Value> Unpin for Visitor<Parent, Value>
impl<Parent, Value> UnwindSafe for Visitor<Parent, Value>where
Parent: UnwindSafe,
Value: 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
source§impl<T> HasBranchesAPI for T
impl<T> HasBranchesAPI for T
source§fn branches_impl2<T>(self) -> impl Iterator<Item = T>where
Self: HasBranches<T> + Sized,
fn branches_impl2<T>(self) -> impl Iterator<Item = T>where
Self: HasBranches<T> + Sized,
This is used internally. Should use
branches
instead.source§impl<'a, T> HasBranchesAPIV2<'a> for T
impl<'a, T> HasBranchesAPIV2<'a> for T
source§fn branches<T>(&'a self) -> impl Iterator<Item = T>where
&'a Self: HasBranches<T>,
T: 'a,
fn branches<T>(&'a self) -> impl Iterator<Item = T>where
&'a Self: HasBranches<T>,
T: 'a,
Iterates over the branches of a type.
source§fn branches_mut<T>(&'a mut self) -> impl Iterator<Item = T>where
&'a mut Self: HasBranches<T>,
T: 'a,
fn branches_mut<T>(&'a mut self) -> impl Iterator<Item = T>where
&'a mut Self: HasBranches<T>,
T: 'a,
Iterates over the branches of a type mutably.
source§impl<T> HasGet for T
impl<T> HasGet for T
source§impl<'a, T> HasGetAPI<'a> for T
impl<'a, T> HasGetAPI<'a> for T
source§fn get<T>(&'a self, segment: impl Into<String>) -> Option<T>
fn get<T>(&'a self, segment: impl Into<String>) -> Option<T>
Gets a branch by its path segment.
source§fn get_mut<T>(&'a mut self, segment: impl Into<String>) -> Option<T>
fn get_mut<T>(&'a mut self, segment: impl Into<String>) -> Option<T>
Gets a branch by its path segment mutably.
fn branch<T>(&'a mut self, segment: impl Into<String>) -> &'a mut Twhere
&'a mut Self: HasGet + HasBranches<&'a mut T>,
Self: AddBranch<T> + Sized,
T: HasPathSegment + 'a,
String: Into<T>,
source§impl<'a, T> HasRelative<'a> for T
impl<'a, T> HasRelative<'a> for T
source§fn relative<K>(&'a self, path: impl IntoIterator<Item = K>) -> Option<Self>where
K: Into<String>,
Self: Clone + HasRoot + HasParent + HasPathSegment,
&'a Self: HasBranches<Self>,
fn relative<K>(&'a self, path: impl IntoIterator<Item = K>) -> Option<Self>where
K: Into<String>,
Self: Clone + HasRoot + HasParent + HasPathSegment,
&'a Self: HasBranches<Self>,
Gets a relative path.
“self”, “root”, and “super” are reserved path segments.
“self” is the current object, “root” is the root object, and “super” is the parent object.
source§impl<'a, T> UnsafeHasRelative<'a> for T
impl<'a, T> UnsafeHasRelative<'a> for T
source§unsafe fn relative_mut<K>(
&'a mut self,
path: impl IntoIterator<Item = K>,
) -> Option<Self>where
K: Into<String>,
Self: UnsafeClone + UnsafeHasRoot + UnsafeHasParent + HasPathSegment,
&'a mut Self: HasBranches<Self>,
unsafe fn relative_mut<K>(
&'a mut self,
path: impl IntoIterator<Item = K>,
) -> Option<Self>where
K: Into<String>,
Self: UnsafeClone + UnsafeHasRoot + UnsafeHasParent + HasPathSegment,
&'a mut Self: HasBranches<Self>,
Gets a relative path mutably.
“self”, “root”, and “super” are reserved path segments.
“self” is the current object, “root” is the root object, and “super” is the parent object.