# BoolToImageConverter

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-diagnostics/diagnostics/converters/struct-booltoimageconverter/

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

```rust
struct BoolToImageConverter
```

Converts `true` to `true_image`, `false` to
`false_image` and anything else to null.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/converters/bool_to_image_converter.rs#L15)

## Members

- [`new`](#function-new)
- [`true_image`](#function-true_image)
- [`set_true_image`](#function-set_true_image)
- [`false_image`](#function-false_image)
- [`set_false_image`](#function-set_false_image)

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

### new

```rust
fn new() -> Rc<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/converters/bool_to_image_converter.rs#L27)

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

### true_image

```rust
fn true_image(self: &Self) -> Option<Rc<dyn IImage>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/converters/bool_to_image_converter.rs#L31)

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

### set_true_image

```rust
fn set_true_image(self: &Self, value: Option<Rc<dyn IImage>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/converters/bool_to_image_converter.rs#L35)

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

### false_image

```rust
fn false_image(self: &Self) -> Option<Rc<dyn IImage>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/converters/bool_to_image_converter.rs#L39)

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

### set_false_image

```rust
fn set_false_image(self: &Self, value: Option<Rc<dyn IImage>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/converters/bool_to_image_converter.rs#L43)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`TreeModel`](/docs/0.5.0/api/ferroui-treedatagrid-core/accessor/trait-treemodel/)
- `Default`
- `PartialEq`
- [`IValueConverter`](/docs/0.5.0/api/ferroui-base/data/converters/trait-ivalueconverter/)
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)

## Availability

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