# BooleanBoxes

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/utilities/struct-booleanboxes/

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

```rust
struct BooleanBoxes
```

The cached boxes of `true` and `false`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/boolean_boxes.rs#L13)

## Members

- [`true_`](#function-true_)
- [`false_`](#function-false_)
- [`box_`](#function-box_)
- [`box_value`](#function-box_value)

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

### true_

```rust
fn true_() -> BoxedValue
```

The box of `true` (one per thread).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/boolean_boxes.rs#L17)

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

### false_

```rust
fn false_() -> BoxedValue
```

The box of `false` (one per thread).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/boolean_boxes.rs#L22)

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

### box_

```rust
fn box_(value: bool) -> BoxedValue
```

The cached box of `value`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/boolean_boxes.rs#L27)

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

### box_value

```rust
fn box_value<T: PartialEq + Clone + 'static>(value: &T) -> BoxedValue
```

Boxes `value`: a boolean as its cached box, any other value as a new
box.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/boolean_boxes.rs#L37)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ErasedDestructor`
- `IntoEither`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
