pub struct RootsListChangedNotification {
pub params: Option<RootsListChangedNotificationParams>,
/* private fields */
}
Expand description
A notification from the client to the server, informing it that the list of roots has changed. This notification should be sent whenever the client adds, removes, or modifies any root. The server should then request an updated list of roots using the ListRootsRequest.
JSON schema
{
"description": "A notification from the client to the server, informing it that the list of roots has changed.\nThis notification should be sent whenever the client adds, removes, or modifies any root.\nThe server should then request an updated list of roots using the ListRootsRequest.",
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string",
"const": "notifications/roots/list_changed"
},
"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§
§params: Option<RootsListChangedNotificationParams>
Implementations§
Source§impl RootsListChangedNotification
impl RootsListChangedNotification
pub fn new(params: Option<RootsListChangedNotificationParams>) -> Self
pub fn method(&self) -> &String
pub fn method_name() -> String
Trait Implementations§
Source§impl Clone for RootsListChangedNotification
impl Clone for RootsListChangedNotification
Source§fn clone(&self) -> RootsListChangedNotification
fn clone(&self) -> RootsListChangedNotification
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 RootsListChangedNotification
impl Debug for RootsListChangedNotification
Source§impl<'de> Deserialize<'de> for RootsListChangedNotification
impl<'de> Deserialize<'de> for RootsListChangedNotification
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<RootsListChangedNotification> for ClientJsonrpcNotification
impl From<RootsListChangedNotification> for ClientJsonrpcNotification
Source§fn from(value: RootsListChangedNotification) -> Self
fn from(value: RootsListChangedNotification) -> Self
Converts to this type from the input type.
Source§impl From<RootsListChangedNotification> for ClientNotification
impl From<RootsListChangedNotification> for ClientNotification
Source§fn from(value: RootsListChangedNotification) -> Self
fn from(value: RootsListChangedNotification) -> Self
Converts to this type from the input type.
Source§impl From<RootsListChangedNotification> for MessageFromClient
impl From<RootsListChangedNotification> for MessageFromClient
Source§fn from(value: RootsListChangedNotification) -> Self
fn from(value: RootsListChangedNotification) -> Self
Converts to this type from the input type.
Source§impl From<RootsListChangedNotification> for NotificationFromClient
impl From<RootsListChangedNotification> for NotificationFromClient
Source§fn from(value: RootsListChangedNotification) -> Self
fn from(value: RootsListChangedNotification) -> Self
Converts to this type from the input type.
Source§impl FromMessage<RootsListChangedNotification> for ClientMessage
impl FromMessage<RootsListChangedNotification> for ClientMessage
fn from_message( message: RootsListChangedNotification, request_id: Option<RequestId>, ) -> Result<Self, JsonrpcErrorError>
Source§impl ToMessage<ClientMessage> for RootsListChangedNotification
impl ToMessage<ClientMessage> for RootsListChangedNotification
fn to_message( self, request_id: Option<RequestId>, ) -> Result<ClientMessage, JsonrpcErrorError>
Source§impl TryFrom<NotificationFromClient> for RootsListChangedNotification
impl TryFrom<NotificationFromClient> for RootsListChangedNotification
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for RootsListChangedNotification
impl RefUnwindSafe for RootsListChangedNotification
impl Send for RootsListChangedNotification
impl Sync for RootsListChangedNotification
impl Unpin for RootsListChangedNotification
impl UnwindSafe for RootsListChangedNotification
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