# ObservableChangeSet

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-dynamic-data/struct-observablechangeset/

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

```rust
struct ObservableChangeSet
```

The factories of sequences of change sets (`ObservableChangeSet`).

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

## Members

- [`create_cache`](#function-create_cache)
- [`try_create_cache`](#function-try_create_cache)
- [`create_cache_with_action`](#function-create_cache_with_action)
- [`try_create_cache_with_action`](#function-try_create_cache_with_action)
- [`create_cache_async_with_disposable_with_token`](#function-create_cache_async_with_disposable_with_token)
- [`create_cache_async_with_disposable`](#function-create_cache_async_with_disposable)
- [`create_cache_async_with_action_with_token`](#function-create_cache_async_with_action_with_token)
- [`create_cache_async_with_action`](#function-create_cache_async_with_action)
- [`create_cache_async_with_token`](#function-create_cache_async_with_token)
- [`create_cache_async`](#function-create_cache_async)
- [`create_list`](#function-create_list)
- [`try_create_list`](#function-try_create_list)
- [`create_list_with_action`](#function-create_list_with_action)
- [`try_create_list_with_action`](#function-try_create_list_with_action)
- [`create_list_async_with_disposable_with_token`](#function-create_list_async_with_disposable_with_token)
- [`create_list_async_with_disposable`](#function-create_list_async_with_disposable)
- [`create_list_async_with_action_with_token`](#function-create_list_async_with_action_with_token)
- [`create_list_async_with_action`](#function-create_list_async_with_action)
- [`create_list_async`](#function-create_list_async)
- [`create_list_async_with_token`](#function-create_list_async_with_token)

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

### create_cache

```rust
fn create_cache<T: Clone + 'static, K: Eq + Hash + Clone + 'static>(subscribe: impl Fn(SourceCache<T, K>) -> Rc<dyn IDisposable> + 'static, key_selector: impl Fn(&T) -> K + 'static) -> Rc<dyn IObservable<ChangeSet<T, K>>>
```

A sequence of the change sets of a cache that `subscribe` fills; the disposable it returns
is disposed with the subscription
(`Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, IDisposable>, Func<TObject, TKey>)`).

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

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

### try_create_cache

```rust
fn try_create_cache<T: Clone + 'static, K: Eq + Hash + Clone + 'static>(subscribe: impl Fn(SourceCache<T, K>) -> Result<Rc<dyn IDisposable>, ObservableError> + 'static, key_selector: impl Fn(&T) -> K + 'static) -> Rc<dyn IObservable<ChangeSet<T, K>>>
```

`create_cache` with a function that can fail: its error ends the
sequence (the exception that upstream catches and delivers with `OnError`).

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

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

### create_cache_with_action

```rust
fn create_cache_with_action<T: Clone + 'static, K: Eq + Hash + Clone + 'static, A: FnOnce() -> () + 'static>(subscribe: impl Fn(SourceCache<T, K>) -> A + 'static, key_selector: impl Fn(&T) -> K + 'static) -> Rc<dyn IObservable<ChangeSet<T, K>>>
```

A sequence of the change sets of a cache that `subscribe` fills; the action it returns runs
when the subscription is disposed
(`Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, Action>, Func<TObject, TKey>)`).

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

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

### try_create_cache_with_action

```rust
fn try_create_cache_with_action<T: Clone + 'static, K: Eq + Hash + Clone + 'static, A: FnOnce() -> () + 'static>(subscribe: impl Fn(SourceCache<T, K>) -> Result<A, ObservableError> + 'static, key_selector: impl Fn(&T) -> K + 'static) -> Rc<dyn IObservable<ChangeSet<T, K>>>
```

`create_cache_with_action` with a function that can fail:
its error ends the sequence.

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

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

### create_cache_async_with_disposable_with_token

```rust
fn create_cache_async_with_disposable_with_token<T: Clone + 'static, K: Eq + Hash + Clone + 'static, Fut: Future<Output = Result<Rc<dyn IDisposable>, ObservableError>> + 'static>(subscribe: impl Fn(SourceCache<T, K>, CancellationToken) -> Fut + 'static, key_selector: impl Fn(&T) -> K + 'static) -> Rc<dyn IObservable<ChangeSet<T, K>>>
```

The asynchronous form whose task gives the disposable released with the subscription
(`Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, CancellationToken,
Task<IDisposable>>, Func<TObject, TKey>)`): the change sets are delivered from the start,
and an error of the task ends the sequence.

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

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

### create_cache_async_with_disposable

```rust
fn create_cache_async_with_disposable<T: Clone + 'static, K: Eq + Hash + Clone + 'static, Fut: Future<Output = Result<Rc<dyn IDisposable>, ObservableError>> + 'static>(subscribe: impl Fn(SourceCache<T, K>) -> Fut + 'static, key_selector: impl Fn(&T) -> K + 'static) -> Rc<dyn IObservable<ChangeSet<T, K>>>
```

`create_cache_async_with_disposable_with_token`
without a token (`Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, Task<IDisposable>>,
Func<TObject, TKey>)`).

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

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

### create_cache_async_with_action_with_token

```rust
fn create_cache_async_with_action_with_token<T: Clone + 'static, K: Eq + Hash + Clone + 'static, A: FnOnce() -> () + 'static, Fut: Future<Output = Result<A, ObservableError>> + 'static>(subscribe: impl Fn(SourceCache<T, K>, CancellationToken) -> Fut + 'static, key_selector: impl Fn(&T) -> K + 'static) -> Rc<dyn IObservable<ChangeSet<T, K>>>
```

The asynchronous form whose task gives the action run with the release of the subscription
(`Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, CancellationToken, Task<Action>>,
Func<TObject, TKey>)`): disposing the subscription completes the sequence, then runs the
action.

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

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

### create_cache_async_with_action

```rust
fn create_cache_async_with_action<T: Clone + 'static, K: Eq + Hash + Clone + 'static, A: FnOnce() -> () + 'static, Fut: Future<Output = Result<A, ObservableError>> + 'static>(subscribe: impl Fn(SourceCache<T, K>) -> Fut + 'static, key_selector: impl Fn(&T) -> K + 'static) -> Rc<dyn IObservable<ChangeSet<T, K>>>
```

`create_cache_async_with_action_with_token`
without a token (`Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, Task<Action>>,
Func<TObject, TKey>)`).

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

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

### create_cache_async_with_token

```rust
fn create_cache_async_with_token<T: Clone + 'static, K: Eq + Hash + Clone + 'static, Fut: Future<Output = Result<(), ObservableError>> + 'static>(subscribe: impl Fn(SourceCache<T, K>, CancellationToken) -> Fut + 'static, key_selector: impl Fn(&T) -> K + 'static) -> Rc<dyn IObservable<ChangeSet<T, K>>>
```

The asynchronous form whose task only fills the cache
(`Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, CancellationToken, Task>,
Func<TObject, TKey>)`): disposing the subscription completes the sequence.

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

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

### create_cache_async

```rust
fn create_cache_async<T: Clone + 'static, K: Eq + Hash + Clone + 'static, Fut: Future<Output = Result<(), ObservableError>> + 'static>(subscribe: impl Fn(SourceCache<T, K>) -> Fut + 'static, key_selector: impl Fn(&T) -> K + 'static) -> Rc<dyn IObservable<ChangeSet<T, K>>>
```

`create_cache_async_with_token` without a token
(`Create<TObject, TKey>(Func<ISourceCache<TObject, TKey>, Task>, Func<TObject, TKey>)`).

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

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

### create_list

```rust
fn create_list<T: Clone + PartialEq + 'static>(subscribe: impl Fn(SourceList<T>) -> Rc<dyn IDisposable> + 'static) -> Rc<dyn IObservable<crate::list::ChangeSet<T>>>
```

A sequence of the change sets of a list that `subscribe` fills; the disposable it returns is
disposed with the subscription, after the sequence completes
(`Create<T>(Func<ISourceList<T>, IDisposable>)`).

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

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

### try_create_list

```rust
fn try_create_list<T: Clone + PartialEq + 'static>(subscribe: impl Fn(SourceList<T>) -> Result<Rc<dyn IDisposable>, ObservableError> + 'static) -> Rc<dyn IObservable<crate::list::ChangeSet<T>>>
```

`create_list` with a function that can fail: its error ends the
sequence.

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

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

### create_list_with_action

```rust
fn create_list_with_action<T: Clone + PartialEq + 'static, A: FnOnce() -> () + 'static>(subscribe: impl Fn(SourceList<T>) -> A + 'static) -> Rc<dyn IObservable<crate::list::ChangeSet<T>>>
```

A sequence of the change sets of a list that `subscribe` fills; the action it returns runs
when the subscription is disposed (`Create<T>(Func<ISourceList<T>, Action>)`).

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

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

### try_create_list_with_action

```rust
fn try_create_list_with_action<T: Clone + PartialEq + 'static, A: FnOnce() -> () + 'static>(subscribe: impl Fn(SourceList<T>) -> Result<A, ObservableError> + 'static) -> Rc<dyn IObservable<crate::list::ChangeSet<T>>>
```

`create_list_with_action` with a function that can fail:
its error ends the sequence.

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

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

### create_list_async_with_disposable_with_token

```rust
fn create_list_async_with_disposable_with_token<T: Clone + PartialEq + 'static, Fut: Future<Output = Result<Rc<dyn IDisposable>, ObservableError>> + 'static>(subscribe: impl Fn(SourceList<T>, CancellationToken) -> Fut + 'static) -> Rc<dyn IObservable<crate::list::ChangeSet<T>>>
```

The asynchronous form whose task gives the disposable released with the subscription
(`Create<T>(Func<ISourceList<T>, CancellationToken, Task<IDisposable>>)`).

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

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

### create_list_async_with_disposable

```rust
fn create_list_async_with_disposable<T: Clone + PartialEq + 'static, Fut: Future<Output = Result<Rc<dyn IDisposable>, ObservableError>> + 'static>(subscribe: impl Fn(SourceList<T>) -> Fut + 'static) -> Rc<dyn IObservable<crate::list::ChangeSet<T>>>
```

`create_list_async_with_disposable_with_token`
without a token (`Create<T>(Func<ISourceList<T>, Task<IDisposable>>)`).

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

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

### create_list_async_with_action_with_token

```rust
fn create_list_async_with_action_with_token<T: Clone + PartialEq + 'static, A: FnOnce() -> () + 'static, Fut: Future<Output = Result<A, ObservableError>> + 'static>(subscribe: impl Fn(SourceList<T>, CancellationToken) -> Fut + 'static) -> Rc<dyn IObservable<crate::list::ChangeSet<T>>>
```

The asynchronous form whose task gives the action run with the release of the subscription
(`Create<T>(Func<ISourceList<T>, CancellationToken, Task<Action>>)`).

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

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

### create_list_async_with_action

```rust
fn create_list_async_with_action<T: Clone + PartialEq + 'static, A: FnOnce() -> () + 'static, Fut: Future<Output = Result<A, ObservableError>> + 'static>(subscribe: impl Fn(SourceList<T>) -> Fut + 'static) -> Rc<dyn IObservable<crate::list::ChangeSet<T>>>
```

`create_list_async_with_action_with_token`
without a token (`Create<T>(Func<ISourceList<T>, Task<Action>>)`).

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

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

### create_list_async

```rust
fn create_list_async<T: Clone + PartialEq + 'static, Fut: Future<Output = Result<(), ObservableError>> + 'static>(subscribe: impl Fn(SourceList<T>) -> Fut + 'static) -> Rc<dyn IObservable<crate::list::ChangeSet<T>>>
```

The asynchronous form whose task only fills the list
(`Create<T>(Func<ISourceList<T>, Task>)`): disposing the subscription completes the
sequence.

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

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

### create_list_async_with_token

```rust
fn create_list_async_with_token<T: Clone + PartialEq + 'static, Fut: Future<Output = Result<(), ObservableError>> + 'static>(subscribe: impl Fn(SourceList<T>, CancellationToken) -> Fut + 'static) -> Rc<dyn IObservable<crate::list::ChangeSet<T>>>
```

The asynchronous form whose task only fills the list, with a token
(`Create<T>(Func<ISourceList<T>, CancellationToken, Task>)`): unlike the other forms, the
change sets are delivered once the task has ended, as upstream subscribes to the list after
awaiting it.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`

## Availability

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