Struct term_table::table_cell::TableCell[][src]

pub struct TableCell<'data> {
    pub data: Cow<'data, str>,
    pub col_span: usize,
    pub alignment: Alignment,
    pub pad_content: bool,
}
Expand description

A table cell containing some str data.

A cell may span multiple columns by setting the value of col_span.

pad_content will add a space to either side of the cell’s content.AsRef

Fields

data: Cow<'data, str>col_span: usizealignment: Alignmentpad_content: bool

Implementations

Calculates the width of the cell.

New line characters are taken into account during the calculation.

The width of the cell’s content divided by its col_span value.

The minium width required to display the cell properly

Wraps the cell’s content to the provided width.

New line characters are taken into account.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.