@@ -2278,6 +2278,7 @@ impl<'a> StyleSheet<'a> {
22782278 pub const VT_KEYFRAMES : flatbuffers:: VOffsetT = 6 ;
22792279 pub const VT_MEDIAS : flatbuffers:: VOffsetT = 8 ;
22802280 pub const VT_STYLES : flatbuffers:: VOffsetT = 10 ;
2281+ pub const VT_DESIGN_WIDTH : flatbuffers:: VOffsetT = 12 ;
22812282
22822283 #[ inline]
22832284 pub unsafe fn init_from_table ( table : flatbuffers:: Table < ' a > ) -> Self {
@@ -2293,6 +2294,7 @@ impl<'a> StyleSheet<'a> {
22932294 if let Some ( x) = args. medias { builder. add_medias ( x) ; }
22942295 if let Some ( x) = args. keyframes { builder. add_keyframes ( x) ; }
22952296 if let Some ( x) = args. fonts { builder. add_fonts ( x) ; }
2297+ builder. add_design_width ( args. design_width ) ;
22962298 builder. finish ( )
22972299 }
22982300
@@ -2325,6 +2327,13 @@ impl<'a> StyleSheet<'a> {
23252327 // which contains a valid value in this slot
23262328 unsafe { self . _tab . get :: < flatbuffers:: ForwardsUOffset < flatbuffers:: Vector < ' a , flatbuffers:: ForwardsUOffset < Style > > > > ( StyleSheet :: VT_STYLES , None ) }
23272329 }
2330+ #[ inline]
2331+ pub fn design_width ( & self ) -> u16 {
2332+ // Safety:
2333+ // Created from valid Table for this object
2334+ // which contains a valid value in this slot
2335+ unsafe { self . _tab . get :: < u16 > ( StyleSheet :: VT_DESIGN_WIDTH , Some ( 0 ) ) . unwrap ( ) }
2336+ }
23282337}
23292338
23302339impl flatbuffers:: Verifiable for StyleSheet < ' _ > {
@@ -2338,6 +2347,7 @@ impl flatbuffers::Verifiable for StyleSheet<'_> {
23382347 . visit_field :: < flatbuffers:: ForwardsUOffset < flatbuffers:: Vector < ' _ , flatbuffers:: ForwardsUOffset < & ' _ str > > > > ( "keyframes" , Self :: VT_KEYFRAMES , false ) ?
23392348 . visit_field :: < flatbuffers:: ForwardsUOffset < flatbuffers:: Vector < ' _ , flatbuffers:: ForwardsUOffset < & ' _ str > > > > ( "medias" , Self :: VT_MEDIAS , false ) ?
23402349 . visit_field :: < flatbuffers:: ForwardsUOffset < flatbuffers:: Vector < ' _ , flatbuffers:: ForwardsUOffset < Style > > > > ( "styles" , Self :: VT_STYLES , false ) ?
2350+ . visit_field :: < u16 > ( "design_width" , Self :: VT_DESIGN_WIDTH , false ) ?
23412351 . finish ( ) ;
23422352 Ok ( ( ) )
23432353 }
@@ -2347,6 +2357,7 @@ pub struct StyleSheetArgs<'a> {
23472357 pub keyframes : Option < flatbuffers:: WIPOffset < flatbuffers:: Vector < ' a , flatbuffers:: ForwardsUOffset < & ' a str > > > > ,
23482358 pub medias : Option < flatbuffers:: WIPOffset < flatbuffers:: Vector < ' a , flatbuffers:: ForwardsUOffset < & ' a str > > > > ,
23492359 pub styles : Option < flatbuffers:: WIPOffset < flatbuffers:: Vector < ' a , flatbuffers:: ForwardsUOffset < Style < ' a > > > > > ,
2360+ pub design_width : u16 ,
23502361}
23512362impl < ' a > Default for StyleSheetArgs < ' a > {
23522363 #[ inline]
@@ -2356,6 +2367,7 @@ impl<'a> Default for StyleSheetArgs<'a> {
23562367 keyframes : None ,
23572368 medias : None ,
23582369 styles : None ,
2370+ design_width : 0 ,
23592371 }
23602372 }
23612373}
@@ -2382,6 +2394,10 @@ impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> StyleSheetBuilder<'a, 'b, A> {
23822394 self . fbb_ . push_slot_always :: < flatbuffers:: WIPOffset < _ > > ( StyleSheet :: VT_STYLES , styles) ;
23832395 }
23842396 #[ inline]
2397+ pub fn add_design_width ( & mut self , design_width : u16 ) {
2398+ self . fbb_ . push_slot :: < u16 > ( StyleSheet :: VT_DESIGN_WIDTH , design_width, 0 ) ;
2399+ }
2400+ #[ inline]
23852401 pub fn new ( _fbb : & ' b mut flatbuffers:: FlatBufferBuilder < ' a , A > ) -> StyleSheetBuilder < ' a , ' b , A > {
23862402 let start = _fbb. start_table ( ) ;
23872403 StyleSheetBuilder {
@@ -2403,6 +2419,7 @@ impl core::fmt::Debug for StyleSheet<'_> {
24032419 ds. field ( "keyframes" , & self . keyframes ( ) ) ;
24042420 ds. field ( "medias" , & self . medias ( ) ) ;
24052421 ds. field ( "styles" , & self . styles ( ) ) ;
2422+ ds. field ( "design_width" , & self . design_width ( ) ) ;
24062423 ds. finish ( )
24072424 }
24082425}
0 commit comments