# IResourceNode

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/controls/trait-iresourcenode/

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

```rust
trait IResourceNode
```

Represents a resource provider in a tree.

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

## Members

- [`has_resources`](#function-has_resources)
- [`try_get_resource`](#function-try_get_resource)

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

### has_resources

```rust
fn has_resources(self: &Self) -> bool
```

Whether the resource node has resources.

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

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

### try_get_resource

```rust
fn try_get_resource(self: &Self, key: &ResourceKey, theme: Option<&ThemeVariant>) -> Option<ResourceValue>
```

Tries to find a resource within the node.

Returns `Some` with the resource if it was found. See the theme
dictionaries of a resource dictionary for how `theme` is used.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/controls/i_resource_node.rs#L18)

## Trait implementations

- [`IResourceNode`](/docs/0.5.0/api/ferroui-base/controls/trait-iresourcenode/)

## Availability

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