Skip to main content

Renderer

Trait Renderer 

Source
pub trait Renderer {
    // Required method
    fn render(&mut self, doc: &Document);
}
Expand description

Display-layer contract. The adapter decides how to paint the AST.

Implementations are free to diff against their previous input to re-render only the changed blocks (the TUI adapter does exactly that).

Required Methods§

Source

fn render(&mut self, doc: &Document)

Render (or update) the given document.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§