pub struct FractionColumnWidth {
pub value: f64,
}Expand description
Sizes the column to a fraction of the table’s constraints’ max_width.
This is a cheap way to size a column.
Fields§
§value: f64The fraction of the table’s constraints’ max_width that this column should occupy.
Implementations§
Source§impl FractionColumnWidth
impl FractionColumnWidth
Sourcepub const fn new(value: f64) -> FractionColumnWidth
pub const fn new(value: f64) -> FractionColumnWidth
Creates a column width based on a fraction of the table’s constraints’ max_width.
Trait Implementations§
Source§impl Debug for FractionColumnWidth
impl Debug for FractionColumnWidth
Source§impl TableColumnWidth for FractionColumnWidth
impl TableColumnWidth for FractionColumnWidth
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 as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Downcast support for Dart’s
is checks on a column width.Source§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 Forget for FractionColumnWidth
impl Freeze for FractionColumnWidth
impl Move for FractionColumnWidth
impl RefUnwindSafe for FractionColumnWidth
impl Send for FractionColumnWidth
impl Sync for FractionColumnWidth
impl Unpin for FractionColumnWidth
impl UnsafeUnpin for FractionColumnWidth
impl UnwindSafe for FractionColumnWidth
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.