# with_key

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-view/element/function-with_key/

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

```rust
fn with_key(element: Element, key: Key) -> Element
```

The element with `key` (an element of a control keeps it; any other
element has no key and is returned as it is).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/element.rs#L555)

## Availability

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