# ObservableItemsEx

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

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

```rust
trait ObservableItemsEx<T: Clone + 'static>
```

The operators of sequences of items (`ToObservableChangeSet(IObservable<T>, ..)`), implemented
for `Rc<dyn IObservable<T>>`.

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

## Members

- [`item_sequence`](#function-item_sequence)
- [`to_observable_change_set`](#function-to_observable_change_set)
- [`to_observable_change_set_with`](#function-to_observable_change_set_with)
- [`to_observable_change_set_cache`](#function-to_observable_change_set_cache)
- [`to_observable_change_set_cache_with`](#function-to_observable_change_set_cache_with)

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

### item_sequence

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

The sequence as the handle the operators take.

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

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

### to_observable_change_set

```rust
fn to_observable_change_set(self: &Self) -> Rc<dyn IObservable<crate::list::ChangeSet<T>>>
where T: PartialEq
```

The items as additions to a list (`ToObservableChangeSet<T>(IObservable<T>, IScheduler? =
null)`): the first change set comes at the subscription, empty if need be.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/observable_items_ex.rs#L29)

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

### to_observable_change_set_with

```rust
fn to_observable_change_set_with(self: &Self, expire_after: Option<ExpireAfterSelector<T>>, limit_size_to: Option<usize>, scheduler: Option<Rc<dyn IScheduler>>) -> Rc<dyn IObservable<crate::list::ChangeSet<T>>>
where T: PartialEq
```

`to_observable_change_set`, whose items expire after the
time that `expire_after` gives and whose oldest beyond `limit_size_to` are removed, timed on
`scheduler` (`ToObservableChangeSet<T>(IObservable<T>, Func<T, TimeSpan?>?, int,
IScheduler?)` and the shorter overloads).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/observable_items_ex.rs#L40)

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

### to_observable_change_set_cache

```rust
fn to_observable_change_set_cache<K: Eq + Hash + Clone + 'static>(self: &Self, key_selector: impl Fn(&T) -> K + 'static) -> Rc<dyn IObservable<crate::cache::ChangeSet<T, K>>>
```

The items as additions or updates of a cache, keyed by `key_selector`
(`ToObservableChangeSet<TObject, TKey>(IObservable<TObject>, Func<TObject, TKey>, ..)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/observable_items_ex.rs#L54)

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

### to_observable_change_set_cache_with

```rust
fn to_observable_change_set_cache_with<K: Eq + Hash + Clone + 'static>(self: &Self, key_selector: impl Fn(&T) -> K + 'static, expire_after: Option<ExpireAfterSelector<T>>, limit_size_to: Option<usize>, scheduler: Option<Rc<dyn IScheduler>>) -> Rc<dyn IObservable<crate::cache::ChangeSet<T, K>>>
```

`to_observable_change_set_cache` with the
expiration, the limit of size and the scheduler (`ToObservableChangeSet(IObservable<TObject>,
Func<TObject, TKey>, Func<TObject, TimeSpan?>? = null, int limitSizeTo = -1, IScheduler? =
null)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/observable_items_ex.rs#L62)

## Trait implementations

- [`ObservableItemsEx<T>`](/docs/0.5.0/api/ferroui-dynamic-data/trait-observableitemsex/)

## Availability

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