# IBindableIndexer

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/data/model/trait-ibindableindexer/

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

```rust
trait IBindableIndexer
```

The untyped form of an indexer (`this[..]`), for bindings with an indexer
in their path (`Items[key]`, `Grid[1,2]`).

A model type declares its indexer with
`ModelTypeBuilder::indexer`. The
binding converts the textual arguments of the path to the declared
parameter types before calling `get` or `set`.

A binding re-reads the indexer when the object raises a collection change
notification, or a property change notification for the indexer
(`INDEXER_NAME`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/model/i_bindable_indexer.rs#L23)

## Members

- [`index_parameter_types`](#function-index_parameter_types)
- [`value_type`](#function-value_type)
- [`can_set`](#function-can_set)
- [`get`](#function-get)
- [`set`](#function-set)

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

### index_parameter_types

```rust
fn index_parameter_types(self: &Self) -> Vec<ValueType>
```

The types of the index parameters, in order.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/model/i_bindable_indexer.rs#L25)

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

### value_type

```rust
fn value_type(self: &Self) -> ValueType
```

The type of the values of the indexer.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/model/i_bindable_indexer.rs#L28)

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

### can_set

```rust
fn can_set(self: &Self) -> bool
```

Whether the indexer has a setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/model/i_bindable_indexer.rs#L31)

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

### get

```rust
fn get(self: &Self, arguments: &[BoxedValue]) -> Result<Option<BoxedValue>, BindingError>
```

Reads the value at `arguments`, which hold exactly the declared
parameter types. An error is what the getter of a managed indexer
throws: a missing key, an index out of range.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/model/i_bindable_indexer.rs#L38)

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

### set

```rust
fn set(self: &Self, arguments: &[BoxedValue], value: Option<&BoxedValue>) -> Result<bool, BindingError>
```

Writes the value at `arguments`. Returns `Ok(false)` if the indexer
has no setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/model/i_bindable_indexer.rs#L42)

## Trait implementations

- [`IBindableIndexer`](/docs/0.5.0/api/ferroui-base/data/model/trait-ibindableindexer/)

## Availability

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