# TaskStreamPlugin

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/data/core/plugins/struct-taskstreamplugin/

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

```rust
struct TaskStreamPlugin
```

Handles binding to [`TaskValue`](/docs/0.5.0/api/ferroui-base/data/core/plugins/struct-taskvalue/)s for the `^` stream binding operator.

A completed task produces its result, a failed one a binding error
notification. The outcome of a task that is still running is delivered
from a dispatcher job queued when the task finishes.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/core/plugins/task_stream_plugin.rs#L194)

## Members

- [`handle_completed`](#function-handle_completed)
- [`observe`](#function-observe)

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

### handle_completed

```rust
fn handle_completed(task: &TaskValue) -> Rc<dyn IObservable<Option<BoxedValue>>>
```

The stream of a finished task: its result, or a binding error
notification for a failed one. Panics if the task is still running.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/core/plugins/task_stream_plugin.rs#L199)

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

### observe

```rust
fn observe(task: &TaskValue) -> Rc<dyn IObservable<Option<BoxedValue>>>
```

The stream of a task: the outcome right away if the task has
finished, otherwise delivered from a dispatcher job queued when the
task finishes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/core/plugins/task_stream_plugin.rs#L228)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ErasedDestructor`
- `IntoEither`
- [`IStreamPlugin`](/docs/0.5.0/api/ferroui-base/data/core/plugins/trait-istreamplugin/)

## Availability

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