# styles_as_style

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/styling/function-styles_as_style/

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

```rust
fn styles_as_style<T: ObjectType + Upcast<Styles>>(styles: &crate::Ref<T>) -> std::rc::Rc<dyn IStyle>
```

Converts a handle of a styles collection (or a class derived from it)
into a style handle.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/styles.rs#L481)

## Availability

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