pub enum Axis {
Horizontal,
Vertical,
}Expand description
Represents the primary axis of flex layout (Row or Column).
This enum is used by FlexMeasurePolicy to determine which direction is the main axis (where children are laid out) and which is the cross axis (where children are aligned).
Variants§
Horizontal
Horizontal main axis (Row). Main axis: left to right Cross axis: top to bottom
Vertical
Vertical main axis (Column). Main axis: top to bottom Cross axis: left to right
Implementations§
Source§impl Axis
impl Axis
Sourcepub fn cross_axis(self) -> Self
pub fn cross_axis(self) -> Self
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 Freeze for Axis
impl RefUnwindSafe for Axis
impl Send for Axis
impl Sync for Axis
impl Unpin 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