# Sender

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

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

```rust
struct Sender<T>
```

The end of a [`channel`](/docs/0.5.0/api/ferroui-system/task/oneshot/function-channel/) that sends the value: once, from any thread.

Dropping it without sending cancels the channel: the receiver ends with [`Canceled`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-canceled/).

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

## Members

- [`send`](#function-send)
- [`is_closed`](#function-is_closed)

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

### send

```rust
fn send(self: Self, value: T) -> Result<(), T>
```

Sends the value and wakes whoever waits for it, inside this call. Gives the value back
when the receiver (and every clone of its shared form) is gone.

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

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

### is_closed

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

Whether the receiver (and every clone of its shared form) is gone, so that a value sent
would be given back.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `Drop`
- `Debug`
- `From<TaskCompletionSource<T>>`

## Availability

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