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
fn emit_text(&self, items: &Items, destination: &mut Write) -> Result<(), Error>
Emit human readable text.
fn emit_json(&self, items: &Items, destination: &mut Write) -> Result<(), Error>
Emit JSON.
Provided Methods
fn emit(
&self,
items: &Items,
destination: &mut Write,
format: OutputFormat
) -> Result<(), Error>
&self,
items: &Items,
destination: &mut Write,
format: OutputFormat
) -> Result<(), Error>
Emit this thing to the given destination in the given output format.