# SchedulerOperationAwaiter

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactive/concurrency/struct-scheduleroperationawaiter/

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

```rust
struct SchedulerOperationAwaiter
```

The awaiter of a [`SchedulerOperation`](/docs/0.5.0/api/ferroui-reactive/concurrency/struct-scheduleroperation/) (`SchedulerOperationAwaiter`): the members the `await`
of C# calls, and the `Future` that `.await` polls.

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

## Members

- [`is_completed`](#function-is_completed)
- [`get_result`](#function-get_result)
- [`on_completed`](#function-on_completed)

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

### is_completed

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

Whether the operation has ended: false unless its token is cancelled (`IsCompleted`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/concurrency/scheduler_async.rs#L257)

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

### get_result

```rust
fn get_result(self: &Self) -> Result<(), ObservableError>
```

The outcome of the operation: a cancellation (`Canceled`) when its token is cancelled
(`GetResult`, which throws `OperationCanceledException`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/concurrency/scheduler_async.rs#L263)

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

### on_completed

```rust
fn on_completed(self: &Self, continuation: impl FnOnce() -> () + 'static)
```

Schedules `continuation` on the scheduler of the operation (`OnCompleted`); the cancellation
of the token runs it at once instead, disposing what was scheduled. When the operation was
configured to continue on the captured context, the continuation is posted to the current
synchronization context of the thread, if there is one, when it runs.
## Panics
When the awaiter was given a continuation already (`InvalidOperationException`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/concurrency/scheduler_async.rs#L277)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TaskObservableExt<T>`](/docs/0.5.0/api/ferroui-reactive/linq/trait-taskobservableext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `IntoFuture`
- `ToOwned`
- `Clone`
- `Future`

## Availability

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