pub enum Dimension {
Points(f32),
Percent(f32),
Auto,
}
Expand description
Variants§
Points(f32)
Points are abstract absolute 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 FromPercent for Dimension
impl FromPercent for Dimension
source§impl FromPoints for Dimension
impl FromPoints for Dimension
source§impl PartialEq for Dimension
impl PartialEq for Dimension
impl Copy for Dimension
impl StructuralPartialEq for Dimension
Auto Trait Implementations§
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