File tree 4 files changed +56
-2
lines changed
4 files changed +56
-2
lines changed Original file line number Diff line number Diff line change 6
6
///
7
7
/// Generated from : <https://github.com/modelcontextprotocol/specification.git>
8
8
/// Hash : bb1446ff1810a0df57989d78366d626d2c01b9d7
9
- /// Generated at : 2025-03-02 12:29:03
9
+ /// Generated at : 2025-03-02 12:41:59
10
10
/// ----------------------------------------------------------------------------
11
11
///
12
12
/// MCP Protocol Version
Original file line number Diff line number Diff line change @@ -1327,6 +1327,33 @@ impl From<JsonrpcErrorError> for MessageFromClient {
1327
1327
}
1328
1328
}
1329
1329
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
+
1330
1357
impl FromMessage < MessageFromClient > for ClientMessage {
1331
1358
fn from_message (
1332
1359
message : MessageFromClient ,
Original file line number Diff line number Diff line change 6
6
///
7
7
/// Generated from : <https://github.com/modelcontextprotocol/specification.git>
8
8
/// Hash : bb1446ff1810a0df57989d78366d626d2c01b9d7
9
- /// Generated at : 2025-03-02 12:29:04
9
+ /// Generated at : 2025-03-02 12:41:59
10
10
/// ----------------------------------------------------------------------------
11
11
///
12
12
/// MCP Protocol Version
Original file line number Diff line number Diff line change @@ -1327,6 +1327,33 @@ impl From<JsonrpcErrorError> for MessageFromClient {
1327
1327
}
1328
1328
}
1329
1329
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
+
1330
1357
impl FromMessage < MessageFromClient > for ClientMessage {
1331
1358
fn from_message (
1332
1359
message : MessageFromClient ,
You can’t perform that action at this time.
0 commit comments