mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-24 16:42:28 +00:00
27 lines
506 B
Rust
27 lines
506 B
Rust
//! This example demonstrates a [`PoolTable`] usage.
|
|
|
|
use tabled::{
|
|
settings::{Alignment, Style},
|
|
tables::PoolTable,
|
|
};
|
|
|
|
fn main() {
|
|
let characters = [
|
|
"Naruto Uzumaki",
|
|
"Kakashi Hatake",
|
|
"Minato Namikaze",
|
|
"Jiraiya",
|
|
"Orochimaru",
|
|
"Itachi Uchiha",
|
|
];
|
|
|
|
let data = characters.chunks(2);
|
|
|
|
let table = PoolTable::new(data)
|
|
.with(Style::dots())
|
|
.with(Alignment::center())
|
|
.to_string();
|
|
|
|
println!("{table}");
|
|
}
|