Struct prettytable::Table [] [src]

pub struct Table { /* fields omitted */ }

An owned printable table

Methods

impl Table
[src]

Create an empty table

Create a table initialized with rows

Create a table from a CSV string

For more customisability use from_csv()

Create a table from a CSV file

For more customisability use from_csv()

Create a table from a CSV reader

Change the table format. Eg : Separators

Get a mutable reference to the internal format

Compute and return the number of column

Get the number of rows

Check if the table is empty

Set the optional title lines

Unset the title line

Get a mutable reference to a row

Get an immutable reference to a row

Append a row in the table, transferring ownership of this row to the table and returning a mutable reference to the row

Append an empty row in the table. Return a mutable reference to this new row.

Insert row at the position index, and return a mutable reference to this row. If index is higher than current numbers of rows, row is appended at the end of the table

Modify a single element in the table

Remove the row at position index. Silently skip if the row does not exist

Return an iterator over the immutable cells of the column specified by column

Return an iterator over the mutable cells of the column specified by column

Returns an iterator over immutable rows

Returns an iterator over mutable rows

Print the table to out

Print the table to terminal out, applying styles when needed

Print the table to standard output. Colors won't be displayed unless stdout is a tty terminal, or force_colorize is set to true. In ANSI terminals, colors are displayed using ANSI escape characters. When for example the output is redirected to a file, or piped to another program, the output is considered as not beeing tty, and ANSI escape characters won't be displayed unless force colorize is set to true.

Panic

Panic if writing to standard output fails

Print the table to standard output. Colors won't be displayed unless stdout is a tty terminal. This means that if stdout is redirected to a file, or piped to another program, no color will be displayed. To force colors rendering, use print_tty() method. Calling printstd() is equivalent to calling print_tty(false)

Panic

Panic if writing to standard output fails

Write the table to the specified writer.

Write the table to the specified writer.

This allows for format customisation.

Trait Implementations

impl Clone for Table
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Table
[src]

Formats the value using the given formatter.

impl Index<usize> for Table
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl IndexMut<usize> for Table
[src]

The method for the mutable indexing (container[index]) operation

impl Display for Table
[src]

Formats the value using the given formatter. Read more

impl<B: ToString, A: IntoIterator<Item = B>> FromIterator<A> for Table
[src]

Creates a value from an iterator. Read more

impl<T, A, B> From<T> for Table where
    B: ToString,
    A: IntoIterator<Item = B>,
    T: IntoIterator<Item = A>, 
[src]

Performs the conversion.

impl<'a> IntoIterator for &'a Table
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<'a> IntoIterator for &'a mut Table
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<'a> AsRef<TableSlice<'a>> for Table
[src]

Performs the conversion.