pub struct JsonrpcNotification {
pub method: String,
pub params: Option<JsonrpcNotificationParams>,
/* private fields */
}
Expand description
A notification which does not expect a response.
JSON schema
{
"description": "A notification which does not expect a response.",
"type": "object",
"required": [
"jsonrpc",
"method"
],
"properties": {
"jsonrpc": {
"type": "string",
"const": "2.0"
},
"method": {
"type": "string"
},
"params": {
"type": "object",
"properties": {
"_meta": {
"description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
"type": "object",
"additionalProperties": {}
}
},
"additionalProperties": {}
}
}
}
Fields§
§method: String
§params: Option<JsonrpcNotificationParams>
Implementations§
Trait Implementations§
Source§impl Clone for JsonrpcNotification
impl Clone for JsonrpcNotification
Source§fn clone(&self) -> JsonrpcNotification
fn clone(&self) -> JsonrpcNotification
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for JsonrpcNotification
impl Debug for JsonrpcNotification
Source§impl<'de> Deserialize<'de> for JsonrpcNotification
impl<'de> Deserialize<'de> for JsonrpcNotification
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<JsonrpcNotification> for JsonrpcBatchRequestItem
impl From<JsonrpcNotification> for JsonrpcBatchRequestItem
Source§fn from(value: JsonrpcNotification) -> Self
fn from(value: JsonrpcNotification) -> Self
Converts to this type from the input type.
Source§impl From<JsonrpcNotification> for JsonrpcMessage
impl From<JsonrpcNotification> for JsonrpcMessage
Source§fn from(value: JsonrpcNotification) -> Self
fn from(value: JsonrpcNotification) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for JsonrpcNotification
impl RefUnwindSafe for JsonrpcNotification
impl Send for JsonrpcNotification
impl Sync for JsonrpcNotification
impl Unpin for JsonrpcNotification
impl UnwindSafe for JsonrpcNotification
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more