Trait pretty::Render

source ·
pub trait Render {
    type Error;

    // Required methods
    fn write_str(&mut self, s: &str) -> Result<usize, Self::Error>;
    fn fail_doc(&self) -> Self::Error;

    // Provided method
    fn write_str_all(&mut self, s: &str) -> Result<(), Self::Error> { ... }
}
Expand description

Trait representing the operations necessary to render a document

Required Associated Types§

Required Methods§

source

fn write_str(&mut self, s: &str) -> Result<usize, Self::Error>

source

fn fail_doc(&self) -> Self::Error

Provided Methods§

source

fn write_str_all(&mut self, s: &str) -> Result<(), Self::Error>

Implementors§

source§

impl<W> Render for FmtWrite<W>
where W: Write,

§

type Error = Error

source§

impl<W> Render for IoWrite<W>
where W: Write,

§

type Error = Error