pub enum Dimension {
Length(f32),
Percent(f32),
Auto,
}
Expand description
Variants§
Length(f32)
An absolute length in some abstract units. Users of Taffy may define what they correspond to in their application (pixels, logical pixels, mm, etc) as they see fit.
Percent(f32)
The dimension is stored in percentage relative to the parent item.
Auto
The dimension should be automatically computed
Implementations§
Trait Implementations§
source§impl From<LengthPercentage> for Dimension
impl From<LengthPercentage> for Dimension
source§fn from(input: LengthPercentage) -> Self
fn from(input: LengthPercentage) -> Self
Converts to this type from the input type.
source§impl From<LengthPercentageAuto> for Dimension
impl From<LengthPercentageAuto> for Dimension
source§fn from(input: LengthPercentageAuto) -> Self
fn from(input: LengthPercentageAuto) -> Self
Converts to this type from the input type.
source§impl FromLength for Dimension
impl FromLength for Dimension
source§impl FromPercent for Dimension
impl FromPercent for Dimension
impl Copy for Dimension
impl StructuralPartialEq for Dimension
Auto Trait Implementations§
impl Freeze for Dimension
impl RefUnwindSafe for Dimension
impl Send for Dimension
impl Sync for Dimension
impl Unpin for Dimension
impl UnwindSafe for Dimension
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)