Trait outline::parser::Printer

source ·
pub trait Printer: ParserConfig {
    fn print_code_block<'a>(&self, block: &CodeBlock<'a>) -> String;
    fn print_text_block<'a>(&self, block: &TextBlock<'a>) -> String;

    fn print_name(&self, name: String, vars: &[&str]) -> String { ... }
    fn print_line<'a>(&self, line: &Line<'a>, print_comments: bool) -> String { ... }
}
Expand description

A Printer can invert the parsing process, printing the code blocks how they should be rendered in the documentation text.

Required Methods

Prints a code block

Prints a text block

Provided Methods

Fills a name with its placeholders

Prints a line of a code block

Implementors