#[non_exhaustive]pub enum Flex {
Start,
End,
Center,
SpaceBetween,
SpaceAround,
}Expand description
How leftover space is placed along the split axis, once Constraints
are resolved.
Only matters when the resolved pane sizes sum to less than area’s
length; passed to split_v_flex/split_h_flex.
split_v/split_h always behave like Start: any
leftover space trails after the last pane, unclaimed. This matches their
existing documented behavior, so adding Flex does not change them.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Start
Panes are packed at the start of the area; leftover space trails
after the last pane. The default, and what split_v/split_h use.
End
Panes are packed at the end of the area; leftover space leads before the first pane.
Center
Leftover space is split evenly before and after the panes.
SpaceBetween
Leftover space is distributed as gaps between panes (none before the first or after the last). No-op with fewer than two panes.
SpaceAround
Leftover space is distributed as equal-width gaps around every pane, including before the first and after the last.
Trait Implementations§
impl Copy for Flex
impl Eq for Flex
impl StructuralPartialEq for Flex
Auto Trait Implementations§
impl Freeze for Flex
impl RefUnwindSafe for Flex
impl Send for Flex
impl Sync for Flex
impl Unpin for Flex
impl UnsafeUnpin for Flex
impl UnwindSafe for Flex
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<C> WithAlpha for Cwhere
C: Copy,
impl<C> WithAlpha for Cwhere
C: Copy,
§fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
self with alpha, storing alpha before the color in memory
(see [AlphaFirst]).§fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
self with alpha, storing alpha after the color in memory
(see [AlphaLast]).