#[non_exhaustive]#[repr(u32)]pub enum LayoutAlignment {
Stretch = 0,
Center = 1,
Start = 2,
End = 3,
SpaceBetween = 4,
SpaceAround = 5,
SpaceEvenly = 6,
}Expand description
Enum representing the alignment property of a
HorizontalBox, a VerticalBox,
a HorizontalLayout, a VerticalLayout, or a FlexboxLayout,
and the cross-axis-line-alignment property of a FlexboxLayout.
For cross-axis-line-alignment, the values below apply to the flex lines
instead of the elements.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Stretch = 0
For alignment: use the minimum size of all elements in a layout, distribute
remaining space based on *-stretch among all elements.
For cross-axis-line-alignment: the flex lines have no stretch factor and
share the remaining space equally.
Center = 1
Use the preferred size for all elements, distribute remaining space evenly before the first and after the last element.
Start = 2
Use the preferred size for all elements, put remaining space after the last element.
End = 3
Use the preferred size for all elements, put remaining space before the first element.
SpaceBetween = 4
Use the preferred size for all elements, distribute remaining space evenly between elements.
SpaceAround = 5
Use the preferred size for all elements, distribute remaining space evenly between the elements, and use half spaces at the start and end.
SpaceEvenly = 6
Use the preferred size for all elements, distribute remaining space evenly before the first element, after the last element and between elements.
Trait Implementations§
Source§impl Clone for LayoutAlignment
impl Clone for LayoutAlignment
Source§fn clone(&self) -> LayoutAlignment
fn clone(&self) -> LayoutAlignment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LayoutAlignment
Source§impl Debug for LayoutAlignment
impl Debug for LayoutAlignment
Source§impl Default for LayoutAlignment
impl Default for LayoutAlignment
Source§impl Display for LayoutAlignment
impl Display for LayoutAlignment
impl Eq for LayoutAlignment
Source§impl FromStr for LayoutAlignment
impl FromStr for LayoutAlignment
Source§impl Hash for LayoutAlignment
impl Hash for LayoutAlignment
Source§impl PartialEq for LayoutAlignment
impl PartialEq for LayoutAlignment
impl StructuralPartialEq for LayoutAlignment
Auto Trait Implementations§
impl Freeze for LayoutAlignment
impl RefUnwindSafe for LayoutAlignment
impl Send for LayoutAlignment
impl Sync for LayoutAlignment
impl Unpin for LayoutAlignment
impl UnsafeUnpin for LayoutAlignment
impl UnwindSafe for LayoutAlignment
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
impl<T> Brush for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
SharedString.