pub enum Constraint {
Fixed(u16),
Percent(u16),
Fill(u16),
Min(u16),
Max(u16),
}Expand description
How a single pane claims space along the split axis.
Variants§
Fixed(u16)
An exact number of cells.
Percent(u16)
A percentage (0–100) of the axis length.
Fill(u16)
Claim a share of whatever space the fixed/percent panes leave, proportional to
weight relative to the other Fill/Min/Max
panes in the same split (Min/Max panes always weigh 1).
Fill(1) reproduces plain equal distribution across an all-Fill split; a weight of
0 claims no share of the remainder.
Min(u16)
Like Fill, but guarantees at least this many cells even if the axis
is too small for every pane to get its share, and always weighs 1.
Max(u16)
Like Fill, but never grows past this many cells (any share past the
cap is left unclaimed rather than redistributed), and always weighs 1.
Trait Implementations§
Source§impl Clone for Constraint
impl Clone for Constraint
Source§fn clone(&self) -> Constraint
fn clone(&self) -> Constraint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Constraint
Source§impl Debug for Constraint
impl Debug for Constraint
impl Eq for Constraint
Source§impl PartialEq for Constraint
impl PartialEq for Constraint
impl StructuralPartialEq for Constraint
Auto Trait Implementations§
impl Freeze for Constraint
impl RefUnwindSafe for Constraint
impl Send for Constraint
impl Sync for Constraint
impl Unpin for Constraint
impl UnsafeUnpin for Constraint
impl UnwindSafe for Constraint
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