Expand description
Provides the capability to walk the in-memory model of an SDML module.
To use the model walker:
- Provide a type, say
MyModuleWalker
. - Provide an implementation of
SimpleModuleVisitor
forMyModuleWalker
. - Implement any methods from the trait
SimpleModuleVisitor
of interest to you. - Use the function
walk_module_simple
and provide the module you wish to walk and your walker.
ⓘ
#[derive(Debug, Default)]
pub struct MyModuleWalker {}
impl SimpleModuleVisitor for MyModuleWalker {
// implement some methods...
}
walk_module_simple(
&some_module, // module to walk
&mut MyModuleWalker::default(),
false, // ignore constraints
true // include members/variants
);
Traits§
- Simple
Module Visitor - The trait that captures the callbacks that
walk_module_simple
uses as it traverses the module.
Functions§
- walk_
module_ simple - Walk the module
module
calling the relevant methods onwalker
.