> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Async Stream Callback • Rust AI Agent SDK

> AsyncStreamCallback: Trait for asynchronous stream event callbacks.

# AsyncStreamCallback

> Defined in the [**streaming**](../modules/streaming) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Trait for asynchronous stream event callbacks.

## Methods

### `on_event`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async fn on_event(&self, event: &StreamEvent) -> ()
```

Called when a stream event is emitted (async)

**Parameters:**

| Name    | Type           |
| ------- | -------------- |
| `event` | `&StreamEvent` |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/streaming/mod.rs">
  `praisonai/src/streaming/mod.rs` at line 0
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Execution" icon="play" href="/docs/rust/execution" />

  <Card title="Rust Parallel Execution" icon="arrows-split" href="/docs/rust/parallel-execution" />
</CardGroup>
