[][src]Struct regex_syntax::ast::print::Printer

pub struct Printer { /* fields omitted */ }

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.

Methods

impl Printer
[src]

pub fn new() -> Printer
[src]

Create a new printer.

pub fn print<W: Write>(&mut self, ast: &Ast, wtr: W) -> Result
[src]

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

impl Debug for Printer
[src]

Auto Trait Implementations

impl Send for Printer

impl Sync for Printer

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]