pub struct Visit<'a> { /* private fields */ }Expand description
The read-only visitor that Leaves::visit reports to: it builds paths and dispatches
leaves, child trees, enum variants, mode flags and static fields to a Visitor.
Implementations§
Source§impl<'a> Visit<'a>
impl<'a> Visit<'a>
Sourcepub fn new(visitor: &'a mut dyn Visitor) -> Visit<'a>
pub fn new(visitor: &'a mut dyn Visitor) -> Visit<'a>
A visit reporting to visitor, starting at the root (empty path).
Sourcepub fn buffer(&mut self, name: &str, a: &(impl BufferLeaf + ?Sized))
pub fn buffer(&mut self, name: &str, a: &(impl BufferLeaf + ?Sized))
A buffer leaf (never trainable): an Array, or an Option<Array> that is a leaf
when present.
Sourcepub fn variant(&mut self, index: u32)
pub fn variant(&mut self, index: u32)
The active variant of an enum (its index), part of the structure.
Sourcepub fn mode(&mut self, training: bool)
pub fn mode(&mut self, training: bool)
A mode flag (true in training mode), part of the structure.
Sourcepub fn static_field(&mut self, name: &str, value: &(dyn Static + 'static))
pub fn static_field(&mut self, name: &str, value: &(dyn Static + 'static))
A static field, hashed into the structure.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Visit<'a>
impl<'a> !Send for Visit<'a>
impl<'a> !Sync for Visit<'a>
impl<'a> !UnwindSafe for Visit<'a>
impl<'a> Freeze for Visit<'a>
impl<'a> Unpin for Visit<'a>
impl<'a> UnsafeUnpin for Visit<'a>
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more