Struct tabled::Table[][src]

pub struct Table { /* fields omitted */ }
Expand description

Table structure provides an interface for building a table for types that implements Tabled.

Example

Basic usage

    use tabled::Table;
    let data: Vec<&'static str> = Vec::new();
    let table = Table::new(data);
    println!("{}", table);

A list of settings

It may take a list of arguments such as Style, Alignment, ChangeRing

    use tabled::{Table, Style, Alignment, Full, Modify};
    let data = vec!["Hello", "2021"];
    let table = Table::new(&data)
                    .with(Style::psql())
                    .with(Modify::new(Full).with(Alignment::left()));
    println!("{}", table);

Implementations

New creates a Table instance.

With is a generic function which applies options to the table.

Trait Implementations

Formats the value using the given formatter. Read more

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.

Converts the given value to a String. Read more

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.