Skip to main content

Render

Trait Render 

Source
pub trait Render<'a, T> {
    type Error;

    // Required methods
    fn write_all(&mut self, s: &[T]) -> Result<(), Self::Error>;
    fn fail_doc(&self) -> Self::Error;
}
Expand description

Trait representing the operations necessary to render a document

Required Associated Types§

Source

type Error

The type of the output

Required Methods§

Source

fn write_all(&mut self, s: &[T]) -> Result<(), Self::Error>

Write to the output

Source

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

Emit an error

Implementors§

Source§

impl<'a, T: Clone> Render<'a, T> for BufferWrite<T>

Source§

impl<'a, T: Text<'a>> Render<'a, T> for VecWrite<'_, T>

Available on crate feature std only.
Source§

type Error = &'static str

Source§

impl<'a, W, T: Text<'a>> Render<'a, T> for FmtWrite<W>
where W: Write,

Source§

impl<'a, W, T: Text<'a>> Render<'a, T> for IoWrite<W>
where W: Write,

Available on crate feature std only.
Source§

impl<'a, W, T: Text<'a>> Render<'a, T> for TerminalWriter<W>
where W: Write,