pub struct ColumnSize {
pub width: f64,
pub min_width: f64,
pub max_width: f64,
pub flex: f64,
}Expand description
Size info for a single column.
Tracks width constraints and the current size of a column.
Fields§
§width: f64Current width in pixels.
min_width: f64Minimum width in pixels.
max_width: f64Maximum width in pixels.
flex: f64Flex grow factor.
Implementations§
Source§impl ColumnSize
impl ColumnSize
Sourcepub const DEFAULT_WIDTH: f64 = 150.0
pub const DEFAULT_WIDTH: f64 = 150.0
Default column width.
Sourcepub const DEFAULT_MIN_WIDTH: f64 = 50.0
pub const DEFAULT_MIN_WIDTH: f64 = 50.0
Default minimum width.
Sourcepub const DEFAULT_MAX_WIDTH: f64 = f64::MAX
pub const DEFAULT_MAX_WIDTH: f64 = f64::MAX
Default maximum width.
Sourcepub fn new() -> ColumnSize
pub fn new() -> ColumnSize
Creates a new column size with defaults.
§Returns
ColumnSize: A new column size with default width and constraints.
Sourcepub fn with_width(width: f64) -> ColumnSize
pub fn with_width(width: f64) -> ColumnSize
Sourcepub fn with_min(self, min: f64) -> ColumnSize
pub fn with_min(self, min: f64) -> ColumnSize
Sourcepub fn with_max(self, max: f64) -> ColumnSize
pub fn with_max(self, max: f64) -> ColumnSize
Sourcepub fn with_flex(self, flex: f64) -> ColumnSize
pub fn with_flex(self, flex: f64) -> ColumnSize
Trait Implementations§
Source§impl Clone for ColumnSize
impl Clone for ColumnSize
Source§fn clone(&self) -> ColumnSize
fn clone(&self) -> ColumnSize
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColumnSize
impl Debug for ColumnSize
Source§impl Default for ColumnSize
Provides a default column size with standard width and constraints.
impl Default for ColumnSize
Provides a default column size with standard width and constraints.
Source§fn default() -> ColumnSize
fn default() -> ColumnSize
Returns the “default value” for a type. Read more
Source§impl PartialEq for ColumnSize
impl PartialEq for ColumnSize
impl Copy for ColumnSize
impl StructuralPartialEq for ColumnSize
Auto Trait Implementations§
impl Freeze for ColumnSize
impl RefUnwindSafe for ColumnSize
impl Send for ColumnSize
impl Sync for ColumnSize
impl Unpin for ColumnSize
impl UnsafeUnpin for ColumnSize
impl UnwindSafe for ColumnSize
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.