cli_display_table

Function cli_display_table 

Source
pub fn cli_display_table<C: Display, R: Display>(columns: &[C], rows: &[Vec<R>])
Expand description

Displays data in a formatted table.

Renders data in a tabular format similar to SQL database output, with borders and properly aligned columns. Column widths are automatically calculated based on the content.

§Arguments

  • columns - Slice of column headers
  • rows - Slice of rows, where each row is a vector of cell values

§Example

use falcon_cli::cli_display_table;

let columns = ["Name", "Age", "City"];
let rows = vec![
    vec!["Alice", "30", "New York"],
    vec!["Bob", "25", "London"],
    vec!["Charlie", "35", "Tokyo"],
];

cli_display_table(&columns, &rows);