# IStyle

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/styling/trait-istyle/

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

```rust
trait IStyle: IResourceNode
```

Defines the interface for styles.

Implemented by `Style`, `ControlTheme`,
`ContainerQuery`, `Styles` and
style includes.

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

## Members

- [`children`](#function-children)
- [`as_object`](#function-as_object)
- [`as_resource_provider`](#function-as_resource_provider)

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

### children

```rust
fn children(self: &Self) -> Rc<Vec<Rc<dyn IStyle>>>
```

A snapshot of the collection of child styles.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/i_style.rs#L12)

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

### as_object

```rust
fn as_object(self: &Self) -> Option<&FerroObject>
```

The style as an object, when it is a class instance. Used for
identity comparison and type tests.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/i_style.rs#L30)

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

### as_resource_provider

```rust
fn as_resource_provider(self: &Self) -> Option<&dyn IResourceProvider>
```

The style as a resource provider, if it is one.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/i_style.rs#L35)

## Availability

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