|
@@ -28,10 +28,10 @@ pub trait Walker {
|
|
|
|
|
|
fn visit_struct<W: Walkable>(&mut self, struct_name: &'static str);
|
|
|
fn visit_field<W: Walkable>(&mut self, field_name: &'static str);
|
|
|
-
|
|
|
- fn visit_variant<W: Walkable>(&mut self, variant_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);
|
|
|
}
|
|
|
|
|
|
pub trait Walkable {
|
|
@@ -96,6 +96,10 @@ mod sw {
|
|
|
self.buffer += ")";
|
|
|
}
|
|
|
|
|
|
+ fn visit_skip_field(&mut self, field_name: &'static str) {
|
|
|
+ self.buffer += format!(" (skip_field:{})", field_name).as_str();
|
|
|
+ }
|
|
|
+
|
|
|
fn visit_variant<W: Walkable>(&mut self, variant_name: &'static str) {
|
|
|
self.buffer += format!(" (variant:{}", variant_name).as_str();
|
|
|
W::walk_with(self);
|