Commit 1ce11c2 1 parent 359464d commit 1ce11c2 Copy full SHA for 1ce11c2
File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -443,6 +443,12 @@ where
443
443
root. init_as ( )
444
444
}
445
445
446
+ /// Initializes the root as a value of the given list type, with the given length.
447
+ pub fn initn_root < ' a , T : FromPointerBuilder < ' a > > ( & ' a mut self , length : u32 ) -> T {
448
+ let root = self . get_root_internal ( ) ;
449
+ root. initn_as ( length)
450
+ }
451
+
446
452
/// Gets the root, interpreting it as the given type.
447
453
pub fn get_root < ' a , T : FromPointerBuilder < ' a > > ( & ' a mut self ) -> Result < T > {
448
454
let root = self . get_root_internal ( ) ;
@@ -566,6 +572,10 @@ where
566
572
self . message . init_root ( )
567
573
}
568
574
575
+ pub fn initn_root ( & mut self , length : u32 ) -> T :: Builder < ' _ > {
576
+ self . message . initn_root ( length)
577
+ }
578
+
569
579
pub fn get_root ( & mut self ) -> Result < T :: Builder < ' _ > > {
570
580
self . message . get_root ( )
571
581
}
You can’t perform that action at this time.
0 commit comments