pub enum Sizing {
Fit(f32, f32),
Grow(f32, f32),
Fixed(f32),
Percent(f32),
}
Expand description
Represents different sizing strategies for layout elements.
Variants§
Fit(f32, f32)
Fits the element’s width/height within a min and max constraint.
Grow(f32, f32)
Expands the element to fill available space within min/max constraints.
Fixed(f32)
Sets a fixed width/height.
Percent(f32)
Sets width/height as a percentage of its parent. Value should be between 0.0
and 1.0
.
Trait Implementations§
Source§impl From<Sizing> for Clay_SizingAxis
Converts a Sizing
value into a Clay_SizingAxis
representation.
impl From<Sizing> for Clay_SizingAxis
Converts a Sizing
value into a Clay_SizingAxis
representation.
impl Copy for Sizing
Auto Trait Implementations§
impl Freeze for Sizing
impl RefUnwindSafe for Sizing
impl Send for Sizing
impl Sync for Sizing
impl Unpin for Sizing
impl UnwindSafe for Sizing
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