# IKeyValueCollection

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

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

```rust
trait IKeyValueCollection<T, K>
```

The sorted pairs of a key and an item of a sorted change set (`IKeyValueCollection<TObject,
TKey>`, a read-only list of `KeyValuePair<TKey, TObject>`).

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

## Members

- [`comparer`](#function-comparer)
- [`optimisations`](#function-optimisations)
- [`sort_reason`](#function-sort_reason)
- [`items`](#function-items)

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

### comparer

```rust
fn comparer(self: &Self) -> &KeyValueComparer<T, K>
```

The comparer of the pairs (`Comparer`).

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

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

### optimisations

```rust
fn optimisations(self: &Self) -> SortOptimisations
```

The optimisations of the sort (`Optimisations`).

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

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

### sort_reason

```rust
fn sort_reason(self: &Self) -> SortReason
```

The reason of the sort (`SortReason`).

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

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

### items

```rust
fn items(self: &Self) -> &[(K, T)]
```

The pairs, in order (the `IReadOnlyList`).

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

## Trait implementations

- [`IKeyValueCollection<T, K>`](/docs/0.5.0/api/ferroui-dynamic-data/cache/trait-ikeyvaluecollection/)

## Availability

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