pub enum Dim {
Points(f32),
Percent(f32),
Auto,
}Expand description
A length/percentage/auto dimension (mirrors Yoga’s percent vs. point APIs).
Used for width, height, min/max, flex-basis, and inset properties. Percentage is stored as 0–100 (ink JS convention); the taffy mapping divides by 100 to obtain 0.0–1.0.
Variants§
Points(f32)
A fixed size in terminal cells.
Percent(f32)
A percentage (0–100) of the parent’s corresponding dimension.
Auto
Automatic sizing (yoga/taffy default).
Trait Implementations§
impl StructuralPartialEq for Dim
Auto Trait Implementations§
impl Freeze for Dim
impl RefUnwindSafe for Dim
impl Send for Dim
impl Sync for Dim
impl Unpin for Dim
impl UnsafeUnpin for Dim
impl UnwindSafe for Dim
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