pub struct FormatBuilder { /* private fields */ }
Expand description
A builder to create a TableFormat
Implementations§
Source§impl FormatBuilder
impl FormatBuilder
Sourcepub fn new() -> FormatBuilder
pub fn new() -> FormatBuilder
Creates a new builder
Sourcepub fn column_separator(self, separator: char) -> Self
pub fn column_separator(self, separator: char) -> Self
Set the character used for internal column separation
Sourcepub fn left_border(self, border: char) -> Self
pub fn left_border(self, border: char) -> Self
Set the character used for left table border
Sourcepub fn right_border(self, border: char) -> Self
pub fn right_border(self, border: char) -> Self
Set the character used for right table border
Sourcepub fn separator(self, what: LinePosition, separator: LineSeparator) -> Self
pub fn separator(self, what: LinePosition, separator: LineSeparator) -> Self
Set a line separator format
Sourcepub fn separators(self, what: &[LinePosition], separator: LineSeparator) -> Self
pub fn separators(self, what: &[LinePosition], separator: LineSeparator) -> Self
Set separator format for multiple kind of line separators
Sourcepub fn indent(self, spaces: usize) -> Self
pub fn indent(self, spaces: usize) -> Self
Set global indentation in spaces used when rendering a table
Sourcepub fn build(&self) -> TableFormat
pub fn build(&self) -> TableFormat
Return the generated TableFormat
Trait Implementations§
Source§impl From<TableFormat> for FormatBuilder
impl From<TableFormat> for FormatBuilder
Source§fn from(fmt: TableFormat) -> Self
fn from(fmt: TableFormat) -> Self
Converts to this type from the input type.
Source§impl Into<TableFormat> for FormatBuilder
impl Into<TableFormat> for FormatBuilder
Source§fn into(self) -> TableFormat
fn into(self) -> TableFormat
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for FormatBuilder
impl RefUnwindSafe for FormatBuilder
impl Send for FormatBuilder
impl Sync for FormatBuilder
impl Unpin for FormatBuilder
impl UnwindSafe for FormatBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more