pub trait JsonRpcNotification: JsonRpcMessage { }Expand description
A struct that represents a notification (JSON-RPC message that does not expect a response).
§Derive Macro
Use #[derive(JsonRpcNotification)] to automatically implement both JsonRpcMessage and JsonRpcNotification:
ⓘ
use agent_client_protocol::JsonRpcNotification;
use serde::{Serialize, Deserialize};
#[derive(Debug, Clone, Serialize, Deserialize, JsonRpcNotification)]
#[notification(method = "_ping")]
struct PingNotification {
timestamp: u64,
}Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.