pub enum SizeConstraint {
Free,
Full,
Fixed(usize),
AtMost(usize),
AtLeast(usize),
}
Expand description
Single-dimensional constraint on a view size.
This describes a possible behaviour for a ResizedView
.
Variants§
Free
No constraint imposed, the child view’s response is used.
Full
Tries to take all available space, no matter what the child needs.
Fixed(usize)
Always return the included size, no matter what the child needs.
AtMost(usize)
Returns the minimum of the included value and the child view’s size.
AtLeast(usize)
Returns the maximum of the included value and the child view’s size.
Implementations§
Trait Implementations§
Source§impl Clone for SizeConstraint
impl Clone for SizeConstraint
Source§fn clone(&self) -> SizeConstraint
fn clone(&self) -> SizeConstraint
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 SizeConstraint
impl Debug for SizeConstraint
Source§impl Hash for SizeConstraint
impl Hash for SizeConstraint
Source§impl PartialEq for SizeConstraint
impl PartialEq for SizeConstraint
Source§impl Resolvable for SizeConstraint
impl Resolvable for SizeConstraint
impl Copy for SizeConstraint
impl Eq for SizeConstraint
impl StructuralPartialEq for SizeConstraint
Auto Trait Implementations§
impl Freeze for SizeConstraint
impl RefUnwindSafe for SizeConstraint
impl Send for SizeConstraint
impl Sync for SizeConstraint
impl Unpin for SizeConstraint
impl UnwindSafe for SizeConstraint
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.