# ThemeTrimming

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-build/theme_roots/struct-themetrimming/

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

```rust
struct ThemeTrimming
```

What the manifest of an application states about the trimming of its themes.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Build.Tasks/theme_roots.rs#L69)

## Members

- [`enabled`](#struct_field-enabled)
- [`all`](#struct_field-all)
- [`roots`](#struct_field-roots)
- [`from_manifest`](#function-from_manifest)

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

### enabled

```rust
enabled: bool
```

The application constructs its themes from the units it needs: the default, and
`theme-trimming = true`; `theme-trimming = false` turns it off.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Build.Tasks/theme_roots.rs#L72)

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

### all

```rust
all: bool
```

`theme-roots = "all"`: every unit is kept (the trimmed construction, with the full table).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Build.Tasks/theme_roots.rs#L74)

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

### roots

```rust
roots: Vec<String>
```

`theme-roots = ["Name", ..]`: units, by the path of their document, or types or keys.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Build.Tasks/theme_roots.rs#L76)

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

### from_manifest

```rust
fn from_manifest(text: &str) -> Result<Self, String>
```

The trimming the manifest `text` states in its table `[package.metadata.ferroui]`; the
default (trimming on) when it has none. An error names the key whose value is not one of
the forms above.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Build.Tasks/theme_roots.rs#L90)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`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/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Default`

## Availability

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