pub struct Constraints {
pub min: Size,
pub max: Size,
}Fields§
§min: Size§max: SizeImplementations§
Source§impl Constraints
impl Constraints
pub const UNBOUNDED: Self
pub const fn tight(size: Size) -> Self
pub const fn loose(max: Size) -> Self
pub fn loosen(self) -> Self
pub fn constrain(self, size: Size) -> Size
pub fn is_tight(self) -> bool
pub fn is_bounded(self) -> bool
pub fn with_width(self, min: f32, max: f32) -> Self
pub fn with_height(self, min: f32, max: f32) -> Self
Trait Implementations§
Source§impl Clone for Constraints
impl Clone for Constraints
impl Copy for Constraints
Source§impl Debug for Constraints
impl Debug for Constraints
Source§impl PartialEq for Constraints
impl PartialEq for Constraints
impl StructuralPartialEq for Constraints
Auto Trait Implementations§
impl Freeze for Constraints
impl RefUnwindSafe for Constraints
impl Send for Constraints
impl Sync for Constraints
impl Unpin for Constraints
impl UnsafeUnpin for Constraints
impl UnwindSafe for Constraints
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