pub trait Walker {
Show 15 methods
// Required methods
fn visit_unit(&mut self);
fn visit_integer(&mut self, itype: IntegerType);
fn visit_str(&mut self);
fn visit_ref<W: Walkable>(&mut self);
fn visit_option<W: Walkable>(&mut self);
fn visit_tuple<W: Walkable>(&mut self);
fn visit_array<W: Walkable>(&mut self, length: usize);
fn visit_slice<W: Walkable>(&mut self);
fn visit_vec<W: Walkable>(&mut self);
fn visit_std_type<W: Walkable>(&mut self, std: StdType);
fn visit_struct<W: Walkable>(&mut self, struct_name: &'static str);
fn visit_field<W: Walkable>(&mut self, field_name: &'static str);
fn visit_skip_field(&mut self, field_name: &'static str);
fn visit_enum<W: Walkable>(&mut self, enum_name: &'static str);
fn visit_variant<W: Walkable>(&mut self, variant_name: &'static str);
}Expand description
User-facing type.
In the non-leaf functions (those that take a Walkable generic), if recursion
should take place, it can be invoked at a place of your choosing via W::walk_with(self).
Required Methods§
fn visit_unit(&mut self)
fn visit_integer(&mut self, itype: IntegerType)
fn visit_str(&mut self)
fn visit_ref<W: Walkable>(&mut self)
fn visit_option<W: Walkable>(&mut self)
fn visit_tuple<W: Walkable>(&mut self)
fn visit_array<W: Walkable>(&mut self, length: usize)
fn visit_slice<W: Walkable>(&mut self)
fn visit_vec<W: Walkable>(&mut self)
fn visit_std_type<W: Walkable>(&mut self, std: StdType)
fn visit_struct<W: Walkable>(&mut self, struct_name: &'static str)
fn visit_field<W: Walkable>(&mut self, field_name: &'static str)
fn visit_skip_field(&mut self, field_name: &'static str)
fn visit_enum<W: Walkable>(&mut self, enum_name: &'static str)
fn visit_variant<W: Walkable>(&mut self, variant_name: &'static str)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.