# IObservableList

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

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

```rust
trait IObservableList<T>: IDisposable
```

A list that can be observed (`IObservableList<T>`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/list/source_list.rs#L14)

## Members

- [`count`](#function-count)
- [`count_changed`](#function-count_changed)
- [`items`](#function-items)
- [`connect_with`](#function-connect_with)
- [`preview_with`](#function-preview_with)
- [`connect`](#function-connect)
- [`preview`](#function-preview)

<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/list/source_list.rs#L16)

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

### count_changed

```rust
fn count_changed(self: &Self) -> Rc<dyn IObservable<usize>>
```

The number of items, now and whenever it changes (`CountChanged`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/list/source_list.rs#L18)

<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/list/source_list.rs#L20)

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

### connect_with

```rust
fn connect_with(self: &Self, predicate: Option<Rc<dyn Fn(&T) -> bool>>) -> Rc<dyn IObservable<ChangeSet<T>>>
```

The items as one range added, then the changes, of the items that `predicate` accepts
(`Connect`).

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

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

### preview_with

```rust
fn preview_with(self: &Self, predicate: Option<Rc<dyn Fn(&T) -> bool>>) -> Rc<dyn IObservable<ChangeSet<T>>>
```

The changes before they are applied (`Preview`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/list/source_list.rs#L25)

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

### connect

```rust
fn connect(self: &Self) -> Rc<dyn IObservable<ChangeSet<T>>>
```

The items and their changes (`Connect()`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/list/source_list.rs#L28)

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

### preview

```rust
fn preview(self: &Self) -> Rc<dyn IObservable<ChangeSet<T>>>
```

The changes before they are applied (`Preview()`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/list/source_list.rs#L33)

## Trait implementations

- [`IObservableList<T>`](/docs/0.5.0/api/ferroui-dynamic-data/list/trait-iobservablelist/)

## Availability

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