Skip to main content

AgentEvent

Trait AgentEvent 

Source
pub trait AgentEvent:
    Debug
    + Send
    + Sync {
    // Required methods
    fn to_jsonrpc(&self) -> JsonRpcNotification;
    fn session_id(&self) -> String;
}
Expand description

Trait for events that can be converted to JSON-RPC notifications and carry a session ID.

Required Methods§

Source

fn to_jsonrpc(&self) -> JsonRpcNotification

Convert this event into a JsonRpcNotification.

Source

fn session_id(&self) -> String

Return the session ID associated with this event.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§