File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -2378,6 +2378,20 @@ pub struct Root {
23782378 pub name : Option < String > ,
23792379}
23802380
2381+ impl Root {
2382+ pub fn new ( uri : impl Into < String > ) -> Self {
2383+ Self {
2384+ uri : uri. into ( ) ,
2385+ name : None ,
2386+ }
2387+ }
2388+
2389+ pub fn with_name ( mut self , name : impl Into < String > ) -> Self {
2390+ self . name = Some ( name. into ( ) ) ;
2391+ self
2392+ }
2393+ }
2394+
23812395const_string ! ( ListRootsRequestMethod = "roots/list" ) ;
23822396pub type ListRootsRequest = RequestNoParam < ListRootsRequestMethod > ;
23832397
@@ -2389,6 +2403,12 @@ pub struct ListRootsResult {
23892403 pub roots : Vec < Root > ,
23902404}
23912405
2406+ impl ListRootsResult {
2407+ pub fn new ( roots : Vec < Root > ) -> Self {
2408+ Self { roots }
2409+ }
2410+ }
2411+
23922412const_string ! ( RootsListChangedNotificationMethod = "notifications/roots/list_changed" ) ;
23932413pub type RootsListChangedNotification = NotificationNoParam < RootsListChangedNotificationMethod > ;
23942414
You can’t perform that action at this time.
0 commit comments