> ## 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.

# Display Event • Rust AI Agent SDK

> DisplayEvent: Display event

# DisplayEvent

> Defined in the [**Display Types**](../modules/display_types) module.

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

Display event

## Fields

| Name         | Type                   | Description                |
| ------------ | ---------------------- | -------------------------- |
| `event_type` | `DisplayEventType`     | Event type                 |
| `agent_name` | `Option&lt;String&gt;` | Agent name (if applicable) |
| `content`    | `Option&lt;String&gt;` | Content/message            |
| `data`       | `HashMap&lt;String`    | Additional data            |
| `serde_json` | `:Value&gt;`           | Additional data            |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new(event_type: DisplayEventType) -> Self
```

Create a new display event

**Parameters:**

| Name         | Type               |
| ------------ | ------------------ |
| `event_type` | `DisplayEventType` |

### `agent`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn agent(mut self, name: impl Into<String>) -> Self
```

Set agent name

**Parameters:**

| Name   | Type                      |
| ------ | ------------------------- |
| `name` | `impl Into&lt;String&gt;` |

### `content`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn content(mut self, content: impl Into<String>) -> Self
```

Set content

**Parameters:**

| Name      | Type                      |
| --------- | ------------------------- |
| `content` | `impl Into&lt;String&gt;` |

### `data`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn data(mut self, key: impl Into<String>, value: serde_json::Value) -> Self
```

Add data

**Parameters:**

| Name    | Type                      |
| ------- | ------------------------- |
| `key`   | `impl Into&lt;String&gt;` |
| `value` | `serde_json::Value`       |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/parity/display_types.rs#L129">
  `praisonai/src/parity/display_types.rs` at line 129
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Display" icon="display" href="/docs/rust/display" />

  <Card title="Rust Output" icon="file-export" href="/docs/rust/output" />
</CardGroup>
