Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
GatewayEvent
Defined in the gateway module.
Rust AI Agent SDK
A gateway event with metadata.
Fields
| Name | Type | Description |
|---|
event_type | EventType | The event type |
data | serde_json::Value | Event payload |
event_id | String | Unique event identifier |
timestamp | f64 | Event creation time (Unix timestamp) |
source | Option<String> | Source identifier (agent_id, client_id, etc.) |
target | Option<String> | Target identifier (optional, for directed events) |
Methods
new
fn new(event_type: EventType) -> Self
Create a new gateway event.
Parameters:
| Name | Type |
|---|
event_type | EventType |
data
fn data(mut self, data: serde_json::Value) -> Self
Set event data.
Parameters:
| Name | Type |
|---|
data | serde_json::Value |
source
fn source(mut self, source: impl Into<String>) -> Self
Set source identifier.
Parameters:
| Name | Type |
|---|
source | impl Into<String> |
target
fn target(mut self, target: impl Into<String>) -> Self
Set target identifier.
Parameters:
| Name | Type |
|---|
target | impl Into<String> |
Source
View on GitHub
praisonai/src/gateway/mod.rs at line 97