Struct prettytable::format::TableFormat
[−]
[src]
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]
&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
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]
&self,
out: &mut T,
pos: ColumnPosition
) -> Result<(), Error>
Print a column separator or a table border
Trait Implementations
impl Clone for TableFormat[src]
fn clone(&self) -> TableFormat[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Debug for TableFormat[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Copy for TableFormat[src]
impl Hash for TableFormat[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)[src]
Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more
impl PartialEq for TableFormat[src]
fn eq(&self, __arg_0: &TableFormat) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &TableFormat) -> bool[src]
This method tests for !=.
impl Eq for TableFormat[src]
impl Default for TableFormat[src]
impl Into<TableFormat> for FormatBuilder[src]
fn into(self) -> TableFormat[src]
Performs the conversion.
impl From<TableFormat> for FormatBuilder[src]
fn from(fmt: TableFormat) -> Self[src]
Performs the conversion.