Struct prettytable::format::TableFormat
source · [−]pub struct TableFormat { /* private fields */ }
Expand description
Contains the table formatting rules
Implementations
sourceimpl TableFormat
impl TableFormat
sourcepub fn new() -> TableFormat
pub fn new() -> TableFormat
Create a new empty TableFormat.
sourcepub fn get_padding(&self) -> (usize, usize)
pub fn get_padding(&self) -> (usize, usize)
Return a tuple with left and right padding
sourcepub fn column_separator(&mut self, separator: char)
pub fn column_separator(&mut self, separator: char)
Set the character used for internal column separation
sourcepub fn left_border(&mut self, border: char)
pub fn left_border(&mut self, border: char)
Set the character used for left table border
sourcepub fn right_border(&mut self, border: char)
pub fn right_border(&mut self, border: char)
Set the character used for right table border
sourcepub fn separator(&mut self, what: LinePosition, separator: LineSeparator)
pub fn separator(&mut self, what: LinePosition, separator: LineSeparator)
Set a line separator
sourcepub fn separators(&mut self, what: &[LinePosition], separator: LineSeparator)
pub fn separators(&mut self, what: &[LinePosition], separator: LineSeparator)
Set format for multiple kind of line separator
sourcepub fn indent(&mut self, spaces: usize)
pub fn indent(&mut self, spaces: usize)
Set global indentation in spaces used when rendering a table
sourcepub fn get_indent(&self) -> usize
pub fn get_indent(&self) -> usize
Get global indentation in spaces used when rendering a table
sourcepub fn get_column_separator(&self, pos: ColumnPosition) -> Option<char>
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
Trait Implementations
sourceimpl Clone for TableFormat
impl Clone for TableFormat
sourcefn clone(&self) -> TableFormat
fn clone(&self) -> TableFormat
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TableFormat
impl Debug for TableFormat
sourceimpl Default for TableFormat
impl Default for TableFormat
sourceimpl From<TableFormat> for FormatBuilder
impl From<TableFormat> for FormatBuilder
sourcefn from(fmt: TableFormat) -> Self
fn from(fmt: TableFormat) -> Self
Converts to this type from the input type.
sourceimpl Hash for TableFormat
impl Hash for TableFormat
sourceimpl Into<TableFormat> for FormatBuilder
impl Into<TableFormat> for FormatBuilder
sourcefn into(self) -> TableFormat
fn into(self) -> TableFormat
Converts this type into the (usually inferred) input type.
sourceimpl PartialEq<TableFormat> for TableFormat
impl PartialEq<TableFormat> for TableFormat
sourcefn eq(&self, other: &TableFormat) -> bool
fn eq(&self, other: &TableFormat) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TableFormat) -> bool
fn ne(&self, other: &TableFormat) -> bool
This method tests for !=
.
impl Copy for TableFormat
impl Eq for TableFormat
impl StructuralEq for TableFormat
impl StructuralPartialEq for TableFormat
Auto Trait Implementations
impl RefUnwindSafe for TableFormat
impl Send for TableFormat
impl Sync for TableFormat
impl Unpin for TableFormat
impl UnwindSafe for TableFormat
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more