pub trait AstVisitor {
Show 17 methods
// Provided methods
fn walk_ast(&mut self, ast: &mut Vec<Block>) -> Result<()> { ... }
fn walk_vec_block(&mut self, blocks: &mut Vec<Block>) -> Result<()> { ... }
fn walk_block(&mut self, block: &mut Block) -> Result<()> { ... }
fn walk_vec_inline(&mut self, inlines: &mut Vec<Inline>) -> Result<()> { ... }
fn walk_inline(&mut self, inline: &mut Inline) -> Result<()> { ... }
fn visit_html_inline(&mut self, _input: &str) -> Result<()> { ... }
fn visit_vec_block(&mut self, blocks: &mut Vec<Block>) -> Result<()> { ... }
fn visit_block(&mut self, block: &mut Block) -> Result<()> { ... }
fn visit_vec_inline(&mut self, inlines: &mut Vec<Inline>) -> Result<()> { ... }
fn visit_inline(&mut self, inline: &mut Inline) -> Result<()> { ... }
fn visit_styled(
&mut self,
inlines: &mut Vec<Inline>,
_style: &mut Style,
) -> Result<()> { ... }
fn visit_code_block(&mut self, _block: &mut CodeBlock) -> Result<()> { ... }
fn visit_code(&mut self, _source: &mut CowStr) -> Result<()> { ... }
fn visit_math(&mut self, _math: &mut Math) -> Result<()> { ... }
fn visit_math_inline(&mut self, _source: &mut CowStr) -> Result<()> { ... }
fn walk_command(&mut self, body: &mut Option<Vec<Block>>) -> Result<()> { ... }
fn visit_command(&mut self, cmd: &mut Command) -> Result<()> { ... }
}
Expand description
Implements the visitor pattern for the cdoc Ast type. Blanket implementations are provided so implementors only have to implement the methods they need to modify.