# Canceled

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-system/task/oneshot/struct-canceled/

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

```rust
struct Canceled
```

The error of an outcome that will never come: the sender of a `oneshot`
channel was dropped without sending.

It is the one cancellation error of the workspace (docs/idiomatic-rust-async.md, section 3.7):
the error of a canceled dispatcher operation, of an awaited token, and of the futures of the
reactive libraries that their token stops. `OperationCanceledError` (`ferroui-base`) and
`TaskCanceledError` (`threading::tasks`), the error of a canceled `Task` that names it, both
deprecated, convert to and from it (`From`); `Canceled::is_cancellation` recognizes both.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.System/task/canceled.rs#L14)

## Members

- [`is_cancellation`](#function-is_cancellation)

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

### is_cancellation

```rust
fn is_cancellation(error: &crate::ObservableError) -> bool
```

Whether `error` is a cancellation: a `Canceled`, or the deprecated `TaskCanceledError` of
a canceled `Task` (`OperationCanceledException` and `TaskCanceledException` caught as such).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.System/task/canceled.rs#L27)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ToString`
- `Clone`
- `Copy`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`
- `Display`
- [`Error`](/docs/0.5.0/api/ferroui-dynamic-data/kernel/struct-error/)
- `From<Canceled>`
- `From<TaskCanceledError>`

## Availability

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