# IComparerBuilder

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/comparers/trait-icomparerbuilder/

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

```rust
trait IComparerBuilder<T>
```

The starting point of a chain of comparers (`IComparerBuilder<T>`): the first key of the
order, which `then_by` extends (`ComparerChainingExtensions`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/comparers/i_comparer_builder.rs#L7)

## Members

- [`order_by`](#function-order_by)
- [`order_by_with`](#function-order_by_with)
- [`order_by_descending`](#function-order_by_descending)
- [`order_by_descending_with`](#function-order_by_descending_with)

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

### order_by

```rust
fn order_by<V: Ord + 'static>(self: &Self, selector: impl Fn(&T) -> V + 'static) -> Comparer<T>
```

In ascending order of the values of `selector`, compared by their `Ord`
(`OrderBy<TValue>(Func<T, TValue>)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/comparers/i_comparer_builder.rs#L10)

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

### order_by_with

```rust
fn order_by_with<V: 'static>(self: &Self, selector: impl Fn(&T) -> V + 'static, comparer: Comparer<V>) -> Comparer<T>
```

In ascending order of the values of `selector`, compared by `comparer`
(`OrderBy<TValue>(Func<T, TValue>, IComparer<TValue>)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/comparers/i_comparer_builder.rs#L14)

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

### order_by_descending

```rust
fn order_by_descending<V: Ord + 'static>(self: &Self, selector: impl Fn(&T) -> V + 'static) -> Comparer<T>
```

In descending order of the values of `selector`, compared by their `Ord`
(`OrderByDescending<TValue>(Func<T, TValue>)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/comparers/i_comparer_builder.rs#L18)

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

### order_by_descending_with

```rust
fn order_by_descending_with<V: 'static>(self: &Self, selector: impl Fn(&T) -> V + 'static, comparer: Comparer<V>) -> Comparer<T>
```

In descending order of the values of `selector`, compared by `comparer`
(`OrderByDescending<TValue>(Func<T, TValue>, IComparer<TValue>)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/comparers/i_comparer_builder.rs#L22)

## Trait implementations

- [`IComparerBuilder<T>`](/docs/0.5.0/api/ferroui-reactiveui/comparers/trait-icomparerbuilder/)

## Availability

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