Skip to main content

JsonRpcNotification

Trait JsonRpcNotification 

Source
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".

Implementors§

Source§

impl JsonRpcNotification for agent_client_protocol::AgentNotification

Source§

impl JsonRpcNotification for agent_client_protocol::schema::v2::AgentNotification

Available on crate feature unstable_protocol_v2 only.
Source§

impl JsonRpcNotification for agent_client_protocol::schema::CancelNotification

Source§

impl JsonRpcNotification for agent_client_protocol::schema::v2::CancelNotification

Available on crate feature unstable_protocol_v2 only.
Source§

impl JsonRpcNotification for agent_client_protocol::ClientNotification

Source§

impl JsonRpcNotification for agent_client_protocol::schema::v2::ClientNotification

Available on crate feature unstable_protocol_v2 only.
Source§

impl JsonRpcNotification for agent_client_protocol::schema::CompleteElicitationNotification

Source§

impl JsonRpcNotification for agent_client_protocol::schema::v2::CompleteElicitationNotification

Available on crate feature unstable_protocol_v2 only.
Source§

impl JsonRpcNotification for McpDisconnectNotification

Source§

impl JsonRpcNotification for MessageMcpNotification

Available on crate feature unstable_protocol_v2 only.
Source§

impl JsonRpcNotification for agent_client_protocol::schema::SessionNotification

Source§

impl JsonRpcNotification for agent_client_protocol::schema::v2::SessionNotification

Available on crate feature unstable_protocol_v2 only.
Source§

impl JsonRpcNotification for UntypedMessage

Source§

impl<Notif: JsonRpcNotification> JsonRpcNotification for SuccessorMessage<Notif>

Source§

impl<R: JsonRpcNotification> JsonRpcNotification for McpOverAcpMessage<R>