Skip to main content

Backend

Trait Backend 

Source
pub trait Backend {
    // Required methods
    fn caps(&self) -> BackendCaps;
    fn write_line(&mut self, line: &Line<'_>, out: &mut dyn Write) -> Result<()>;

    // Provided methods
    fn begin(&mut self, out: &mut dyn Write) -> Result<()> { ... }
    fn finish(&mut self, out: &mut dyn Write) -> Result<()> { ... }
}
Expand description

Writes laid-out lines. Sees neither events nor readers.

Required Methods§

Source

fn caps(&self) -> BackendCaps

Source

fn write_line(&mut self, line: &Line<'_>, out: &mut dyn Write) -> Result<()>

Provided Methods§

Source

fn begin(&mut self, out: &mut dyn Write) -> Result<()>

Source

fn finish(&mut self, out: &mut dyn Write) -> Result<()>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§