pub struct IntrinsicColumnWidth { /* private fields */ }Expand description
Sizes the column according to the intrinsic dimensions of all the cells in that column.
This is a very expensive way to size a column.
A flex value can be provided. If specified (and non-None), the column will participate in
the distribution of remaining space once all the non-flexible columns have been sized.
Implementations§
Source§impl IntrinsicColumnWidth
impl IntrinsicColumnWidth
Sourcepub const fn new(flex: Option<f64>) -> IntrinsicColumnWidth
pub const fn new(flex: Option<f64>) -> IntrinsicColumnWidth
Creates a column width based on intrinsic sizing.
This sizing algorithm is very expensive.
The flex argument specifies the flex factor to apply to the column if there is any
room left over when laying out the table. If flex is None (the default), the table
will not distribute any extra space to the column.
Trait Implementations§
Source§impl Debug for IntrinsicColumnWidth
impl Debug for IntrinsicColumnWidth
Source§impl TableColumnWidth for IntrinsicColumnWidth
impl TableColumnWidth for IntrinsicColumnWidth
Source§fn min_intrinsic_width(
&self,
app: &mut App,
cells: &[AnyRenderBox],
_container_width: f64,
) -> f64
fn min_intrinsic_width( &self, app: &mut App, cells: &[AnyRenderBox], _container_width: f64, ) -> f64
The smallest width that the column can have. Read more
Source§fn max_intrinsic_width(
&self,
app: &mut App,
cells: &[AnyRenderBox],
_container_width: f64,
) -> f64
fn max_intrinsic_width( &self, app: &mut App, cells: &[AnyRenderBox], _container_width: f64, ) -> f64
The ideal width that the column should have. This must be equal to or greater than the
min_intrinsic_width. The column might be bigger than this
width, e.g. if the column is flexible or if the table’s width ends up being forced to be
bigger than the sum of all the max_intrinsic_width values. Read moreSource§fn flex(&self, _app: &mut App, _cells: &[AnyRenderBox]) -> Option<f64>
fn flex(&self, _app: &mut App, _cells: &[AnyRenderBox]) -> Option<f64>
The flex factor to apply to the cell if there is any room left over when laying out the
table. The remaining space is distributed to any columns with flex in proportion to
their flex value (higher values get more space). Read more
Auto Trait Implementations§
impl Freeze for IntrinsicColumnWidth
impl RefUnwindSafe for IntrinsicColumnWidth
impl Send for IntrinsicColumnWidth
impl Sync for IntrinsicColumnWidth
impl Unpin for IntrinsicColumnWidth
impl UnsafeUnpin for IntrinsicColumnWidth
impl UnwindSafe for IntrinsicColumnWidth
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