[][src]Struct prettytable::format::TableFormat

pub struct TableFormat { /* fields omitted */ }

Contains the table formatting rules

Methods

impl TableFormat[src]

pub fn new() -> TableFormat[src]

Create a new empty TableFormat.

pub fn get_padding(&self) -> (usize, usize)[src]

Return a tuple with left and right padding

pub fn padding(&mut self, left: usize, right: usize)[src]

Set left and right padding

pub fn column_separator(&mut self, separator: char)[src]

Set the character used for internal column separation

pub fn borders(&mut self, border: char)[src]

Set the character used for table borders

pub fn separator(&mut self, what: LinePosition, separator: LineSeparator)[src]

Set a line separator

pub fn separators(&mut self, what: &[LinePosition], separator: LineSeparator)[src]

Set format for multiple kind of line separator

pub fn indent(&mut self, spaces: usize)[src]

Set global indentation in spaces used when rendering a table

pub fn get_indent(&self) -> usize[src]

Get global indentation in spaces used when rendering a table

pub fn print_line_separator<T: Write + ?Sized>(
    &self,
    out: &mut T,
    col_width: &[usize],
    pos: LinePosition
) -> Result<(), Error>
[src]

Print a full line separator to out. col_width is a slice containing the width of each column

pub fn get_column_separator(&self, pos: ColumnPosition) -> Option<char>[src]

Returns the character used to separate columns. pos specify if the separator is left/right final or internal to the table

pub fn print_column_separator<T: Write + ?Sized>(
    &self,
    out: &mut T,
    pos: ColumnPosition
) -> Result<(), Error>
[src]

Print a column separator or a table border

Trait Implementations

impl PartialEq<TableFormat> for TableFormat[src]

impl Default for TableFormat[src]

impl Clone for TableFormat[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl From<TableFormat> for FormatBuilder[src]

impl Into<TableFormat> for FormatBuilder[src]

impl Eq for TableFormat[src]

impl Copy for TableFormat[src]

impl Debug for TableFormat[src]

impl Hash for TableFormat[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

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

Auto Trait Implementations

impl Send for TableFormat

impl Sync for TableFormat

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]