#[non_exhaustive]pub enum MainAxisAlignment {
Start,
Center,
End,
SpaceAround,
SpaceBetween,
SpaceEvenly,
}Expand description
Defines alignment along a container’s main axis.
For example, a horizontal list’s main axis is horizontal, and a vertical list’s main axis is vertical.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Start
Align items to the beginning of the container’s main axis.
For a left-to-right list, this is the left side of the container.
For a top-down list, this is the top of the container.
Center
Align items to the center of the container’s main axis.
End
Align items to the end of the container’s main axis.
For a left-to-right list, this is the right side of the container.
For a top-down list, this is the bottom of the container.
SpaceAround
Spread the items evenly where the gap at the start and end of the container is half the size of the gap between each adjacent item.
SpaceBetween
Spread the items evenly with no gap at the start and the end of the container. If there is only one item, it will be at the start.
SpaceEvenly
Spread the items evenly where the gap at the start and end of the container is the same size as the gap between each adjacent item.
Trait Implementations§
Source§impl Clone for MainAxisAlignment
impl Clone for MainAxisAlignment
Source§fn clone(&self) -> MainAxisAlignment
fn clone(&self) -> MainAxisAlignment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more