Display Event • Rust AI Agent SDK
DisplayEvent: Display event
DisplayEvent
Defined in the Display Types module.
Rust AI Agent SDK
Display event
Fields
| Name | Type | Description |
|---|---|---|
event_type | DisplayEventType | Event type |
agent_name | Option<String> | Agent name (if applicable) |
content | Option<String> | Content/message |
data | HashMap<String | Additional data |
serde_json | :Value> | Additional data |
Methods
new
fn new(event_type: DisplayEventType) -> SelfCreate a new display event
Parameters:
| Name | Type |
|---|---|
event_type | DisplayEventType |
agent
fn agent(mut self, name: impl Into<String>) -> SelfSet agent name
Parameters:
| Name | Type |
|---|---|
name | impl Into<String> |
content
fn content(mut self, content: impl Into<String>) -> SelfSet content
Parameters:
| Name | Type |
|---|---|
content | impl Into<String> |
data
fn data(mut self, key: impl Into<String>, value: serde_json::Value) -> SelfAdd data
Parameters:
| Name | Type |
|---|---|
key | impl Into<String> |
value | serde_json::Value |
Source
View on GitHubpraisonai/src/parity/display_types.rs at line 129