FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    MeasureHold

    struct · ferroui-base · v0.5.0

    struct MeasureHold
    

    A range [low, high) of widths and one of heights.

    View source

    Members

    width

    width: (f64, f64)
    

    The widths, from width.0 (included) to width.1 (excluded).

    Source

    height

    height: (f64, f64)
    

    The heights, from height.0 (included) to height.1 (excluded).

    Source

    ANY

    const ANY: MeasureHold
    

    Every size.

    Source

    new

    fn new(width: (f64, f64), height: (f64, f64)) -> Self
    

    Every size whose width and height are inside the ranges.

    Source

    exactly

    fn exactly(size: Size) -> Self
    

    size alone.

    Source

    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.

    Source

    intersect

    fn intersect(self: Self, other: MeasureHold) -> Option<MeasureHold>
    

    The sizes inside both holds, or None when there are none.

    Source

    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).

    Source

    any_width

    fn any_width(self: Self) -> MeasureHold
    

    The hold with every width.

    Source

    any_height

    fn any_height(self: Self) -> MeasureHold
    

    The hold with every height.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Copy
    • Debug
    • StructuralPartialEq
    • PartialEq

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.