# ChangeSetWithContext

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

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

```rust
struct ChangeSetWithContext<T, K, X>
```

The changes of a cache with a context (`ChangeSet<TObject, TKey, TContext>`, which
implements `IChangeSet<TObject, TKey, TContext>`): the change sets of `SortAndPage`
(`PageContext`) and of `SortAndVirtualize`
(`VirtualContext`).

Deviation (DEVIATIONS.md, DynamicData): Rust has no overloading of a type by the number of its
parameters, so upstream's `ChangeSet<TObject, TKey, TContext>` is named
`ChangeSetWithContext`. It dereferences to its [`ChangeSet`](/docs/0.5.0/api/ferroui-dynamic-data/cache/struct-changeset/), as upstream's derives from it.

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

## Members

- [`new`](#function-new)
- [`empty`](#function-empty)
- [`context`](#function-context)
- [`changes`](#function-changes)

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

### new

```rust
fn new(collection: ChangeSet<T, K>, context: X) -> Self
```

The changes `collection` with `context` (`ChangeSet(IEnumerable<Change>, TContext)`).

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

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

### empty

```rust
fn empty(context: X) -> Self
```

A change set without changes, with `context` (`ChangeSet(TContext)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/cache/change_set_with_context.rs#L34)

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

### context

```rust
fn context(self: &Self) -> &X
```

The context (`Context`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/cache/change_set_with_context.rs#L39)

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

### changes

```rust
fn changes(self: &Self) -> &ChangeSet<T, K>
```

The changes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/cache/change_set_with_context.rs#L44)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ToOwned`
- `Clone`
- `Deref`
- `IntoIterator`
- [`IChangeSet<T, K>`](/docs/0.5.0/api/ferroui-dynamic-data/cache/trait-ichangeset/)
- `Debug`

## Availability

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