File tree Expand file tree Collapse file tree 4 files changed +56
-2
lines changed Expand file tree Collapse file tree 4 files changed +56
-2
lines changed Original file line number Diff line number Diff line change 66///
77/// Generated from : <https://github.com/modelcontextprotocol/specification.git>
88/// Hash : bb1446ff1810a0df57989d78366d626d2c01b9d7
9- /// Generated at : 2025-03-02 12:29:03
9+ /// Generated at : 2025-03-02 12:41:59
1010/// ----------------------------------------------------------------------------
1111///
1212/// MCP Protocol Version
Original file line number Diff line number Diff line change @@ -1327,6 +1327,33 @@ impl From<JsonrpcErrorError> for MessageFromClient {
13271327 }
13281328}
13291329
1330+ impl MCPMessage for MessageFromClient {
1331+ fn is_response ( & self ) -> bool {
1332+ matches ! ( self , MessageFromClient :: ResultFromClient ( _) )
1333+ }
1334+
1335+ fn is_request ( & self ) -> bool {
1336+ matches ! ( self , MessageFromClient :: RequestFromClient ( _) )
1337+ }
1338+
1339+ fn is_notification ( & self ) -> bool {
1340+ matches ! ( self , MessageFromClient :: NotificationFromClient ( _) )
1341+ }
1342+
1343+ fn is_error ( & self ) -> bool {
1344+ matches ! ( self , MessageFromClient :: Error ( _) )
1345+ }
1346+
1347+ fn message_type ( & self ) -> MessageTypes {
1348+ match self {
1349+ MessageFromClient :: RequestFromClient ( _) => MessageTypes :: Request ,
1350+ MessageFromClient :: ResultFromClient ( _) => MessageTypes :: Response ,
1351+ MessageFromClient :: NotificationFromClient ( _) => MessageTypes :: Notification ,
1352+ MessageFromClient :: Error ( _) => MessageTypes :: Error ,
1353+ }
1354+ }
1355+ }
1356+
13301357impl FromMessage < MessageFromClient > for ClientMessage {
13311358 fn from_message (
13321359 message : MessageFromClient ,
Original file line number Diff line number Diff line change 66///
77/// Generated from : <https://github.com/modelcontextprotocol/specification.git>
88/// Hash : bb1446ff1810a0df57989d78366d626d2c01b9d7
9- /// Generated at : 2025-03-02 12:29:04
9+ /// Generated at : 2025-03-02 12:41:59
1010/// ----------------------------------------------------------------------------
1111///
1212/// MCP Protocol Version
Original file line number Diff line number Diff line change @@ -1327,6 +1327,33 @@ impl From<JsonrpcErrorError> for MessageFromClient {
13271327 }
13281328}
13291329
1330+ impl MCPMessage for MessageFromClient {
1331+ fn is_response ( & self ) -> bool {
1332+ matches ! ( self , MessageFromClient :: ResultFromClient ( _) )
1333+ }
1334+
1335+ fn is_request ( & self ) -> bool {
1336+ matches ! ( self , MessageFromClient :: RequestFromClient ( _) )
1337+ }
1338+
1339+ fn is_notification ( & self ) -> bool {
1340+ matches ! ( self , MessageFromClient :: NotificationFromClient ( _) )
1341+ }
1342+
1343+ fn is_error ( & self ) -> bool {
1344+ matches ! ( self , MessageFromClient :: Error ( _) )
1345+ }
1346+
1347+ fn message_type ( & self ) -> MessageTypes {
1348+ match self {
1349+ MessageFromClient :: RequestFromClient ( _) => MessageTypes :: Request ,
1350+ MessageFromClient :: ResultFromClient ( _) => MessageTypes :: Response ,
1351+ MessageFromClient :: NotificationFromClient ( _) => MessageTypes :: Notification ,
1352+ MessageFromClient :: Error ( _) => MessageTypes :: Error ,
1353+ }
1354+ }
1355+ }
1356+
13301357impl FromMessage < MessageFromClient > for ClientMessage {
13311358 fn from_message (
13321359 message : MessageFromClient ,
You can’t perform that action at this time.
0 commit comments