pub enum NotificationFromClient {
    ClientNotification(ClientNotification),
    CustomNotification(Value),
}Expand description
To determine standard and custom notifications received from the MCP Client Custom notifications are of type serde_json::Value and can be deserialized into any custom type.
Variants§
ClientNotification(ClientNotification)
CustomNotification(Value)
Implementations§
Source§impl NotificationFromClient
 
impl NotificationFromClient
Sourcepub fn is_initialized_notification(&self) -> bool
 
pub fn is_initialized_notification(&self) -> bool
Checks if the current notification is an InitializedNotification from the client, indicating that the client has been initialized.
Trait Implementations§
Source§impl Clone for NotificationFromClient
 
impl Clone for NotificationFromClient
Source§fn clone(&self) -> NotificationFromClient
 
fn clone(&self) -> NotificationFromClient
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 NotificationFromClient
 
impl Debug for NotificationFromClient
Source§impl<'de> Deserialize<'de> for NotificationFromClient
 
impl<'de> Deserialize<'de> for NotificationFromClient
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 NotificationFromClient
 
impl From<CancelledNotification> for NotificationFromClient
Source§fn from(value: CancelledNotification) -> Self
 
fn from(value: CancelledNotification) -> Self
Converts to this type from the input type.
Source§impl From<InitializedNotification> for NotificationFromClient
 
impl From<InitializedNotification> for NotificationFromClient
Source§fn from(value: InitializedNotification) -> Self
 
fn from(value: InitializedNotification) -> Self
Converts to this type from the input type.
Source§impl From<NotificationFromClient> for MessageFromClient
 
impl From<NotificationFromClient> for MessageFromClient
Source§fn from(value: NotificationFromClient) -> Self
 
fn from(value: NotificationFromClient) -> Self
Converts to this type from the input type.
Source§impl From<ProgressNotification> for NotificationFromClient
 
impl From<ProgressNotification> for NotificationFromClient
Source§fn from(value: ProgressNotification) -> Self
 
fn from(value: ProgressNotification) -> 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 Serialize for NotificationFromClient
 
impl Serialize for NotificationFromClient
Source§impl TryFrom<NotificationFromClient> for CancelledNotification
 
impl TryFrom<NotificationFromClient> for CancelledNotification
Source§type Error = JsonrpcErrorError
 
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Source§impl TryFrom<NotificationFromClient> for ClientNotification
 
impl TryFrom<NotificationFromClient> for ClientNotification
Source§type Error = JsonrpcErrorError
 
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Source§impl TryFrom<NotificationFromClient> for InitializedNotification
 
impl TryFrom<NotificationFromClient> for InitializedNotification
Source§type Error = JsonrpcErrorError
 
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Source§impl TryFrom<NotificationFromClient> for ProgressNotification
 
impl TryFrom<NotificationFromClient> for ProgressNotification
Source§type Error = JsonrpcErrorError
 
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
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 NotificationFromClient
impl RefUnwindSafe for NotificationFromClient
impl Send for NotificationFromClient
impl Sync for NotificationFromClient
impl Unpin for NotificationFromClient
impl UnwindSafe for NotificationFromClient
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