Module sdml_core::model::walk

source ·
Expand description

Provides the capability to walk the in-memory model of an SDML module.

To use the model walker:

  1. Provide a type, say MyModuleWalker.
  2. Provide an implementation of [ModuleWalker] for MyModuleWalker.
  3. Implement any methods from the trait [ModuleWalker] of interest to you.
  4. Use the function [walk_module] and provide the module you wish to walk and your walker.
#[derive(Debug, Default)]
pub struct MyModuleWalker {}

impl ModuleWalker for MyModuleWalker {
    // implement some methods...
}

walk_module(&some_module, &mut MyModuleWalker::default());

Traits§

  • The trait that captures the callbacks that [walk_module] uses as it traverses the module.

Functions§