Struct is_tree::visitor::Visitor

source ·
pub struct Visitor<Parent, Value> {
    pub internal: Rc<Internal<Parent, Value>>,
}

Fields§

§internal: Rc<Internal<Parent, Value>>

Implementations§

source§

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

source

pub fn new_with_parent(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> HasGet<'a> for &'a Visitor<Parent, Value>
where Value: Clone + KnowsPathSegment + HasGet<'a>, Value::GetType: KnowsPathSegment<PathSegment = Value::PathSegment> + KnowsParentVisitor<'a>, Self: Into<<Value::GetType as KnowsParentVisitor<'a>>::ParentVisitor>,

source§

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

source§

impl<'a, Parent, Value> HasGet<'a> for Visitor<Parent, Value>
where Value: Clone + KnowsPathSegment + HasGet<'a>, Value::GetType: KnowsPathSegment<PathSegment = Value::PathSegment> + KnowsParentVisitor<'a>, Self: Into<<Value::GetType as KnowsParentVisitor<'a>>::ParentVisitor>,

source§

fn get<K>(self, key: K) -> Option<Self::GetType>
where K: 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<'a, Parent, Value> HasPath<<Value as KnowsPathSegment>::PathSegment> for Visitor<Parent, Value>
where Value: HasPathSegment, Parent: HasPath<Value::PathSegment>,

source§

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

source§

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

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 Self: Into<Self::RelativeType> + KnowsPathSegment + HasRoot<'a> + HasGet<'a> + Into<<<Self as KnowsGetType<'a>>::GetType as KnowsParentVisitor<'a>>::ParentVisitor>, Parent: Into<Self::RelativeType> + Clone + 'a, Value: KnowsPathSegment + KnowsRelativeAccessType<'a> + KnowsParentVisitor<'a, ParentVisitor = Parent> + 'a, <Self as KnowsRoot<'a>>::Root: Into<Self::RelativeType>, &'a Parent: HasRoot<'a, Root = <Self as KnowsRoot<'a>>::Root>, &'a Value::RelativeType: HasRoot<'a, Root = <Self as KnowsRoot<'a>>::Root> + HasRelativeAccess<'a> + KnowsRelativeAccessType<'a, RelativeType = Self::RelativeType> + KnowsPathSegment<PathSegment = <Self as KnowsPathSegment>::PathSegment> + HasParent<'a>, <Self as KnowsGetType<'a>>::GetType: KnowsParentVisitor<'a> + Into<Self::RelativeType> + KnowsPathSegment<PathSegment = <Self as KnowsPathSegment>::PathSegment>, <Self as KnowsParent<'a>>::Parent: Into<Self::RelativeType>,

source§

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

source§

impl<'a, Value> HasRoot<'a> for &'a Visitor<Value::ParentVisitor, Value>
where Value: KnowsParentVisitor<'a>, Value::ParentVisitor: HasRoot<'a> + Clone,

source§

fn root(self) -> Self::Root

source§

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

source§

fn visit<Child>(self, value: Child) -> Visitor<Child::ParentVisitor, Child>
where Child: KnowsPathSegment<PathSegment = <Value as KnowsPathSegment>::PathSegment> + KnowsParentVisitor<'a>, Self: Into<Child::ParentVisitor>,

source§

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

§

type GetType = Visitor<<<Value as KnowsGetType<'a>>::GetType as KnowsParentVisitor<'a>>::ParentVisitor, <Value as KnowsGetType<'a>>::GetType>

source§

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

§

type GetType = Visitor<<<Value as KnowsGetType<'a>>::GetType as KnowsParentVisitor<'a>>::ParentVisitor, <Value as KnowsGetType<'a>>::GetType>

source§

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

§

type Parent = Parent

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<'a, Value> KnowsRoot<'a> for &'a Visitor<Value::ParentVisitor, Value>
where Value: KnowsParentVisitor<'a>, Value::ParentVisitor: KnowsRoot<'a> + Clone,

§

type Root = <<Value as KnowsParentVisitor<'a>>::ParentVisitor as KnowsRoot<'a>>::Root

source§

impl<'a, Value> KnowsRoot<'a> for Visitor<Value::ParentVisitor, Value>
where Value: KnowsParentVisitor<'a>, Value::ParentVisitor: KnowsRoot<'a> + Clone,

§

type Root = <<Value as KnowsParentVisitor<'a>>::ParentVisitor as KnowsRoot<'a>>::Root

Auto Trait Implementations§

§

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: RefUnwindSafe, Value: RefUnwindSafe,

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<T> IterType for T

source§

fn iter_type<T>(&self) -> TypeIterator<'_, T>
where Self: TypeIter<T>,

source§

impl<T> IterTypeMut for T

source§

fn iter_type_mut<T>(&mut self) -> TypeIterMut<'_, T>
where Self: IntoIterTypeMut<T>,

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.