Enum druid::widget::MainAxisAlignment
source · pub enum MainAxisAlignment {
Start,
Center,
End,
SpaceBetween,
SpaceEvenly,
SpaceAround,
}
Expand description
Arrangement of children on the main axis.
If there is surplus space on the main axis after laying out children, this enum represents how children are laid out in this space.
Variants§
Start
Top or leading.
Children are aligned with the top or leading edge, without padding.
Center
Children are centered, without padding.
End
Bottom or trailing.
Children are aligned with the bottom or trailing edge, without padding.
SpaceBetween
Extra space is divided evenly between each child.
SpaceEvenly
Extra space is divided evenly between each child, as well as at the ends.
SpaceAround
Space between each child, with less at the start and end.
This divides space such that each child is separated by n
units,
and the start and end have n/2
units of padding.
Trait Implementations§
source§impl Clone for MainAxisAlignment
impl Clone for MainAxisAlignment
source§fn clone(&self) -> MainAxisAlignment
fn clone(&self) -> MainAxisAlignment
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Data for MainAxisAlignment
impl Data for MainAxisAlignment
source§impl Debug for MainAxisAlignment
impl Debug for MainAxisAlignment
source§impl PartialEq<MainAxisAlignment> for MainAxisAlignment
impl PartialEq<MainAxisAlignment> for MainAxisAlignment
source§fn eq(&self, other: &MainAxisAlignment) -> bool
fn eq(&self, other: &MainAxisAlignment) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for MainAxisAlignment
impl Eq for MainAxisAlignment
impl StructuralEq for MainAxisAlignment
impl StructuralPartialEq for MainAxisAlignment
Auto Trait Implementations§
impl RefUnwindSafe for MainAxisAlignment
impl Send for MainAxisAlignment
impl Sync for MainAxisAlignment
impl Unpin for MainAxisAlignment
impl UnwindSafe for MainAxisAlignment
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.