# Expected

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactive-testing/enum-expected/

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

```rust
enum Expected<T>
```

A notification a test expects: one notification, or a notification that satisfies a predicate
(the predicate forms of `ReactiveTest.OnNext` and `OnError`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive.Testing/lib.rs#L284)

## Members

- [`Exact`](#variant-exact)
- [`OnNextWhere`](#variant-onnextwhere)
- [`OnErrorWhere`](#variant-onerrorwhere)
- [`matches`](#function-matches)

<a id="variant-exact"></a>

### Exact

```rust
Exact(ferroui_reactive::Notification<T>)
```

The notification itself.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive.Testing/lib.rs#L286)

<a id="variant-onnextwhere"></a>

### OnNextWhere

```rust
OnNextWhere(std::rc::Rc<dyn Fn(&T) -> bool>)
```

A value for which the predicate is true (`OnNext<T>(long, Func<T, bool>)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive.Testing/lib.rs#L288)

<a id="variant-onerrorwhere"></a>

### OnErrorWhere

```rust
OnErrorWhere(std::rc::Rc<dyn Fn(&ferroui_reactive::ObservableError) -> bool>)
```

An error for which the predicate is true (`OnError<T>(long, Func<Exception, bool>)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive.Testing/lib.rs#L290)

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

### matches

```rust
fn matches(self: &Self, notification: &Notification<T>) -> bool
```

Whether the notification is the expected one.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive.Testing/lib.rs#L295)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `Clone`
- `Debug`

## Availability

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