pub enum FlexDirection {
Row,
Column,
RowReverse,
ColumnReverse,
}
Expand description
The direction of the flexbox layout main axis.
There are always two perpendicular layout axes: main (or primary) and cross (or secondary). Adding items will cause them to be positioned adjacent to each other along the main axis. By varying this value throughout your tree, you can create complex axis-aligned layouts.
Items are always aligned relative to the cross axis, and justified relative to the main axis.
The default behavior is FlexDirection::Row
.
Variants§
Row
Defines +x as the main axis
Items will be added from left to right in a row.
Column
Defines +y as the main axis
Items will be added from top to bottom in a column.
RowReverse
Defines -x as the main axis
Items will be added from right to left in a row.
ColumnReverse
Defines -y as the main axis
Items will be added from bottom to top in a column.
Trait Implementations§
source§impl Clone for FlexDirection
impl Clone for FlexDirection
source§fn clone(&self) -> FlexDirection
fn clone(&self) -> FlexDirection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FlexDirection
impl Debug for FlexDirection
source§impl Default for FlexDirection
impl Default for FlexDirection
source§impl PartialEq for FlexDirection
impl PartialEq for FlexDirection
impl Copy for FlexDirection
impl Eq for FlexDirection
impl StructuralPartialEq for FlexDirection
Auto Trait Implementations§
impl Freeze for FlexDirection
impl RefUnwindSafe for FlexDirection
impl Send for FlexDirection
impl Sync for FlexDirection
impl Unpin for FlexDirection
impl UnwindSafe for FlexDirection
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)