Skip to main content

Column

Struct Column 

Source
pub struct Column { /* private fields */ }
Expand description

A single column definition. Mirrors the used subset of rich.table.Column. A column of a Table, as upstream’s rich.table.Column. Read it with Table::columns; columns are added with the table’s add_column* methods.

Implementations§

Source§

impl Column

Read access to what a column holds: upstream’s public Column fields. Not upstream as methods; they change nothing.

Source

pub fn header(&self) -> &Cell

The header cell (upstream Column.header).

Source

pub fn footer(&self) -> &Cell

The footer cell (upstream Column.footer), shown with Table::show_footer.

Source

pub fn justify(&self) -> Justify

The justification of the column’s cells (upstream Column.justify).

Source

pub fn style(&self) -> &Style

The style of the column’s body cells (upstream Column.style).

Source

pub fn header_style(&self) -> Option<&Style>

The column’s header cell style, over the table’s header_style (upstream Column.header_style).

Source

pub fn footer_style(&self) -> Option<&Style>

The column’s footer cell style, over the table’s footer_style (upstream Column.footer_style).

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>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.