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§
Sourcefn to_jsonrpc(&self) -> JsonRpcNotification
fn to_jsonrpc(&self) -> JsonRpcNotification
Convert this event into a JsonRpcNotification.
Sourcefn session_id(&self) -> String
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".