pub enum Width {
Fixed(f32),
Fill,
Shrink,
Fraction(f32),
Min(f32),
Max(f32),
Range(f32, f32),
}Expand description
How a widget sizes itself on the horizontal axis.
Variants§
Fixed(f32)
Exactly f32 logical pixels wide.
Fill
Expand to fill all available width.
Shrink
Shrink to fit intrinsic content width.
Fraction(f32)
A fraction 0.0–1.0 of the parent’s available width.
Min(f32)
At least f32 pixels wide; may grow larger.
Max(f32)
At most f32 pixels wide; may be smaller.
Range(f32, f32)
Clamped between (min, max) pixels.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Width
impl RefUnwindSafe for Width
impl Send for Width
impl Sync for Width
impl Unpin for Width
impl UnsafeUnpin for Width
impl UnwindSafe for Width
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