pub enum CrossAxisAlignment {
Start,
Center,
End,
Baseline,
Fill,
}Expand description
The alignment of the widgets on the container’s cross (or minor) axis.
If a widget is smaller than the container on the minor axis, this determines where it is positioned.
Variants§
Start
Top or leading.
In a vertical container, widgets are top aligned. In a horizontal container, their leading edges are aligned.
Center
Widgets are centered in the container.
End
Bottom or trailing.
In a vertical container, widgets are bottom aligned. In a horizontal container, their trailing edges are aligned.
Baseline
Align on the baseline.
In a horizontal container, widgets are aligned along the calculated
baseline. In a vertical container, this is equivalent to End.
The calculated baseline is the maximum baseline offset of the children.
Fill
Fill the available space.
The size on this axis is the size of the largest widget; other widgets must fill that space.
Trait Implementations§
§impl Clone for CrossAxisAlignment
impl Clone for CrossAxisAlignment
§fn clone(&self) -> CrossAxisAlignment
fn clone(&self) -> CrossAxisAlignment
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Data for CrossAxisAlignment
impl Data for CrossAxisAlignment
§fn same(&self, other: &CrossAxisAlignment) -> bool
fn same(&self, other: &CrossAxisAlignment) -> bool
§impl Debug for CrossAxisAlignment
impl Debug for CrossAxisAlignment
§impl PartialEq<CrossAxisAlignment> for CrossAxisAlignment
impl PartialEq<CrossAxisAlignment> for CrossAxisAlignment
§fn eq(&self, other: &CrossAxisAlignment) -> bool
fn eq(&self, other: &CrossAxisAlignment) -> bool
self and other values to be equal, and is used
by ==.