# ChangeSetSource

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/change_sets/trait-changesetsource/

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

```rust
trait ChangeSetSource<T>
```

A collection whose changes can be observed as change sets: it raises the typed
`CollectionChanged` notification and enumerates its items (upstream's constraint
`INotifyCollectionChanged, IEnumerable<T>`).

Deviation (DEVIATIONS.md, ReactiveUI): the `INotifyCollectionChanged` of `ferroui-system`
raises an untyped description of a change, without the items; the typed notification that
carries them is the one of each collection type, which this trait names.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/change_sets/change_set_extensions.rs#L17)

## Members

- [`current_items`](#function-current_items)
- [`add_collection_changed`](#function-add_collection_changed)
- [`remove_collection_changed`](#function-remove_collection_changed)

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

### current_items

```rust
fn current_items(self: &Self) -> Vec<T>
```

A copy of the items, in order (`IEnumerable<T>`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/change_sets/change_set_extensions.rs#L19)

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

### add_collection_changed

```rust
fn add_collection_changed(self: &Self, handler: Rc<CollectionChangedHandler<T>>) -> u64
```

Adds a handler of the typed change notifications; returns the token that removes it
(`CollectionChanged +=`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/change_sets/change_set_extensions.rs#L23)

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

### remove_collection_changed

```rust
fn remove_collection_changed(self: &Self, token: u64) -> bool
```

Removes a handler (`CollectionChanged -=`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/change_sets/change_set_extensions.rs#L26)

## Trait implementations

- [`ChangeSetSource<T>`](/docs/0.5.0/api/ferroui-reactiveui/change_sets/trait-changesetsource/)

## Availability

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