pub struct Printer { /* private fields */ }
Expand description

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

Create a new printer.

Print the given Ast to the given writer. The writer must implement fmt::Write. Typical implementations of fmt::Write that can be used here are a fmt::Formatter (which is available in fmt::Display implementations) or a &mut String.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.