pub enum NotificationFromServer {
ServerNotification(ServerNotification),
CustomNotification(Value),
}
Expand description
To determine standard and custom notifications received from the MCP Server Custom notifications are of type serde_json::Value and can be deserialized into any custom type.
Variants§
ServerNotification(ServerNotification)
CustomNotification(Value)
Implementations§
Trait Implementations§
Source§impl Clone for NotificationFromServer
impl Clone for NotificationFromServer
Source§fn clone(&self) -> NotificationFromServer
fn clone(&self) -> NotificationFromServer
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 NotificationFromServer
impl Debug for NotificationFromServer
Source§impl<'de> Deserialize<'de> for NotificationFromServer
impl<'de> Deserialize<'de> for NotificationFromServer
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<CancelledNotification> for NotificationFromServer
impl From<CancelledNotification> for NotificationFromServer
Source§fn from(value: CancelledNotification) -> Self
fn from(value: CancelledNotification) -> Self
Converts to this type from the input type.
Source§impl From<LoggingMessageNotification> for NotificationFromServer
impl From<LoggingMessageNotification> for NotificationFromServer
Source§fn from(value: LoggingMessageNotification) -> Self
fn from(value: LoggingMessageNotification) -> Self
Converts to this type from the input type.
Source§impl From<NotificationFromServer> for MessageFromServer
impl From<NotificationFromServer> for MessageFromServer
Source§fn from(value: NotificationFromServer) -> Self
fn from(value: NotificationFromServer) -> Self
Converts to this type from the input type.
Source§impl From<ProgressNotification> for NotificationFromServer
impl From<ProgressNotification> for NotificationFromServer
Source§fn from(value: ProgressNotification) -> Self
fn from(value: ProgressNotification) -> Self
Converts to this type from the input type.
Source§impl From<PromptListChangedNotification> for NotificationFromServer
impl From<PromptListChangedNotification> for NotificationFromServer
Source§fn from(value: PromptListChangedNotification) -> Self
fn from(value: PromptListChangedNotification) -> Self
Converts to this type from the input type.
Source§impl From<ResourceListChangedNotification> for NotificationFromServer
impl From<ResourceListChangedNotification> for NotificationFromServer
Source§fn from(value: ResourceListChangedNotification) -> Self
fn from(value: ResourceListChangedNotification) -> Self
Converts to this type from the input type.
Source§impl From<ResourceUpdatedNotification> for NotificationFromServer
impl From<ResourceUpdatedNotification> for NotificationFromServer
Source§fn from(value: ResourceUpdatedNotification) -> Self
fn from(value: ResourceUpdatedNotification) -> Self
Converts to this type from the input type.
Source§impl From<ToolListChangedNotification> for NotificationFromServer
impl From<ToolListChangedNotification> for NotificationFromServer
Source§fn from(value: ToolListChangedNotification) -> Self
fn from(value: ToolListChangedNotification) -> Self
Converts to this type from the input type.
Source§impl Serialize for NotificationFromServer
impl Serialize for NotificationFromServer
Source§impl TryFrom<NotificationFromServer> for CancelledNotification
impl TryFrom<NotificationFromServer> for CancelledNotification
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Source§impl TryFrom<NotificationFromServer> for LoggingMessageNotification
impl TryFrom<NotificationFromServer> for LoggingMessageNotification
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Source§impl TryFrom<NotificationFromServer> for ProgressNotification
impl TryFrom<NotificationFromServer> for ProgressNotification
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Source§impl TryFrom<NotificationFromServer> for PromptListChangedNotification
impl TryFrom<NotificationFromServer> for PromptListChangedNotification
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Source§impl TryFrom<NotificationFromServer> for ResourceListChangedNotification
impl TryFrom<NotificationFromServer> for ResourceListChangedNotification
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Source§impl TryFrom<NotificationFromServer> for ResourceUpdatedNotification
impl TryFrom<NotificationFromServer> for ResourceUpdatedNotification
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Source§impl TryFrom<NotificationFromServer> for ServerNotification
impl TryFrom<NotificationFromServer> for ServerNotification
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Source§impl TryFrom<NotificationFromServer> for ToolListChangedNotification
impl TryFrom<NotificationFromServer> for ToolListChangedNotification
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for NotificationFromServer
impl RefUnwindSafe for NotificationFromServer
impl Send for NotificationFromServer
impl Sync for NotificationFromServer
impl Unpin for NotificationFromServer
impl UnwindSafe for NotificationFromServer
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