pub struct Visit<'v> { /* private fields */ }Expand description
A walk over a compiled config’s expressions.
Implementations§
Source§impl<'v> Visit<'v>
impl<'v> Visit<'v>
Sourcepub fn new(visitor: &'v mut dyn ExprVisitor, root: AuthoredPath) -> Self
pub fn new(visitor: &'v mut dyn ExprVisitor, root: AuthoredPath) -> Self
A walk reporting to visitor, with paths below root.
Sourcepub fn at(&mut self, seg: impl Into<PathSeg>, f: impl FnOnce(&mut Self))
pub fn at(&mut self, seg: impl Into<PathSeg>, f: impl FnOnce(&mut Self))
Runs f one segment deeper.
Sourcepub fn recording(&mut self, records: bool, f: impl FnOnce(&mut Self))
pub fn recording(&mut self, records: bool, f: impl FnOnce(&mut Self))
Runs f with the records flag ORed in, restoring it after.
Sourcepub fn interpolated(&mut self, doc: &Interpolated)
pub fn interpolated(&mut self, doc: &Interpolated)
Reports an interpolated document at the current path.
Trait Implementations§
Auto Trait Implementations§
impl<'v> !RefUnwindSafe for Visit<'v>
impl<'v> !Send for Visit<'v>
impl<'v> !Sync for Visit<'v>
impl<'v> !UnwindSafe for Visit<'v>
impl<'v> Freeze for Visit<'v>
impl<'v> Unpin for Visit<'v>
impl<'v> UnsafeUnpin for Visit<'v>
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