# canceled

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-system/threading/tasks/function-canceled/

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

```rust
fn canceled<T>() -> Result<T, crate::ObservableError>
```

A future that ends with a cancellation (`Task.FromCanceled` awaited): for code that stops
because its token was cancelled.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.System/threading/tasks/local_executor.rs#L177)

## Availability

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