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) -> Dimension
fn from(input: LengthPercentage) -> Dimension
Converts to this type from the input type.
source§impl From<LengthPercentageAuto> for Dimension
impl From<LengthPercentageAuto> for Dimension
source§fn from(input: LengthPercentageAuto) -> Dimension
fn from(input: LengthPercentageAuto) -> Dimension
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§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer