#log-messages #machines #humans #derive #information #outputting #convey

macro convey_derive

A Rust create for outputting information and log messages for humans and machines

2 unstable releases

Uses old Rust 2015

0.2.0 Dec 31, 2018
0.1.0 Oct 12, 2018

#9 in #outputting


Used in convey

Apache-2.0 OR MIT

8KB
70 lines

Convey Derive

Easily Output Your Data for Humans and Machines Alike

Build Status

This is very much work in progress. You can find a draft of initial ideas here.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

Custom derives for output.rs

Examples

extern crate convey;
#[macro_use] extern crate convey_derive;
#[macro_use] extern crate serde_derive;

#[derive(Serialize, RenderOutput)]
struct Message {
    code: i32,
    message: String,
}

let out = convey::new().add_target(test_target.target())?;
out.print(&Message {
    code: 42,
    message: String::from("Derive works"),
})?;

Dependencies

~2MB
~48K SLoC