Skip to main content

Visitable

Trait Visitable 

Source
pub trait Visitable: Sanitize + Validate {
    // Provided methods
    fn drive(&self, _: &mut dyn VisitorCore) { ... }
    fn drive_mut(&mut self, _: &mut dyn VisitorMutCore) { ... }
}
Expand description

A node that participates in visitor-based traversal.

Invariants:

  • Traversal is owned by the visitor, not by sanitize/validate hooks.
  • drive / drive_mut describe structure only.
  • No validation or sanitization logic lives here.

Provided Methods§

Source

fn drive(&self, _: &mut dyn VisitorCore)

Source

fn drive_mut(&mut self, _: &mut dyn VisitorMutCore)

Implementations on Foreign Types§

Source§

impl Visitable for bool

Source§

impl Visitable for f32

Source§

impl Visitable for f64

Source§

impl Visitable for i8

Source§

impl Visitable for i16

Source§

impl Visitable for i32

Source§

impl Visitable for i64

Source§

impl Visitable for u8

Source§

impl Visitable for u16

Source§

impl Visitable for u32

Source§

impl Visitable for u64

Source§

impl Visitable for String

Source§

impl<T: Visitable + ?Sized> Visitable for Box<T>

Source§

fn drive(&self, visitor: &mut dyn VisitorCore)

Source§

fn drive_mut(&mut self, visitor: &mut dyn VisitorMutCore)

Source§

impl<T: Visitable> Visitable for Option<T>

Source§

fn drive(&self, visitor: &mut dyn VisitorCore)

Source§

fn drive_mut(&mut self, visitor: &mut dyn VisitorMutCore)

Source§

impl<T: Visitable> Visitable for Vec<T>

Source§

fn drive(&self, visitor: &mut dyn VisitorCore)

Source§

fn drive_mut(&mut self, visitor: &mut dyn VisitorMutCore)

Implementors§