# ObservableCollectionAdaptor

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

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

```rust
struct ObservableCollectionAdaptor<T, K>
```

Applies the change sets of a cache to an observable collection, loading it with a reset above
a threshold of changes (`ObservableCollectionAdaptor<TObject, TKey>`).

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

## Members

- [`new`](#function-new)
- [`with_options`](#function-with_options)
- [`with_use_replace_for_updates`](#function-with_use_replace_for_updates)

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

### new

```rust
fn new(refresh_threshold: usize, use_replace_for_updates: bool, reset_on_first_time_load: bool) -> Self
```

The adaptor with every part (`ObservableCollectionAdaptor(int, bool, bool)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/binding/observable_collection_adaptor.rs#L82)

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

### with_options

```rust
fn with_options(options: BindingOptions) -> Self
```

The adaptor with `options` (`ObservableCollectionAdaptor(BindingOptions)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/binding/observable_collection_adaptor.rs#L87)

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

### with_use_replace_for_updates

```rust
fn with_use_replace_for_updates(use_replace_for_updates: bool) -> Self
```

The defaults with the choice of replacements (`ObservableCollectionAdaptor(useReplaceForUpdates: ..)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/binding/observable_collection_adaptor.rs#L92)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `Default`
- [`IObservableCollectionAdaptor<T, K>`](/docs/0.5.0/api/ferroui-dynamic-data/binding/trait-iobservablecollectionadaptor/)

## Availability

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