Trait mdbook::preprocess::Preprocessor[][src]

pub trait Preprocessor {
    fn name(&self) -> &str;
fn run(&self, ctx: &PreprocessorContext, book: Book) -> Result<Book>; fn supports_renderer(&self, _renderer: &str) -> bool { ... } }

An operation which is run immediately after loading a book into memory and before it gets rendered.

Required methods

fn name(&self) -> &str[src]

Get the Preprocessor’s name.

fn run(&self, ctx: &PreprocessorContext, book: Book) -> Result<Book>[src]

Run this Preprocessor, allowing it to update the book before it is given to a renderer.

Loading content...

Provided methods

fn supports_renderer(&self, _renderer: &str) -> bool[src]

A hint to MDBook whether this preprocessor is compatible with a particular renderer.

By default, always returns true.

Loading content...

Implementors

impl Preprocessor for CmdPreprocessor[src]

fn name(&self) -> &str[src]

fn run(&self, ctx: &PreprocessorContext, book: Book) -> Result<Book>[src]

fn supports_renderer(&self, renderer: &str) -> bool[src]

impl Preprocessor for IndexPreprocessor[src]

fn name(&self) -> &str[src]

fn run(&self, ctx: &PreprocessorContext, book: Book) -> Result<Book>[src]

impl Preprocessor for LinkPreprocessor[src]

fn name(&self) -> &str[src]

fn run(&self, ctx: &PreprocessorContext, book: Book) -> Result<Book>[src]

Loading content...