pub struct Column { /* private fields */ }Expand description
A column of a Table: a title, a width rule, an alignment and whether it can be sorted.
Implementations§
Source§impl Column
impl Column
Sourcepub fn new(title: impl Into<String>) -> Self
pub fn new(title: impl Into<String>) -> Self
A left-aligned column that shares the free room equally with other filling columns.
Sourcepub fn width(self, width: ColumnWidth) -> Self
pub fn width(self, width: ColumnWidth) -> Self
How wide the column is.
Sourcepub fn min(self, cells: u16) -> Self
pub fn min(self, cells: u16) -> Self
The fewest cells a fitting or filling column shrinks to. When the columns’ minimums do not fit, the table scrolls sideways instead of shrinking further. Filling columns keep their title’s width by default.
Sourcepub fn align(self, align: Align) -> Self
pub fn align(self, align: Align) -> Self
Where cell text sits; Align::End for numbers so their digits line up.
Sourcepub fn sortable(self, sortable: bool) -> Self
pub fn sortable(self, sortable: bool) -> Self
Lets the user sort by this column (needs Table::on_sort).
Trait Implementations§
impl Eq for Column
impl StructuralPartialEq for Column
Auto Trait Implementations§
impl Freeze for Column
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnsafeUnpin for Column
impl UnwindSafe for Column
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more