# MeasureHold

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/layout/struct-measurehold/

**struct** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
struct MeasureHold
```

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

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/measure_hold.rs#L16)

## Members

- [`width`](#struct_field-width)
- [`height`](#struct_field-height)
- [`ANY`](#assoc_const-any)
- [`new`](#function-new)
- [`exactly`](#function-exactly)
- [`contains`](#function-contains)
- [`intersect`](#function-intersect)
- [`inflate`](#function-inflate)
- [`any_width`](#function-any_width)
- [`any_height`](#function-any_height)

<a id="struct_field-width"></a>

### width

```rust
width: (f64, f64)
```

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

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/measure_hold.rs#L18)

<a id="struct_field-height"></a>

### height

```rust
height: (f64, f64)
```

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

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/measure_hold.rs#L20)

<a id="assoc_const-any"></a>

### ANY

```rust
const ANY: MeasureHold
```

Every size.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/measure_hold.rs#L25)

<a id="function-new"></a>

### new

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

Every size whose width and height are inside the ranges.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/measure_hold.rs#L29)

<a id="function-exactly"></a>

### exactly

```rust
fn exactly(size: Size) -> Self
```

`size` alone.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/measure_hold.rs#L34)

<a id="function-contains"></a>

### contains

```rust
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](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/measure_hold.rs#L40)

<a id="function-intersect"></a>

### intersect

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

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

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/measure_hold.rs#L48)

<a id="function-inflate"></a>

### inflate

```rust
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](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/measure_hold.rs#L60)

<a id="function-any_width"></a>

### any_width

```rust
fn any_width(self: Self) -> MeasureHold
```

The hold with every width.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/measure_hold.rs#L68)

<a id="function-any_height"></a>

### any_height

```rust
fn any_height(self: Self) -> MeasureHold
```

The hold with every height.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/measure_hold.rs#L73)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-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](/docs/0.5.0/api/).
