Struct cli_table::TableStruct

source ·
pub struct TableStruct { /* private fields */ }
Expand description

Struct for building a table on command line

Implementations§

source§

impl TableStruct

source

pub fn title<T: Row>(self, title: T) -> Self

Used to add a title row of a table

source

pub fn border(self, border: Border) -> Self

Used to set border of a table

source

pub fn separator(self, separator: Separator) -> Self

Used to set column/row separators of a table

source

pub fn color_choice(self, color_choice: ColorChoice) -> Self

Used to set the color preferences for printing the table

source

pub fn display(&self) -> Result<TableDisplay>

Returns a struct which implements the Display trait

Trait Implementations§

source§

impl Style for TableStruct

source§

fn foreground_color(self, foreground_color: Option<Color>) -> Self

Used to set foreground color
source§

fn background_color(self, background_color: Option<Color>) -> Self

Used to set background color
source§

fn bold(self, bold: bool) -> Self

Used to set contents to be bold
source§

fn underline(self, underline: bool) -> Self

Used to set contents to be underlined
source§

fn italic(self, italic: bool) -> Self

Used to set contents to be italic
source§

fn intense(self, intense: bool) -> Self

Used to set high intensity version of a color specified
source§

fn dimmed(self, dimmed: bool) -> Self

Used to set contents to be dimmed
source§

impl Table for TableStruct

source§

fn table(self) -> TableStruct

Converts raw type to a table
source§

impl<R: Read> TryFrom<&mut Reader<R>> for TableStruct

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(reader: &mut Reader<R>) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.