pub struct TreeColumnSet<'a, T: TreeModel> { /* private fields */ }Expand description
A dynamic column set parsed and validated once at construction.
Implementations§
Source§impl<'a, T: TreeModel> TreeColumnSet<'a, T>
impl<'a, T: TreeModel> TreeColumnSet<'a, T>
Sourcepub fn new(
columns: impl IntoIterator<Item = ColumnDef<'a, T>>,
) -> Result<Self, TreeColumnsError>
pub fn new( columns: impl IntoIterator<Item = ColumnDef<'a, T>>, ) -> Result<Self, TreeColumnsError>
Validates the set and records its single tree column.
§Errors
Returns TreeColumnsError when the set is empty or does not contain exactly one tree
column.
Sourcepub const fn header_style(self, style: Style) -> Self
pub const fn header_style(self, style: Style) -> Self
Sets the header style.
Sourcepub const fn without_header(self) -> Self
pub const fn without_header(self) -> Self
Hides the header.
Trait Implementations§
Source§impl<T: TreeModel> TreeColumns<T> for TreeColumnSet<'_, T>
impl<T: TreeModel> TreeColumns<T> for TreeColumnSet<'_, T>
fn column_count(&self) -> usize
fn tree_column_index(&self) -> usize
fn minimum_width(&self) -> u16
fn ideal_width(&self) -> u16
fn widths(&self, available: u16) -> SmallVec<[u16; 8]>
fn header(&self) -> Option<Row<'_>>
fn header_height(&self) -> u16
fn cells<'a>( &'a self, model: &'a T, id: T::Id, context: &TreeRowContext<'_>, tree_cell: Cell<'a>, ) -> SmallVec<[Cell<'a>; 8]>
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for TreeColumnSet<'a, T>
impl<'a, T> !Send for TreeColumnSet<'a, T>
impl<'a, T> !Sync for TreeColumnSet<'a, T>
impl<'a, T> !UnwindSafe for TreeColumnSet<'a, T>
impl<'a, T> Freeze for TreeColumnSet<'a, T>
impl<'a, T> Unpin for TreeColumnSet<'a, T>
impl<'a, T> UnsafeUnpin for TreeColumnSet<'a, 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