pub struct ColumnDef<T> {
pub header: String,
pub width: Constraint,
pub render: Box<dyn Fn(&T) -> Cell<'static>>,
}Expand description
Column definition for a table
Defines how a column should be rendered, including its header, width constraint, and a rendering function that converts the row data into a Cell.
Fields§
§header: StringColumn header text
width: ConstraintWidth constraint for this column
render: Box<dyn Fn(&T) -> Cell<'static>>Function to render a cell from row data
Implementations§
Auto Trait Implementations§
impl<T> Freeze for ColumnDef<T>
impl<T> !RefUnwindSafe for ColumnDef<T>
impl<T> !Send for ColumnDef<T>
impl<T> !Sync for ColumnDef<T>
impl<T> Unpin for ColumnDef<T>
impl<T> !UnwindSafe for ColumnDef<T>
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> 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