pub enum FlexConstraint {
Fixed(u16),
Min(u16),
Max(u16),
Percentage(u16),
Ratio(u16, u16),
Fill(u16),
Content,
}Expand description
Extended constraint with Fill support.
This extends the standard constraint system with:
Fill: Distributes remaining space proportionallyContent: Uses widget’sSizeHintfor sizing
Variants§
Fixed(u16)
Fixed size in terminal cells.
Min(u16)
Minimum size (can grow).
Max(u16)
Maximum size (can shrink).
Percentage(u16)
Percentage of parent (0-100).
Ratio(u16, u16)
Ratio of remaining space (numerator, denominator).
Fill(u16)
Fill remaining space with weight.
Multiple Fill constraints share remaining space proportionally to their weights.
Content
Content-based: use widget’s SizeHint.
Trait Implementations§
Source§impl Clone for FlexConstraint
impl Clone for FlexConstraint
Source§fn clone(&self) -> FlexConstraint
fn clone(&self) -> FlexConstraint
Returns a duplicate 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 Debug for FlexConstraint
impl Debug for FlexConstraint
Source§impl Default for FlexConstraint
impl Default for FlexConstraint
Source§impl<'de> Deserialize<'de> for FlexConstraint
impl<'de> Deserialize<'de> for FlexConstraint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for FlexConstraint
impl PartialEq for FlexConstraint
Source§impl Serialize for FlexConstraint
impl Serialize for FlexConstraint
impl Copy for FlexConstraint
impl Eq for FlexConstraint
impl StructuralPartialEq for FlexConstraint
Auto Trait Implementations§
impl Freeze for FlexConstraint
impl RefUnwindSafe for FlexConstraint
impl Send for FlexConstraint
impl Sync for FlexConstraint
impl Unpin for FlexConstraint
impl UnwindSafe for FlexConstraint
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
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.