# CustomEffectClass

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/effects/trait-customeffectclass/

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

```rust
trait CustomEffectClass: ObjectType
```

A mutable effect class whose values freeze into a custom effect: a class
deriving from `Effect` that constructs its base with
`Effect::construct_custom`. Its handle
converts to `Rc<dyn IEffect>` as the built-in effect classes do; the
compositor sends its snapshot to the render thread and takes a new one
when the effect raises `invalidated`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/custom_effect.rs#L981)

## Members

- [`to_custom_effect`](#function-to_custom_effect)

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

### to_custom_effect

```rust
fn to_custom_effect(self: &Self) -> ImmutableCustomEffect
```

The snapshot of the current values.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/custom_effect.rs#L983)

## Trait implementations

- [`CustomEffectClass`](/docs/0.5.0/api/ferroui-base/media/effects/trait-customeffectclass/)

## Availability

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