Display Event • Rust AI Agent SDK

DisplayEvent: Display event

DisplayEvent

Defined in the Display Types module.

Rust AI Agent SDK

Display event

Fields

NameTypeDescription
event_typeDisplayEventTypeEvent type
agent_nameOption<String>Agent name (if applicable)
contentOption<String>Content/message
dataHashMap<StringAdditional data
serde_json:Value>Additional data

Methods

new

rust
fn new(event_type: DisplayEventType) -> Self

Create a new display event

Parameters:

NameType
event_typeDisplayEventType

agent

rust
fn agent(mut self, name: impl Into<String>) -> Self

Set agent name

Parameters:

NameType
nameimpl Into&lt;String&gt;

content

rust
fn content(mut self, content: impl Into<String>) -> Self

Set content

Parameters:

NameType
contentimpl Into&lt;String&gt;

data

rust
fn data(mut self, key: impl Into<String>, value: serde_json::Value) -> Self

Add data

Parameters:

NameType
keyimpl Into&lt;String&gt;
valueserde_json::Value

Source

View on GitHub

praisonai/src/parity/display_types.rs at line 129


Related Documentation