pub struct Limits { /* private fields */ }Expand description
A set of size constraints for layouting.
Implementations§
Source§impl Limits
impl Limits
Sourcepub fn compression(&self) -> Size<bool>
pub fn compression(&self) -> Size<bool>
Returns the compression of the Limits.
Sourcepub fn width(self, width: impl Into<Length>) -> Limits
pub fn width(self, width: impl Into<Length>) -> Limits
Applies a width constraint to the current Limits.
Sourcepub fn height(self, height: impl Into<Length>) -> Limits
pub fn height(self, height: impl Into<Length>) -> Limits
Applies a height constraint to the current Limits.
Sourcepub fn resolve(
&self,
width: impl Into<Length>,
height: impl Into<Length>,
intrinsic_size: Size,
) -> Size
pub fn resolve( &self, width: impl Into<Length>, height: impl Into<Length>, intrinsic_size: Size, ) -> Size
Trait Implementations§
impl Copy for Limits
impl StructuralPartialEq for Limits
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnsafeUnpin for Limits
impl UnwindSafe for Limits
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