Trait crowbook::BookRenderer [] [src]

pub trait BookRenderer: Sync {
    fn render(&self, book: &Book, to: &mut Write) -> Result<()>;

    fn auto_path(&self, _book_file: &str) -> Result<String> { ... }
fn render_to_file(&self, book: &Book, path: &Path) -> Result<()> { ... } }

Thait that must be implemented by the various renderers to render a whole book.

Required Methods

Render the book and write the result to the specified writer

Provided Methods

Path destination when output is set to auto

Render the book to a given file.

The default implementation creates a file and calls render to write to it, but in some cases it might be useful to override it.

Implementors