# AsyncSender

`import { AsyncSender } from "destack:channel";`

Asynchronous sender endpoint.

```ds title="AsyncSender"
export interface AsyncSender<T> {
    send(value: ^T): AsyncResult<void, SendError<T>>;
    trySend(value: ^T): Result<void, SendError<T>>;
    close(): void;
}
```

[language/library/src/channel/channel.ds:86:95](https://github.com/destack-sh/destack/blob/main/language/library/src/channel/channel.ds#L86-L95)

## Members

### `send(value: ^T): AsyncResult<void, SendError<T>>`

Send one value.

### `trySend(value: ^T): Result<void, SendError<T>>`

Try to send one value without suspending.

### `close(): void`

Close this sender.
