clmm-common 0.1.39

Blockchain, Clmm for Solana
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use colored::Colorize;
use tabled::{object::Segment, Alignment, Modify, Table, Tabled};

pub fn render_list<I, T>(iter: I) -> String
where
    I: IntoIterator<Item = T>,
    T: Tabled,
{
    let color = tabled::style::Color::try_from(" ".cyan().to_string()).unwrap();

    Table::new(iter)
        .with(tabled::Style::rounded())
        .with(color)
        .with(Modify::new(Segment::all()).with(Alignment::center()))
        .to_string()
}