pub enum Size {
Absolute {
initial: f32,
range: Rangef,
},
Relative {
fraction: f32,
range: Rangef,
},
Remainder {
range: Rangef,
},
}
Expand description
Size hint for table column/strip cell.
Variants§
Absolute
Absolute size in points, with a given range of allowed sizes to resize within.
Relative
Relative size relative to all available space.
Remainder
Multiple remainders each get the same space.
Implementations§
Source§impl Size
impl Size
Sourcepub fn relative(fraction: f32) -> Self
pub fn relative(fraction: f32) -> Self
Relative size relative to all available space. Values must be in range 0.0..=1.0
.
pub fn with_range(self, range: Rangef) -> Self
pub fn range_mut(&mut self) -> &mut Rangef
pub fn is_absolute(&self) -> bool
pub fn is_relative(&self) -> bool
pub fn is_remainder(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Size
impl RefUnwindSafe for Size
impl Send for Size
impl Sync for Size
impl Unpin for Size
impl UnwindSafe for Size
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