[][src]Enum polyhorn_ui::layout::LayoutAxisX

pub enum LayoutAxisX<T> {
    DirectionDependent {
        leading: T,
        trailing: T,
    },
    DirectionIndependent {
        left: T,
        right: T,
    },
}

Represents a potentially direction dependent horizontal layout axis.

Variants

DirectionDependent

A horizontal axis that depends on the layout direction.

Fields of DirectionDependent

leading: T

Contains the layout direction dependent leading value for this horizontal axis.

trailing: T

Contains the layout direction dependent leading value for this horizontal axis.

DirectionIndependent

A horizontal axis that is independent of the layout direction.

Fields of DirectionIndependent

left: T

Contains the layout direction independent left value for this horizontal axis.

right: T

Contains the layout direction independent right value for this horizontal axis.

Implementations

impl<T> LayoutAxisX<T>[src]

pub fn dependent(leading: T, trailing: T) -> LayoutAxisX<T>[src]

Returns a layout direction dependent horizontal axis with the given leading and trailing values.

pub fn independent(left: T, right: T) -> LayoutAxisX<T>[src]

Returns a layout direction independent horizontal axis with the given left and right values.

pub fn left(&self, direction: LayoutDirection) -> &T[src]

Resolves the left value of this horizontal axis using the given layout direction.

pub fn right(&self, direction: LayoutDirection) -> &T[src]

Resolves the right value of this horizontal axis using the given layout direction.

Trait Implementations

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

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

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

impl<T> Default for LayoutAxisX<T> where
    T: Default
[src]

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

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

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

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

Auto Trait Implementations

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

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

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

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

impl<T> UnwindSafe for LayoutAxisX<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.