# IQuery

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

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

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

Read access to a keyed collection (`IQuery<TObject, TKey>`).

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

## Members

- [`count`](#function-count)
- [`items`](#function-items)
- [`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_query.rs#L8)

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

### items

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

The items, in the order of enumeration (`Items`).

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

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

### keys

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

The keys, in the order of enumeration (`Keys`).

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

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

### key_values

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

The keys and items, in the order of enumeration (`KeyValues`).

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

<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_query.rs#L16)

## Trait implementations

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

## Availability

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