pub trait CommandVisitor: HasDiagnostics + Sized {
// Provided methods
fn argument(&mut self, letter: char, value: Value<'_>, span: Span) { ... }
fn end_command(self, span: Span) { ... }
}Expand description
Visitor for a single command (one G, M, O, or T code and its arguments).
Created by a BlockVisitor’s start_*_code method. The parser calls
argument zero or more times (once per word,
e.g. X10 or Y-2.5), then end_command,
consuming this visitor.
Provided Methods§
Sourcefn argument(&mut self, letter: char, value: Value<'_>, span: Span)
fn argument(&mut self, letter: char, value: Value<'_>, span: Span)
One argument: address letter (e.g. 'X') and its Value with span.
Sourcefn end_command(self, span: Span)
fn end_command(self, span: Span)
Called once at the end of the command. The parser consumes this visitor after this call.
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.