Struct Printer
pub struct Printer { /* private fields */ }
A printer for a regular expression abstract syntax tree.
A printer converts an abstract syntax tree (AST) to a regular expression pattern string. This particular printer uses constant stack space and heap space proportional to the size of the AST.
This printer will not necessarily preserve the original formatting of the regular expression pattern string. For example, all whitespace and comments are ignored.
Implementations
impl Printer
fn new() -> PrinterCreate a new printer.
fn print<W: Write>(&mut self, ast: &Ast, wtr: W) -> ResultPrint the given
Astto the given writer. The writer must implementfmt::Write. Typical implementations offmt::Writethat can be used here are afmt::Formatter(which is available infmt::Displayimplementations) or a&mut String.
Trait Implementations
impl Debug for Printer
fn fmt(&self, f: &mut Formatter<'_>) -> Result