# IndexedItem

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-dynamic-data/cache/struct-indexeditem/

**struct** · [`ferroui-dynamic-data`](/docs/0.5.0/api/ferroui-dynamic-data/) · v0.5.0

```rust
struct IndexedItem<T, K>
```

An item of a sorted collection with its key and its index (`IndexedItem<TObject, TKey>`). Two
indexed items are equal when their keys, items and indexes are.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/cache/indexed_item.rs#L8)

## Members

- [`new`](#function-new)
- [`index`](#function-index)
- [`key`](#function-key)
- [`value`](#function-value)

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

### new

```rust
fn new(value: T, key: K, index: usize) -> Self
```

The item `value` of `key` at `index` (`IndexedItem(TObject value, TKey key, int index)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/cache/indexed_item.rs#L16)

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

### index

```rust
fn index(self: &Self) -> usize
```

The index (`Index`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/cache/indexed_item.rs#L21)

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

### key

```rust
fn key(self: &Self) -> &K
```

The key (`Key`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/cache/indexed_item.rs#L26)

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

### value

```rust
fn value(self: &Self) -> &T
```

The item (`Value`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/cache/indexed_item.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`
- `ToString`
- `Equivalent<K>`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`
- `Display`

## Availability

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