[−][src]Struct prettytable::format::TableFormat
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 PartialEq<TableFormat> for TableFormat
[src]
fn eq(&self, other: &TableFormat) -> bool
[src]
fn ne(&self, other: &TableFormat) -> bool
[src]
impl Default for TableFormat
[src]
impl Clone for TableFormat
[src]
fn clone(&self) -> 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]
fn from(fmt: TableFormat) -> Self
[src]
impl Into<TableFormat> for FormatBuilder
[src]
fn into(self) -> TableFormat
[src]
impl Eq for TableFormat
[src]
impl Copy for TableFormat
[src]
impl Debug for TableFormat
[src]
impl Hash for TableFormat
[src]
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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,