pub enum FlexDirection {
Row,
Column,
RowReverse,
ColumnReverse,
}Expand description
The main-axis direction of a flex container.
Variants§
Row
Children laid out horizontally, first one at the start.
Column
Children laid out vertically, first one at the top.
RowReverse
Horizontal, last child first. It is what a row laid out against the reading direction amounts to, and the only way to say so per-container: the reading direction itself is ambient and mirrors the whole frame.
ColumnReverse
Vertical, last child first — a column that grows upwards, which is what a chat transcript or a stack of toasts anchored to the bottom wants.
Implementations§
Source§impl FlexDirection
impl FlexDirection
Sourcepub fn is_horizontal(self) -> bool
pub fn is_horizontal(self) -> bool
Whether the main axis is the horizontal one, whichever way it runs.
Sourcepub fn is_reversed(self) -> bool
pub fn is_reversed(self) -> bool
Whether the children run backwards along the main axis.
Sourcepub fn reversed(self) -> FlexDirection
pub fn reversed(self) -> FlexDirection
The same axis, run backwards (or forwards again).
Trait Implementations§
Source§impl Clone for FlexDirection
impl Clone for FlexDirection
Source§fn clone(&self) -> FlexDirection
fn clone(&self) -> FlexDirection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FlexDirection
Source§impl Debug for FlexDirection
impl Debug for FlexDirection
Source§impl PartialEq for FlexDirection
impl PartialEq 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 UnsafeUnpin 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
Mutably borrows from an owned value. Read more