Struct prettytable::format::TableFormat [−][src]
pub struct TableFormat { /* fields omitted */ }Contains the table formatting rules
Methods
impl TableFormat[src]
impl TableFormatpub fn new() -> TableFormat[src]
pub fn new() -> TableFormatCreate a new empty TableFormat.
pub fn get_padding(&self) -> (usize, usize)[src]
pub fn get_padding(&self) -> (usize, usize)Return a tuple with left and right padding
pub fn padding(&mut self, left: usize, right: usize)[src]
pub fn padding(&mut self, left: usize, right: usize)Set left and right padding
pub fn column_separator(&mut self, separator: char)[src]
pub fn column_separator(&mut self, separator: char)Set the character used for internal column separation
pub fn borders(&mut self, border: char)[src]
pub fn borders(&mut self, border: char)Set the character used for table borders
pub fn left_border(&mut self, border: char)[src]
pub fn left_border(&mut self, border: char)Set the character used for left table border
pub fn right_border(&mut self, border: char)[src]
pub fn right_border(&mut self, border: char)Set the character used for right table border
pub fn separator(&mut self, what: LinePosition, separator: LineSeparator)[src]
pub fn separator(&mut self, what: LinePosition, separator: LineSeparator)Set a line separator
pub fn separators(&mut self, what: &[LinePosition], separator: LineSeparator)[src]
pub fn separators(&mut self, what: &[LinePosition], separator: LineSeparator)Set format for multiple kind of line separator
pub fn indent(&mut self, spaces: usize)[src]
pub fn indent(&mut self, spaces: usize)Set global indentation in spaces used when rendering a table
pub fn get_indent(&self) -> usize[src]
pub fn get_indent(&self) -> usizeGet 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<usize, Error>[src]
pub fn print_line_separator<T: Write + ?Sized>(
&self,
out: &mut T,
col_width: &[usize],
pos: LinePosition
) -> Result<usize, Error>: Will become private in future release. See issue #87
Print a full line separator to out. col_width is a slice containing the width of each column.
Returns the number of printed lines
pub fn get_column_separator(&self, pos: ColumnPosition) -> Option<char>[src]
pub fn get_column_separator(&self, pos: ColumnPosition) -> Option<char>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]
pub fn print_column_separator<T: Write + ?Sized>(
&self,
out: &mut T,
pos: ColumnPosition
) -> Result<(), Error>: Will become private in future release. See issue #87
Print a column separator or a table border
Trait Implementations
impl Clone for TableFormat[src]
impl Clone for TableFormatfn clone(&self) -> TableFormat[src]
fn clone(&self) -> TableFormatReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for TableFormat[src]
impl Debug for TableFormatfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Copy for TableFormat[src]
impl Copy for TableFormatimpl Hash for TableFormat[src]
impl Hash for TableFormatfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)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]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl PartialEq for TableFormat[src]
impl PartialEq for TableFormatfn eq(&self, other: &TableFormat) -> bool[src]
fn eq(&self, other: &TableFormat) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &TableFormat) -> bool[src]
fn ne(&self, other: &TableFormat) -> boolThis method tests for !=.
impl Eq for TableFormat[src]
impl Eq for TableFormatimpl Default for TableFormat[src]
impl Default for TableFormatimpl Into<TableFormat> for FormatBuilder[src]
impl Into<TableFormat> for FormatBuilderfn into(self) -> TableFormat[src]
fn into(self) -> TableFormatPerforms the conversion.
impl From<TableFormat> for FormatBuilder[src]
impl From<TableFormat> for FormatBuilderfn from(fmt: TableFormat) -> Self[src]
fn from(fmt: TableFormat) -> SelfPerforms the conversion.
Auto Trait Implementations
impl Send for TableFormat
impl Send for TableFormatimpl Sync for TableFormat
impl Sync for TableFormat