# ObservableSequencesEx

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

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

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

The operators of sequences of collections of items (`ToObservableChangeSet(IObservable<
IEnumerable<T>>, ..)` and `EditDiff(IObservable<IEnumerable<TObject>>, ..)`), implemented for
`Rc<dyn IObservable<I>>` of every collection `I`.

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

## Members

- [`to_observable_change_set_many`](#function-to_observable_change_set_many)
- [`to_observable_change_set_many_with`](#function-to_observable_change_set_many_with)
- [`to_observable_change_set_cache_many`](#function-to_observable_change_set_cache_many)
- [`to_observable_change_set_cache_many_with`](#function-to_observable_change_set_cache_many_with)
- [`edit_diff`](#function-edit_diff)
- [`edit_diff_with_comparer`](#function-edit_diff_with_comparer)

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

### to_observable_change_set_many

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

The items of each collection as additions to a list (`ToObservableChangeSet<T>(
IObservable<IEnumerable<T>>, IScheduler? = null)`).

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

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

### to_observable_change_set_many_with

```rust
fn to_observable_change_set_many_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_many` with the expiration,
the limit of size and the scheduler.

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

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

### to_observable_change_set_cache_many

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

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

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

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

### to_observable_change_set_cache_many_with

```rust
fn to_observable_change_set_cache_many_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_many` with the
expiration, the limit of size and the scheduler.

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

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

### edit_diff

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

The changes of a cache, keyed by `key_selector`, that holds the latest collection: each
collection edits it by difference, items compared by `PartialEq`; the cache ends with the
sequence (`EditDiff(IObservable<IEnumerable<TObject>>, Func<TObject, TKey>,
IEqualityComparer? = null)`).

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

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

### edit_diff_with_comparer

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

`edit_diff` with the equality of `equality_comparer`.

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

## Trait implementations

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

## Availability

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