pub enum ServerNotification {
CancelledNotification(CancelledNotification),
ProgressNotification(ProgressNotification),
ResourceListChangedNotification(ResourceListChangedNotification),
ResourceUpdatedNotification(ResourceUpdatedNotification),
PromptListChangedNotification(PromptListChangedNotification),
ToolListChangedNotification(ToolListChangedNotification),
LoggingMessageNotification(LoggingMessageNotification),
}
Expand description
ServerNotification
JSON schema
{
"anyOf": [
{
"$ref": "#/definitions/CancelledNotification"
},
{
"$ref": "#/definitions/ProgressNotification"
},
{
"$ref": "#/definitions/ResourceListChangedNotification"
},
{
"$ref": "#/definitions/ResourceUpdatedNotification"
},
{
"$ref": "#/definitions/PromptListChangedNotification"
},
{
"$ref": "#/definitions/ToolListChangedNotification"
},
{
"$ref": "#/definitions/LoggingMessageNotification"
}
]
}
Variants§
CancelledNotification(CancelledNotification)
ProgressNotification(ProgressNotification)
ResourceListChangedNotification(ResourceListChangedNotification)
ResourceUpdatedNotification(ResourceUpdatedNotification)
PromptListChangedNotification(PromptListChangedNotification)
ToolListChangedNotification(ToolListChangedNotification)
LoggingMessageNotification(LoggingMessageNotification)
Implementations§
Trait Implementations§
Source§impl Clone for ServerNotification
impl Clone for ServerNotification
Source§fn clone(&self) -> ServerNotification
fn clone(&self) -> ServerNotification
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 ServerNotification
impl Debug for ServerNotification
Source§impl<'de> Deserialize<'de> for ServerNotification
Implementing the Deserialize trait
This allows enum to be deserialized into correct type based on the value of the “method”
impl<'de> Deserialize<'de> for ServerNotification
Implementing the Deserialize trait This allows enum to be deserialized into correct type based on the value of the “method”
Source§fn deserialize<D>(
deserializer: D,
) -> Result<ServerNotification, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ServerNotification, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<CancelledNotification> for ServerNotification
impl From<CancelledNotification> for ServerNotification
Source§fn from(value: CancelledNotification) -> ServerNotification
fn from(value: CancelledNotification) -> ServerNotification
Converts to this type from the input type.
Source§impl From<LoggingMessageNotification> for ServerNotification
impl From<LoggingMessageNotification> for ServerNotification
Source§fn from(value: LoggingMessageNotification) -> ServerNotification
fn from(value: LoggingMessageNotification) -> ServerNotification
Converts to this type from the input type.
Source§impl From<ProgressNotification> for ServerNotification
impl From<ProgressNotification> for ServerNotification
Source§fn from(value: ProgressNotification) -> ServerNotification
fn from(value: ProgressNotification) -> ServerNotification
Converts to this type from the input type.
Source§impl From<PromptListChangedNotification> for ServerNotification
impl From<PromptListChangedNotification> for ServerNotification
Source§fn from(value: PromptListChangedNotification) -> ServerNotification
fn from(value: PromptListChangedNotification) -> ServerNotification
Converts to this type from the input type.
Source§impl From<ResourceListChangedNotification> for ServerNotification
impl From<ResourceListChangedNotification> for ServerNotification
Source§fn from(value: ResourceListChangedNotification) -> ServerNotification
fn from(value: ResourceListChangedNotification) -> ServerNotification
Converts to this type from the input type.
Source§impl From<ResourceUpdatedNotification> for ServerNotification
impl From<ResourceUpdatedNotification> for ServerNotification
Source§fn from(value: ResourceUpdatedNotification) -> ServerNotification
fn from(value: ResourceUpdatedNotification) -> ServerNotification
Converts to this type from the input type.
Source§impl From<ToolListChangedNotification> for ServerNotification
impl From<ToolListChangedNotification> for ServerNotification
Source§fn from(value: ToolListChangedNotification) -> ServerNotification
fn from(value: ToolListChangedNotification) -> ServerNotification
Converts to this type from the input type.
Source§impl Serialize for ServerNotification
impl Serialize for ServerNotification
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<NotificationFromServer> for ServerNotification
impl TryFrom<NotificationFromServer> for ServerNotification
Source§fn try_from(
value: NotificationFromServer,
) -> Result<ServerNotification, <ServerNotification as TryFrom<NotificationFromServer>>::Error>
fn try_from( value: NotificationFromServer, ) -> Result<ServerNotification, <ServerNotification as TryFrom<NotificationFromServer>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for ServerNotification
impl RefUnwindSafe for ServerNotification
impl Send for ServerNotification
impl Sync for ServerNotification
impl Unpin for ServerNotification
impl UnwindSafe for ServerNotification
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