MeasureHold
struct · ferroui-base · v0.5.0
struct MeasureHold
A range [low, high) of widths and one of heights.
Members
width
width: (f64, f64)
The widths, from width.0 (included) to width.1 (excluded).
height
height: (f64, f64)
The heights, from height.0 (included) to height.1 (excluded).
ANY
const ANY: MeasureHold
Every size.
new
fn new(width: (f64, f64), height: (f64, f64)) -> Self
Every size whose width and height are inside the ranges.
exactly
fn exactly(size: Size) -> Self
size alone.
contains
fn contains(self: &Self, size: Size) -> bool
Whether size is inside the hold. An infinite upper bound includes infinity: an element
measured at an infinite size (a child of a stack along the stack) is inside its hold.
intersect
fn intersect(self: Self, other: MeasureHold) -> Option<MeasureHold>
The sizes inside both holds, or None when there are none.
inflate
fn inflate(self: Self, width: f64, height: f64) -> MeasureHold
The hold moved by width and height: the hold of an element that gives its child its own
available size less a fixed amount (a padding, a border).
any_width
fn any_width(self: Self) -> MeasureHold
The hold with every width.
any_height
fn any_height(self: Self) -> MeasureHold
The hold with every height.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafePropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherCloneCopyDebugStructuralPartialEqPartialEq
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.