macro_rules! summary {
(done: $msg:expr, $($rest:tt)*) => { ... };
(warn: $msg:expr, $($rest:tt)*) => { ... };
($($rest:tt)*) => { ... };
}Expand description
Build and print a styled summary block at the end of a run.
§Syntax
use cli_ui::{summary, styles::{paint, CYAN, YELLOW, DIM, OK}};
summary! {
done: "All assets localized", // or warn: "..." for yellow badge
"input" => paint(CYAN, "in.html"),
"output" => paint(CYAN, "dist/"),
section, // starts new alignment group
"assets" => format!("{} remote", paint(OK, "19")),
"size" => paint(YELLOW, "1.64 MB"),
"time" => paint(DIM, "13034ms"),
}The section, separator resets column alignment — keys in each section
are right-aligned independently.