# TaskObservableExt

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

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

```rust
trait TaskObservableExt<T>
```

A task as a sequence (`TaskObservableExtensions.ToObservable`): any future of a
`Result<T, ObservableError>`, which runs as a task of the current thread; a
`Flatten` (`shared.flatten()`) is the `Shared` it awaits, used as it is.

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

## Members

- [`to_observable`](#function-to_observable)
- [`to_observable_on`](#function-to_observable_on)

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

### to_observable

```rust
fn to_observable(self: Self) -> Rc<dyn IObservable<T>>
```

A sequence of the result of the task, or of its error; a cancellation ends it with the
error of the cancellation (`ToObservable(Task<TResult>)`, `ToObservable(Task)` for `T = ()`).

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

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

### to_observable_on

```rust
fn to_observable_on(self: Self, scheduler: Rc<dyn IScheduler>) -> Rc<dyn IObservable<T>>
```

`to_observable` with the notifications on `scheduler`
(`ToObservable(Task<TResult>, IScheduler)`, `ToObservable(Task<TResult>, TaskObservationOptions)`).

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

## Trait implementations

- [`TaskObservableExt<T>`](/docs/0.5.0/api/ferroui-reactive/linq/trait-taskobservableext/)

## Availability

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