# IFerroList

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/collections/trait-iferrolist/

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

```rust
trait IFerroList<T>: IFerroReadOnlyList<T>
```

A notifying list.

The members of the list contract it extends (add, insert, remove,
search) are part of the trait. Ranges are passed as vectors, so that the
trait can be used as an object.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/collections/i_ferro_list.rs#L8)

## Members

- [`set`](#function-set)
- [`add`](#function-add)
- [`insert`](#function-insert)
- [`remove_at`](#function-remove_at)
- [`clear`](#function-clear)
- [`contains`](#function-contains)
- [`index_of`](#function-index_of)
- [`remove`](#function-remove)
- [`add_range`](#function-add_range)
- [`insert_range`](#function-insert_range)
- [`move_item`](#function-move_item)
- [`move_range`](#function-move_range)
- [`remove_all`](#function-remove_all)
- [`remove_range`](#function-remove_range)

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

### set

```rust
fn set(self: &Self, index: usize, value: T)
```

Sets the element at the specified index.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/collections/i_ferro_list.rs#L10)

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

### add

```rust
fn add(self: &Self, item: T)
```

Adds an item to the collection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/collections/i_ferro_list.rs#L13)

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

### insert

```rust
fn insert(self: &Self, index: usize, item: T)
```

Inserts an item at the specified index.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/collections/i_ferro_list.rs#L16)

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

### remove_at

```rust
fn remove_at(self: &Self, index: usize)
```

Removes the item at the specified index.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/collections/i_ferro_list.rs#L19)

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

### clear

```rust
fn clear(self: &Self)
```

Removes all items from the collection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/collections/i_ferro_list.rs#L22)

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

### contains

```rust
fn contains(self: &Self, item: &T) -> bool
```

Tests whether the collection contains an item.

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

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

### index_of

```rust
fn index_of(self: &Self, item: &T) -> Option<usize>
```

The index of an item in the collection.

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

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

### remove

```rust
fn remove(self: &Self, item: &T) -> bool
```

Removes an item from the collection. Returns true if it was present.

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

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

### add_range

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

Adds multiple items to the collection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/collections/i_ferro_list.rs#L34)

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

### insert_range

```rust
fn insert_range(self: &Self, index: usize, items: Vec<T>)
```

Inserts multiple items at the specified index.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/collections/i_ferro_list.rs#L37)

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

### move_item

```rust
fn move_item(self: &Self, old_index: usize, new_index: usize)
```

Moves an item to a new index.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/collections/i_ferro_list.rs#L40)

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

### move_range

```rust
fn move_range(self: &Self, old_index: usize, count: usize, new_index: usize)
```

Moves multiple items to a new index.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/collections/i_ferro_list.rs#L43)

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

### remove_all

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

Removes multiple items from the collection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/collections/i_ferro_list.rs#L46)

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

### remove_range

```rust
fn remove_range(self: &Self, index: usize, count: usize)
```

Removes a range of elements from the collection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/collections/i_ferro_list.rs#L49)

## Trait implementations

- [`IFerroList<T>`](/docs/0.5.0/api/ferroui-base/collections/trait-iferrolist/)

## Availability

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