Struct prettytable::Table[][src]

pub struct Table { /* fields omitted */ }

An owned printable table

Methods

impl Table
[src]

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

Write the table to the specified writer.

Write the table to the specified writer.

This allows for format customisation.

impl Table
[src]

Create an empty table

Create a table initialized with rows

Change the table format. Eg : Separators

Get a mutable reference to the internal format

Deprecated since 0.8.0

: Will become private in future release. See issue #87

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

Important traits for ColumnIter<'a>

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

Important traits for ColumnIterMut<'a>

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

Important traits for Iter<'a, T>

Returns an iterator over immutable rows

Important traits for IterMut<'a, T>

Returns an iterator over mutable rows

Print the table to out and returns the number of lines printed, or an error

Print the table to terminal out, applying styles when needed and returns the number of lines printed, or an error

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.

Returns

The number of lines printed

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)

Returns

The number of lines printed

Panic

Panic if writing to standard output fails

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. Read more

impl Hash for Table
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for Table
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Table
[src]

impl Index<usize> for Table
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl IndexMut<usize> for Table
[src]

Performs 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 FromIterator<Row> 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: Into<Row>> Extend<A> for Table
[src]

Extends a collection with the contents of an iterator. Read more

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

Performs the conversion.

Auto Trait Implementations

impl Send for Table

impl Sync for Table