# IObserverWithResult

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

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

```rust
trait IObserverWithResult<T, R>
```

An observer whose handlers return a result (`IObserver<TValue, TResult>`), which
`Notification::accept_observer_with_result` returns.

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

## Members

- [`on_next`](#function-on_next)
- [`on_error`](#function-on_error)
- [`on_completed`](#function-on_completed)

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

### on_next

```rust
fn on_next(self: &Self, value: T) -> R
```

Handles a value (`OnNext`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/notification.rs#L14)

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

### on_error

```rust
fn on_error(self: &Self, error: ObservableError) -> R
```

Handles an error (`OnError`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/notification.rs#L17)

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

### on_completed

```rust
fn on_completed(self: &Self) -> R
```

Handles the end of the sequence (`OnCompleted`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/notification.rs#L20)

## Availability

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