pub struct BoxConstraints { /* private fields */ }Expand description
Min/max size bounds passed down during layout. Every constructor keeps both
non-negative with min <= max, so constrain never panics.
Implementations§
Source§impl BoxConstraints
impl BoxConstraints
Sourcepub fn new(min: Size, max: Size) -> Self
pub fn new(min: Size, max: Size) -> Self
Bounds clamped non-negative; an inverted axis widens max to min, with a
debug-build diagnostic since it usually means an upstream layout bug.
Sourcepub fn tight(size: Size) -> Self
pub fn tight(size: Size) -> Self
Tight constraints that force an exact size (min == max == size).
Trait Implementations§
Source§impl Clone for BoxConstraints
impl Clone for BoxConstraints
impl Copy for BoxConstraints
Source§impl Debug for BoxConstraints
impl Debug for BoxConstraints
Source§impl PartialEq for BoxConstraints
impl PartialEq for BoxConstraints
impl StructuralPartialEq for BoxConstraints
Auto Trait Implementations§
impl Freeze for BoxConstraints
impl RefUnwindSafe for BoxConstraints
impl Send for BoxConstraints
impl Sync for BoxConstraints
impl Unpin for BoxConstraints
impl UnsafeUnpin for BoxConstraints
impl UnwindSafe for BoxConstraints
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<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.