Struct is_tree::visitor::Visitor

source ·
pub struct Visitor<Parent, Value> { /* private fields */ }

Implementations§

source§

impl<Parent, Value> Visitor<Parent, Value>

source

pub fn new(parent: Parent, value: Value) -> Self

Trait Implementations§

source§

impl<Parent: Clone, Value: Clone> Clone for Visitor<Parent, Value>

source§

fn clone(&self) -> Visitor<Parent, Value>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Parent: Default, Value: Default> Default for Visitor<Parent, Value>

source§

fn default() -> Visitor<Parent, Value>

Returns the “default value” for a type. Read more
source§

impl<'a, Parent, Value> From<Visitor<Parent, &'a mut Value>> for Visitor<Parent, &'a Value>

source§

fn from(visitor: Visitor<Parent, &'a mut Value>) -> Self

Converts to this type from the input type.
source§

impl<'a, Parent, Value> HasBranches<'a> for &'a Visitor<Parent, Value>
where Parent: Clone, Value: Clone + HasBranches<'a>, Value::Branches: KnowsPathSegment + KnowsVisitor<'a>, <Value::Branches as KnowsVisitor<'a>>::Visitor: KnowsPathSegment<PathSegment = <Value::Branches as KnowsPathSegment>::PathSegment>, Self::Branches: HasVisitorConstructor<'a, Value = Value::Branches>, Visitor<Parent, Value>: Into<<Self::Branches as KnowsParent<'a>>::Parent> + Clone,

source§

fn branches(self) -> impl Iterator<Item = Self::Branches>

source§

impl<'a, Parent, Value> HasGet<'a> for &'a Visitor<Parent, Value>
where Parent: Clone, Value: Clone + HasGet<'a>, Value::GetType: KnowsPathSegment + KnowsVisitor<'a>, <Value::GetType as KnowsVisitor<'a>>::Visitor: KnowsPathSegment<PathSegment = <Value::GetType as KnowsPathSegment>::PathSegment>, Self::GetType: HasVisitorConstructor<'a, Value = Value::GetType>, Visitor<Parent, Value>: Into<<Self::GetType as KnowsParent<'a>>::Parent>,

source§

fn get<PathSegment>(self, segment: PathSegment) -> Option<Self::GetType>
where PathSegment: Into<<Self::GetType as KnowsPathSegment>::PathSegment>,

source§

impl<'a, Parent, Value> HasParent<'a> for &'a Visitor<Parent, Value>
where Parent: Clone,

source§

fn parent(self) -> Parent

source§

impl<Parent, Value> HasPath for Visitor<Parent, Value>
where Value: HasPathSegment, Parent: HasPath<PathSegment = Value::PathSegment>,

source§

fn path(&self) -> Path<Value::PathSegment>

source§

impl<Parent, Value> HasPathSegment for Visitor<Parent, Value>
where Value: HasPathSegment + Clone,

source§

fn path_segment(&self) -> &Self::PathSegment

source§

fn is(&self, identifier: impl PartialEq<Self::PathSegment>) -> bool

source§

impl<'a, Parent, Value> HasRelativeAccess<'a> for &'a Visitor<Parent, Value>
where Visitor<Parent, Value>: Into<Self::RelativeType> + Clone + KnowsRelativeAccessType<'a> + KnowsPathSegment + 'a, Self: HasValue<'a> + HasParent<'a> + HasRoot<'a> + HasGet<'a>, <Self as KnowsParent<'a>>::Parent: Into<Self::RelativeType>, <Self as KnowsRoot<'a>>::Root: Into<Self::RelativeType>, <Self as KnowsGetType<'a>>::GetType: Into<Self::RelativeType> + KnowsPathSegment<PathSegment = <Self as KnowsPathSegment>::PathSegment>, Self::RelativeType: HasRelativeAccess<'a, RelativeType = <Self as KnowsRelativeAccessType<'a>>::RelativeType, PathSegment = <Self as KnowsPathSegment>::PathSegment>,

source§

fn relative<K>( self, path: impl IntoIterator<Item = K> ) -> Option<Self::RelativeType>
where K: Into<<Self as KnowsPathSegment>::PathSegment>,

source§

impl<'a, Parent, Value> HasRoot<'a> for &'a Visitor<Parent, Value>
where &'a Parent: HasRoot<'a>,

source§

fn root(self) -> Self::Root

source§

impl<'a, Parent, Value> HasValue<'a> for &'a Visitor<Parent, Value>

source§

fn value(self) -> Self::Value

source§

impl<'a, Parent, Value> HasValue<'a> for &'a mut Visitor<Parent, Value>

source§

fn value(self) -> Self::Value

source§

impl<'a, Parent, Value> HasValue<'a> for Visitor<Parent, Value>

source§

fn value(self) -> Self::Value

source§

impl<'a, Parent, Value> HasVisitorConstructor<'a> for Visitor<Parent, Value>
where Value: KnowsVisitor<'a, Visitor = Visitor<Parent, Value>>,

source§

fn new_with_parent(parent: Parent, value: Value) -> Visitor<Parent, Value>

source§

impl<'a, Parent, Value> KnowsBranches<'a> for Visitor<Parent, Value>
where Value: KnowsBranches<'a>, Value::Branches: KnowsVisitor<'a>,

§

type Branches = <<Value as KnowsBranches<'a>>::Branches as KnowsVisitor<'a>>::Visitor

source§

impl<'a, Parent, Value> KnowsGetType<'a> for Visitor<Parent, Value>
where Value: KnowsGetType<'a>, Value::GetType: KnowsVisitor<'a>,

§

type GetType = <<Value as KnowsGetType<'a>>::GetType as KnowsVisitor<'a>>::Visitor

source§

impl<'a, Parent, Value> KnowsParent<'a> for Visitor<Parent, Value>

§

type Parent = Parent

source§

impl<Parent, Value> KnowsPathSegment for Visitor<Parent, Value>
where Value: KnowsPathSegment,

source§

impl<'a, Parent, Value> KnowsRelativeAccessType<'a> for Visitor<Parent, Value>
where Value: KnowsRelativeAccessType<'a>,

source§

impl<'a, Parent, Value> KnowsRoot<'a> for Visitor<Parent, Value>
where &'a Parent: KnowsRoot<'a>, Parent: 'a,

§

type Root = <&'a Parent as KnowsRoot<'a>>::Root

source§

impl<'a, Parent, Value> KnowsValue<'a> for Visitor<Parent, Value>

§

type Value = Value

source§

impl<Parent, Value> KnowsVisitor<'_> for Visitor<Parent, Value>

§

type Visitor = Visitor<Parent, Value>

Auto Trait Implementations§

§

impl<Parent, Value> RefUnwindSafe for Visitor<Parent, Value>
where Parent: RefUnwindSafe, Value: RefUnwindSafe,

§

impl<Parent, Value> Send for Visitor<Parent, Value>
where Parent: Send, Value: Send,

§

impl<Parent, Value> Sync for Visitor<Parent, Value>
where Parent: Sync, Value: Sync,

§

impl<Parent, Value> Unpin for Visitor<Parent, Value>
where Parent: Unpin, Value: Unpin,

§

impl<Parent, Value> UnwindSafe for Visitor<Parent, Value>
where Parent: UnwindSafe, Value: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<'a, T> IsVisitor<'a> for T
where T: KnowsParent<'a> + KnowsValue<'a>,

source§

fn visit<Child: KnowsVisitor<'a>>(&self, value: Child) -> Child::Visitor
where Child::Visitor: HasVisitorConstructor<'a, Value = Child>, Self: Into<<Child::Visitor as KnowsParent<'a>>::Parent> + Clone,

source§

impl<'a, T> IterType<'a> for T

source§

fn iter_type<Value>( self ) -> TypeIterator<<Self as KnowsVisitorOf<'a, Value>>::Visitor>
where Self: KnowsVisitorOf<'a, Value> + TypeIter<'a, <Self as KnowsVisitorOf<'a, Value>>::Visitor> + Sized,

source§

fn iter_type_with_parent<Value>( self, parent: Option<<<Self as KnowsVisitorOf<'a, Value>>::Visitor as KnowsParent<'a>>::Parent> ) -> TypeIterator<<Self as KnowsVisitorOf<'a, Value>>::Visitor>
where Self: KnowsVisitorOf<'a, Value> + TypeIter<'a, <Self as KnowsVisitorOf<'a, Value>>::Visitor> + Sized,

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.