# IGrouping

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

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

```rust
trait IGrouping<T, K, G>
```

The state of a group at one moment (`IGrouping<TObject, TKey, TGroupKey>`): the items of the
change sets of `GroupWithImmutableState` and `GroupOnPropertyWithImmutableState`, which replace
a group with a new state whenever its items change.

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

## Members

- [`count`](#function-count)
- [`items`](#function-items)
- [`key`](#function-key)
- [`keys`](#function-keys)
- [`key_values`](#function-key_values)
- [`lookup`](#function-lookup)

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

### count

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

The number of items (`Count`).

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

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

### items

```rust
fn items(self: &Self) -> Vec<T>
```

The items (`Items`).

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

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

### key

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

The group key (`Key`).

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

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

### keys

```rust
fn keys(self: &Self) -> Vec<K>
```

The keys of the items (`Keys`).

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

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

### key_values

```rust
fn key_values(self: &Self) -> Vec<(K, T)>
```

The keys with their items (`KeyValues`).

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

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

### lookup

```rust
fn lookup(self: &Self, key: &K) -> Option<T>
```

The item of `key` (`Lookup`).

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

## Trait implementations

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

## Availability

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