pub struct Column { /* private fields */ }Expand description
A column of a table: its header, what it does with a cell wider than it gets, and which edge its cells sit against.
The overflow applies to the header as well as to the cells.
Implementations§
Source§impl Column
impl Column
Sourcepub fn new(header: impl Into<Text>) -> Self
pub fn new(header: impl Into<Text>) -> Self
A column headed by header. A &str or a String is in the default
style, and a Text keeps its own styles.
Sourcepub fn untitled() -> Self
pub fn untitled() -> Self
A column with no header. A table draws a header row only when at least one of its columns has a header. Then this column’s header cell is empty.
Sourcepub fn overflow(self, overflow: Overflow) -> Self
pub fn overflow(self, overflow: Overflow) -> Self
Sets what the column does with a cell wider than it gets: keep words
whole, fold them, or cut the line with an ellipsis. The default is
Overflow::KeepWords.
Sourcepub fn numeric(self) -> Self
pub fn numeric(self) -> Self
Aligns every cell of the column to the right, header included, so
numbers line up on their last digit. This is align
with Align::Right.
Sourcepub fn align(self, align: Align) -> Self
pub fn align(self, align: Align) -> Self
Aligns every cell of the column, header included, against the edge
that align selects. The default is Align::Left.