Struct mdbook::renderer::RenderContext [] [src]

pub struct RenderContext {
    pub version: String,
    pub root: PathBuf,
    pub book: Book,
    pub config: Config,
    pub destination: PathBuf,
}

The context provided to all renderers.

Fields

Which version of mdbook did this come from (as written in mdbook's Cargo.toml). Useful if you know the renderer is only compatible with certain versions of mdbook.

The book's root directory.

A loaded representation of the book itself.

The loaded configuration file.

Where the renderer must put any build artefacts generated. To allow renderers to cache intermediate results, this directory is not guaranteed to be empty or even exist.

Methods

impl RenderContext
[src]

[src]

Create a new RenderContext.

[src]

Get the source directory's (absolute) path on disk.

[src]

Load a RenderContext from its JSON representation.

Trait Implementations

impl Debug for RenderContext
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for RenderContext
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for RenderContext
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

Auto Trait Implementations

impl Send for RenderContext

impl Sync for RenderContext