[][src]Enum polyhorn_ui::geometry::Dimension

pub enum Dimension<T> {
    Undefined,
    Auto,
    Points(T),
    Percentage(T),
}

Represents an absolute or relative dimension.

Variants

Undefined

This is the default value for a dimension and resembles Dimension:::Points(0.0) and Dimension::Percentage(0.0).

Auto

Depending on the property that this dimension is used to, this value may have a special meaning. Otherwise, it's similar to Dimension::Undefined.

Points(T)

This is a dimension expressed in absolute units, where each unit represents a single pixel.

Percentage(T)

This is a dimension expressed in relative units, where 1.0 represents 100%.

Trait Implementations

impl<T: Clone> Clone for Dimension<T>[src]

impl<T: Copy> Copy for Dimension<T>[src]

impl<T: Debug> Debug for Dimension<T>[src]

impl<T> Default for Dimension<T>[src]

impl<T: Eq> Eq for Dimension<T>[src]

impl<T> FromStr for Dimension<T>[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl<T: PartialEq> PartialEq<Dimension<T>> for Dimension<T>[src]

impl<T> StructuralEq for Dimension<T>[src]

impl<T> StructuralPartialEq for Dimension<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Dimension<T> where
    T: RefUnwindSafe

impl<T> Send for Dimension<T> where
    T: Send

impl<T> Sync for Dimension<T> where
    T: Sync

impl<T> Unpin for Dimension<T> where
    T: Unpin

impl<T> UnwindSafe for Dimension<T> where
    T: UnwindSafe

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.