pub enum Alignment {
    Horizontal(AlignmentHorizontal),
    Vertical(AlignmentVertical),
}
Expand description

Alignment represent a horizontal and vertical alignment setting for any cell on a Table.

let mut table = Table::new(&data);
table.with(Modify::new(Rows::single(0)).with(Alignment::center()));

Variants

Horizontal(AlignmentHorizontal)

A horizontal alignment.

Vertical(AlignmentVertical)

A vertical alignment.

Implementations

Left constructs a horizontal alignment to AlignmentHorizontal::Left

Right constructs a horizontal alignment to AlignmentHorizontal::Right

Notice

When you use MinWidth the alignment might not work as you expected. You could try to apply TrimStrategy which may help.

Center constructs a horizontal alignment to AlignmentHorizontal::Center

Notice

When you use MinWidth the alignment might not work as you expected. You could try to apply TrimStrategy which may help.

Top constructs a vertical alignment to AlignmentVertical::Top

Bottom constructs a vertical alignment to AlignmentVertical::Bottom

Center_vertical constructs a vertical alignment to AlignmentVertical::Center

Trait Implementations

Modification function of a single cell.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
The function modifies a Grid object.

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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.