pub struct ColumnSpec {
pub title: String,
pub width: Option<i32>,
}Expand description
One column of a columned collection widget.
This is the shared column vocabulary for WidgetKind::ListView’s
columned contract; the tree-grid and TreeView deepening
designs adopt the same type, so one column list describes any of them.
Cells are plain strings, mirroring WidgetSpec::data_grid_rows.
Fields§
§title: StringHeader text.
width: Option<i32>Preferred column width in logical pixels; None lets the lane pick
its default (most lanes size to the header and cell content).
Implementations§
Source§impl ColumnSpec
impl ColumnSpec
Sourcepub fn new(title: impl Into<String>) -> Self
pub fn new(title: impl Into<String>) -> Self
Creates a column with the given header text and no width preference.
Sourcepub fn with_width(self, width: i32) -> Self
pub fn with_width(self, width: i32) -> Self
Sets a preferred width in logical pixels. Non-positive values mean “no preference” (the lane picks its default), matching the shared size semantics elsewhere.
Trait Implementations§
Source§impl Clone for ColumnSpec
impl Clone for ColumnSpec
Source§impl Debug for ColumnSpec
impl Debug for ColumnSpec
impl Eq for ColumnSpec
Source§impl PartialEq for ColumnSpec
impl PartialEq for ColumnSpec
impl StructuralPartialEq for ColumnSpec
Auto Trait Implementations§
impl Forget for ColumnSpec
impl Freeze for ColumnSpec
impl Move for ColumnSpec
impl RefUnwindSafe for ColumnSpec
impl Send for ColumnSpecwhere
RawVecInner: Send,
impl Sync for ColumnSpecwhere
RawVecInner: Sync,
impl Unpin for ColumnSpec
impl UnsafeUnpin for ColumnSpec
impl UnwindSafe for ColumnSpecwhere
RawVecInner: UnwindSafe,
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