[][src]Enum polyhorn_android::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 for Dimension<T> where
    T: Clone
[src]

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

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

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

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

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

type Err = ParseError

The associated error which can be returned from parsing.

impl<S> Parse<S> for Dimension<f32> where
    S: TokenStream, 
[src]

type Output = Dimension<f32>

The type that is parsed.

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

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

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

impl<T> ToTokens for Dimension<T> where
    T: ToTokens
[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> AsAny for T where
    T: Any
[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<'a, T> Desc<'a, T> for T[src]

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

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

impl<T> IsDefault for T where
    T: PartialEq<T> + Default + Copy
[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.