# AsCompositionObject

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/rendering/composition/trait-ascompositionobject/

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

```rust
trait AsCompositionObject: 'static
```

A composition object as code refers to any composition object: a
reference parameter of an animation, an object stored in a property set
(upstream `CompositionObject` as a parameter type).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_object.rs#L305)

## Members

- [`as_composition_object`](#function-as_composition_object)
- [`composition_type_name`](#function-composition_type_name)
- [`as_property_set`](#function-as_property_set)

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

### as_composition_object

```rust
fn as_composition_object(self: &Self) -> &CompositionObject
```

The embedded `CompositionObject`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_object.rs#L307)

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

### composition_type_name

```rust
fn composition_type_name(self: &Self) -> &'static str
```

The name of the class of the object, for messages.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_object.rs#L310)

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

### as_property_set

```rust
fn as_property_set(self: Rc<Self>) -> Option<Rc<CompositionPropertySet>>
```

The object as a property set, if it is one (the `is
CompositionPropertySet` test of upstream).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_object.rs#L314)

## Trait implementations

- [`AsCompositionObject`](/docs/0.5.0/api/ferroui-base/rendering/composition/trait-ascompositionobject/)

## Availability

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