Trait twiggy_traits::Emit [] [src]

pub trait Emit {
    fn emit_text(
        &self,
        items: &Items,
        destination: &mut Write
    ) -> Result<(), Error>;
fn emit_json(
        &self,
        items: &Items,
        destination: &mut Write
    ) -> Result<(), Error>; fn emit(
        &self,
        items: &Items,
        destination: &mut Write,
        format: OutputFormat
    ) -> Result<(), Error> { ... } }

Anything that can write itself in the given output format to the given destination.

Required Methods

Emit human readable text.

Emit JSON.

Provided Methods

Emit this thing to the given destination in the given output format.

Implementors