pub enum Justify {
Start,
Center,
End,
SpaceBetween,
SpaceAround,
SpaceEvenly,
}Expand description
Main-axis content distribution within a container.
Controls how children are distributed along the main axis. For a row(),
this is horizontal distribution; for a col(), this is vertical.
When children have grow > 0, they consume remaining space before justify
distribution applies. Justify modes only affect the leftover space after
flex-grow allocation.
Variants§
Start
Pack children at the start (default). Uses gap for spacing.
Center
Center children along the main axis with gap spacing.
End
Pack children at the end with gap spacing.
SpaceBetween
First child at start, last at end, equal space between.
SpaceAround
Equal space around each child (half-size space at edges).
SpaceEvenly
Equal space between all children and at both edges.
Trait Implementations§
impl Copy for Justify
impl Eq for Justify
impl StructuralPartialEq for Justify
Auto Trait Implementations§
impl Freeze for Justify
impl RefUnwindSafe for Justify
impl Send for Justify
impl Sync for Justify
impl Unpin for Justify
impl UnsafeUnpin for Justify
impl UnwindSafe for Justify
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