pub enum LayoutAxisX<T> {
DirectionDependent {
leading: T,
trailing: T,
},
DirectionIndependent {
left: T,
right: T,
},
}Expand description
Represents a potentially direction dependent horizontal layout axis.
Variants§
DirectionDependent
A horizontal axis that depends on the layout direction.
Fields
§
leading: TContains the layout direction dependent leading value for this horizontal axis.
§
trailing: TContains the layout direction dependent leading value for this horizontal axis.
DirectionIndependent
A horizontal axis that is independent of the layout direction.
Implementations§
Source§impl<T> LayoutAxisX<T>
impl<T> LayoutAxisX<T>
Sourcepub fn dependent(leading: T, trailing: T) -> LayoutAxisX<T>
pub fn dependent(leading: T, trailing: T) -> LayoutAxisX<T>
Returns a layout direction dependent horizontal axis with the given leading and trailing values.
Sourcepub fn independent(left: T, right: T) -> LayoutAxisX<T>
pub fn independent(left: T, right: T) -> LayoutAxisX<T>
Returns a layout direction independent horizontal axis with the given left and right values.
Sourcepub fn left(&self, direction: LayoutDirection) -> &T
pub fn left(&self, direction: LayoutDirection) -> &T
Resolves the left value of this horizontal axis using the given layout direction.
Sourcepub fn right(&self, direction: LayoutDirection) -> &T
pub fn right(&self, direction: LayoutDirection) -> &T
Resolves the right value of this horizontal axis using the given layout direction.
Trait Implementations§
Source§impl<T: Clone> Clone for LayoutAxisX<T>
impl<T: Clone> Clone for LayoutAxisX<T>
Source§fn clone(&self) -> LayoutAxisX<T>
fn clone(&self) -> LayoutAxisX<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for LayoutAxisX<T>
impl<T: Debug> Debug for LayoutAxisX<T>
Source§impl<T> Default for LayoutAxisX<T>where
T: Default,
impl<T> Default for LayoutAxisX<T>where
T: Default,
Source§impl<T: PartialEq> PartialEq for LayoutAxisX<T>
impl<T: PartialEq> PartialEq for LayoutAxisX<T>
impl<T: Copy> Copy for LayoutAxisX<T>
impl<T: Eq> Eq for LayoutAxisX<T>
impl<T> StructuralPartialEq for LayoutAxisX<T>
Auto Trait Implementations§
impl<T> Freeze for LayoutAxisX<T>where
T: Freeze,
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§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
Source§fn convert_into(self) -> U
fn convert_into(self) -> U
Convert into T with values clamped to the color defined bounds Read more
Source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
Source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined range,
otherwise an
OutOfBounds error is returned which contains the unclamped color. Read more