Struct prettytable::format::TableFormat
[−]
[src]
pub struct TableFormat { // some fields omitted }
Contains the table formatting rules
Methods
impl TableFormat
[src]
fn new() -> TableFormat
Create a new empty TableFormat.
fn get_padding(&self) -> (usize, usize)
Return a tuple with left and right padding
fn padding(&mut self, left: usize, right: usize)
Set left and right padding
fn column_separator(&mut self, separator: char)
Set the character used for internal column separation
fn borders(&mut self, border: char)
Set the character used for table borders
fn separator(&mut self, what: LinePosition, separator: LineSeparator)
Set a line separator
fn separators(&mut self, what: &[LinePosition], separator: LineSeparator)
Set format for multiple kind of line separator
fn print_line_separator<T: Write + ?Sized>(&self, out: &mut T, col_width: &[usize], pos: LinePosition) -> Result<(), Error>
Print a full line separator to out
. col_width
is a slice containing the width of each column
fn print_column_separator<T: Write + ?Sized>(&self, out: &mut T, pos: ColumnPosition) -> Result<(), Error>
Print a column separator or a table border
Trait Implementations
impl Copy for TableFormat
[src]
impl Debug for TableFormat
[src]
impl Clone for TableFormat
[src]
fn clone(&self) -> TableFormat
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more