Macro convey::span

source ·
macro_rules! span {
    ($($token:tt)*) => { ... };
}
Expand description

Quickly write a span

Examples

#[macro_use] extern crate convey;

fn main() -> Result<(), convey::Error> {
    use convey::{components::text, human};

    let mut out = convey::new().add_target(human::stdout()?)?;

    let message = span!(fg = "red", [
        text("hello"),
    ]);

    out.print(message)?;
    Ok(())
}