Struct prettytable::format::TableFormat [−][src]
pub struct TableFormat { /* fields omitted */ }
Contains the table formatting rules
Methods
impl TableFormat
[src]
impl TableFormat
pub fn new() -> TableFormat
[src]
pub fn new() -> TableFormat
Create 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) -> usize
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<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 TableFormat
fn clone(&self) -> TableFormat
[src]
fn clone(&self) -> TableFormat
Returns 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 TableFormat
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for TableFormat
[src]
impl Copy for TableFormat
impl Hash for TableFormat
[src]
impl Hash for TableFormat
fn 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 TableFormat
fn eq(&self, other: &TableFormat) -> bool
[src]
fn eq(&self, other: &TableFormat) -> bool
This 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) -> bool
This method tests for !=
.
impl Eq for TableFormat
[src]
impl Eq for TableFormat
impl Default for TableFormat
[src]
impl Default for TableFormat
impl Into<TableFormat> for FormatBuilder
[src]
impl Into<TableFormat> for FormatBuilder
fn into(self) -> TableFormat
[src]
fn into(self) -> TableFormat
Performs the conversion.
impl From<TableFormat> for FormatBuilder
[src]
impl From<TableFormat> for FormatBuilder
fn from(fmt: TableFormat) -> Self
[src]
fn from(fmt: TableFormat) -> Self
Performs the conversion.
Auto Trait Implementations
impl Send for TableFormat
impl Send for TableFormat
impl Sync for TableFormat
impl Sync for TableFormat