Crate convey[][src]

Easily output stuff for humans and machines alike

Examples

extern crate convey;

fn main() -> Result<(), convey::Error> {
    let mut out = convey::new().add_target(convey::human::stdout()?);
    out.print(convey::components::text("hello world!"))?;
    Ok(())
}

Modules

components

Components to help build your output from.

human

Human output

json

JSON output

Macros

render_for_humans

Shorthand for writing the render_for_humans method of the Render trait

render_json

Shorthand for writing the render_json method of the Render trait

span

Quickly write a span

Structs

Output

Structure holding your output targets

Enums

Error

Output's error type

Target

Known targets to write to

Traits

Render

Implement this for your own components

Functions

new

Create a new output