# Extremum

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactive/linq/trait-extremum/

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

```rust
trait Extremum: Sized + 'static
```

A type `Min` and `Max` compare with their default comparison (upstream's overloads for `int`,
`long`, `float`, `double` and their nullable forms, and `Min<TSource>()` and `Max<TSource>()`
with `Comparer<TSource>.Default`).

Implemented for the integer types, `bool`, `char`, `String`, `&'static str`, `()`, `Duration`,
`Instant` and `SystemTime` by their total order; for `f32` and `f64` by their order, a NaN
replacing the current value (as upstream's `MinDouble`, `MaxDouble`, ...); and for `Option` of
any of them, a `None` being ignored and a sequence without a `Some` giving `None` (upstream's
nullable forms and reference types). Other types implement the two comparisons, or use the
comparer forms (`min_with`, `max_with`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/linq/numeric.rs#L235)

## Members

- [`replaces_min`](#function-replaces_min)
- [`replaces_max`](#function-replaces_max)
- [`is_null`](#function-is_null)
- [`empty`](#function-empty)

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

### replaces_min

```rust
fn replaces_min(self: &Self, current: &Self) -> bool
```

Whether `self` replaces `current` as the minimum (`self < current`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/linq/numeric.rs#L237)

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

### replaces_max

```rust
fn replaces_max(self: &Self, current: &Self) -> bool
```

Whether `self` replaces `current` as the maximum (`self > current`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/linq/numeric.rs#L240)

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

### is_null

```rust
fn is_null(self: &Self) -> bool
```

Whether the value is ignored (a `null` of upstream); false by default.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/linq/numeric.rs#L243)

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

### empty

```rust
fn empty() -> Option<Self>
```

The value of a sequence without a value that is not ignored; `None` (the default) ends the
sequence with `SequenceError::NoElements` (`InvalidOperationException`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/linq/numeric.rs#L249)

## Trait implementations

- [`Extremum`](/docs/0.5.0/api/ferroui-reactive/linq/trait-extremum/)

## Availability

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