# AggregateChangeSetEx

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

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

```rust
trait AggregateChangeSetEx<T: 'static>
```

The aggregations of aggregate change sets (the overloads of `AvgEx`, `CountEx`, `StdDevEx` and
`SumEx` on `IObservable<IAggregateChangeSet<T>>`), to which the forms of caches and lists
forward.

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

## Members

- [`avg`](#function-avg)
- [`avg_with`](#function-avg_with)
- [`count_aggregate`](#function-count_aggregate)
- [`std_dev`](#function-std_dev)
- [`sum_aggregate`](#function-sum_aggregate)

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

### avg

```rust
fn avg<V: AggregateValue>(self: &Self, value_selector: impl Fn(&T) -> V + 'static) -> Rc<dyn IObservable<<<V as >::Number as AggregateNumber>::Average>>
```

The average of the values of the items after each change set, zero when there are none
(`Avg(Func<T, TValue>)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/aggregation/aggregation_ex.rs#L263)

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

### avg_with

```rust
fn avg_with<V: AggregateValue>(self: &Self, value_selector: impl Fn(&T) -> V + 'static, empty_value: <V as >::Number) -> Rc<dyn IObservable<<<V as >::Number as AggregateNumber>::Average>>
```

`avg` with the value when there are no items
(`Avg(Func<T, TValue>, TValue emptyValue)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/aggregation/aggregation_ex.rs#L267)

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

### count_aggregate

```rust
fn count_aggregate(self: &Self) -> Rc<dyn IObservable<usize>>
```

The count of the items after each change set (`Count<TObject>()`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/aggregation/aggregation_ex.rs#L270)

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

### std_dev

```rust
fn std_dev<V: StdDevValue>(self: &Self, value_selector: impl Fn(&T) -> V + 'static, fallback_value: V) -> Rc<dyn IObservable<f64>>
```

The sample standard deviation of the values of the items after each change set,
`fallback_value` for fewer than two items (`StdDev(Func<T, TValue>, TValue fallbackValue)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/aggregation/aggregation_ex.rs#L274)

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

### sum_aggregate

```rust
fn sum_aggregate<V: AggregateValue>(self: &Self, value_selector: impl Fn(&T) -> V + 'static) -> Rc<dyn IObservable<<V as >::Number>>
```

The sum of the values of the items after each change set (`Sum(Func<T, TValue>)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/aggregation/aggregation_ex.rs#L277)

## Trait implementations

- [`AggregateChangeSetEx<T>`](/docs/0.5.0/api/ferroui-dynamic-data/aggregation/trait-aggregatechangesetex/)

## Availability

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