# RecycleKey

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/generators/enum-recyclekey/

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

```rust
enum RecycleKey
```

A key that locates previously recycled containers of the right kind for
an item.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/generators/item_container_generator.rs#L9)

## Members

- [`Default`](#variant-default)
- [`Type`](#variant-type)
- [`Id`](#variant-id)
- [`new_unique`](#function-new_unique)
- [`of`](#function-of)

<a id="variant-default"></a>

### Default

```rust
Default
```

The default key, for an items control that supports a single
container type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/generators/item_container_generator.rs#L12)

<a id="variant-type"></a>

### Type

```rust
Type(std::any::TypeId)
```

A key identifying containers by a Rust type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/generators/item_container_generator.rs#L14)

<a id="variant-id"></a>

### Id

```rust
Id(u64)
```

A key allocated with `RecycleKey::new_unique` or chosen by the
items control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/generators/item_container_generator.rs#L17)

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

### new_unique

```rust
fn new_unique() -> Self
```

Allocates a key that is different from every other key on the
current thread.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/generators/item_container_generator.rs#L23)

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

### of

```rust
fn of<T: 'static>() -> Self
```

The key identifying containers by the type `T`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/generators/item_container_generator.rs#L31)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`ResourceKeyObject`](/docs/0.5.0/api/ferroui-base/controls/trait-resourcekeyobject/)
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Copy`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`

## Availability

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