pub enum Axis {
Horizontal,
Vertical,
}Expand description
A direction of layout or motion: the main axis of a row or a column, the axis along which a scroller, a lazy list or a pager moves, and the axis a nested scroll reports.
Variants§
Horizontal
Left to right: a row’s main axis, or content that moves left and right.
Vertical
Top to bottom: a column’s main axis, or content that moves up and down.
Implementations§
Source§impl Axis
impl Axis
Sourcepub fn cross_axis(self) -> Axis
pub fn cross_axis(self) -> Axis
Returns the opposite axis.
Sourcepub fn is_horizontal(self) -> bool
pub fn is_horizontal(self) -> bool
Returns true if this is the horizontal axis.
Sourcepub fn is_vertical(self) -> bool
pub fn is_vertical(self) -> bool
Returns true if this is the vertical axis.
Trait Implementations§
impl Copy for Axis
impl Eq for Axis
impl StructuralPartialEq for Axis
Auto Trait Implementations§
impl Forget for Axis
impl Freeze for Axis
impl RefUnwindSafe for Axis
impl Send for Axis
impl Sync for Axis
impl Unpin for Axis
impl UnsafeUnpin for Axis
impl UnwindSafe for Axis
Blanket Implementations§
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more