MCPcopy Create free account
hub / github.com/devashishdxt/cli-table / main

Function main

cli-table/examples/simple.rs:5–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3use cli_table::{Cell, Style, Table, format::Justify, print_stdout};
4
5fn main() -> Result<()> {
6 let table = vec![
7 vec!["Tom".cell(), 10.cell().justify(Justify::Right)],
8 vec!["Jerry".cell(), 15.cell().justify(Justify::Right)],
9 vec!["Scooby Doo".cell(), 20.cell().justify(Justify::Right)],
10 ]
11 .table()
12 .title(vec![
13 "Name".cell().bold(true),
14 "Age (in years)".cell().bold(true),
15 ])
16 .bold(true);
17
18 print_stdout(table)
19}

Callers

nothing calls this directly

Calls 4

print_stdoutFunction · 0.85
tableMethod · 0.80
boldMethod · 0.45
titleMethod · 0.45

Tested by

no test coverage detected