pub struct StructuralVisitEngine<Base = StructuralVisitorObj> { /* private fields */ }Expand description
Scoped Rust visitor runtime with a statically selected native base.
Enter through StructuralVisitEngine::visit_root. The engine owns the complete base
and the dispatcher reborrow handle, while the dispatcher stays in the outer
call. Engines and their owning handles are never exposed to callbacks.
Select a custom base with StructuralVisitEngine::<Base>::visit_root(root, input).
Handlers use StructuralVisitorView<'_, Target, Base> for recursion and
base-state inspection; normalization preserves the actual target’s identity.
Implementations§
Source§impl<Base: StructuralVisitorBase> StructuralVisitEngine<Base>
impl<Base: StructuralVisitorBase> StructuralVisitEngine<Base>
Sourcepub fn visit_root<'input, R, H, M, D, O>(
root: R,
dispatcher: H,
) -> Result<Option<VisitInterrupt>>where
R: Into<AnyView<'input>>,
O: BorrowMut<D>,
for<'v, 'c, 'r> H: IntoDispatcher<(AnyView<'v>, &'c mut StructuralVisitorView<'r, D, Base>), Option<Result<Option<VisitInterrupt>>>, M, Target = D, Output = O>,
for<'s, 'v, 'c, 'r> &'s mut D: Dispatcher<(AnyView<'v>, &'c mut StructuralVisitorView<'r, D, Base>), Option<Result<Option<VisitInterrupt>>>>,
pub fn visit_root<'input, R, H, M, D, O>(
root: R,
dispatcher: H,
) -> Result<Option<VisitInterrupt>>where
R: Into<AnyView<'input>>,
O: BorrowMut<D>,
for<'v, 'c, 'r> H: IntoDispatcher<(AnyView<'v>, &'c mut StructuralVisitorView<'r, D, Base>), Option<Result<Option<VisitInterrupt>>>, M, Target = D, Output = O>,
for<'s, 'v, 'c, 'r> &'s mut D: Dispatcher<(AnyView<'v>, &'c mut StructuralVisitorView<'r, D, Base>), Option<Result<Option<VisitInterrupt>>>>,
Visit root with dispatcher on the native base Base. See also structural_visit.
Auto Trait Implementations§
impl<Base = StructuralVisitorObj> !Send for StructuralVisitEngine<Base>
impl<Base = StructuralVisitorObj> !Sync for StructuralVisitEngine<Base>
impl<Base> Freeze for StructuralVisitEngine<Base>where
Base: Freeze,
impl<Base> RefUnwindSafe for StructuralVisitEngine<Base>where
Base: RefUnwindSafe,
impl<Base> Unpin for StructuralVisitEngine<Base>where
Base: Unpin,
impl<Base> UnsafeUnpin for StructuralVisitEngine<Base>where
Base: UnsafeUnpin,
impl<Base> UnwindSafe for StructuralVisitEngine<Base>where
Base: 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