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 more