Struct stybulate::Table[][src]

pub struct Table<'a> { /* fields omitted */ }
Expand description

The Table structure

Example

use::stybulate::*;
let mut table = Table::new(
    Style::Fancy,
    vec![
        vec![Cell::from("answer"), Cell::Int(42)],
        vec![Cell::from("pi"), Cell::Float(3.1415)],
    ],
    Some(Headers::from(vec!["strings", "numbers"]))
);
table.set_align(Align::Center, Align::Right);

Implementations

Table constructor with default alignments (Align::Left for strings and Align::Decimal for numbers)

Set the table alignments (defaults are Align::Left for strings and Align::Decimal for numbers)

Panics

Panics if str_align is equal to Align::Decimal

Set the borders style

Feature

Needs feature ansi_term_style.

Creates the table as a String

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.