@@ -1714,6 +1714,7 @@ impl<'a> DeclarationTuple<'a> {
1714
1714
pub const VT_PROPERTY_ID : flatbuffers:: VOffsetT = 4 ;
1715
1715
pub const VT_VALUE_TYPE : flatbuffers:: VOffsetT = 6 ;
1716
1716
pub const VT_VALUE : flatbuffers:: VOffsetT = 8 ;
1717
+ pub const VT_FLAG : flatbuffers:: VOffsetT = 10 ;
1717
1718
1718
1719
#[ inline]
1719
1720
pub unsafe fn init_from_table ( table : flatbuffers:: Table < ' a > ) -> Self {
@@ -1726,6 +1727,7 @@ impl<'a> DeclarationTuple<'a> {
1726
1727
) -> flatbuffers:: WIPOffset < DeclarationTuple < ' bldr > > {
1727
1728
let mut builder = DeclarationTupleBuilder :: new ( _fbb) ;
1728
1729
if let Some ( x) = args. value { builder. add_value ( x) ; }
1730
+ builder. add_flag ( args. flag ) ;
1729
1731
builder. add_value_type ( args. value_type ) ;
1730
1732
builder. add_property_id ( args. property_id ) ;
1731
1733
builder. finish ( )
@@ -1754,6 +1756,13 @@ impl<'a> DeclarationTuple<'a> {
1754
1756
unsafe { self . _tab . get :: < flatbuffers:: ForwardsUOffset < flatbuffers:: Table < ' a > > > ( DeclarationTuple :: VT_VALUE , None ) }
1755
1757
}
1756
1758
#[ inline]
1759
+ pub fn flag ( & self ) -> u8 {
1760
+ // Safety:
1761
+ // Created from valid Table for this object
1762
+ // which contains a valid value in this slot
1763
+ unsafe { self . _tab . get :: < u8 > ( DeclarationTuple :: VT_FLAG , Some ( 0 ) ) . unwrap ( ) }
1764
+ }
1765
+ #[ inline]
1757
1766
#[ allow( non_snake_case) ]
1758
1767
pub fn value_as_string ( & self ) -> Option < String < ' a > > {
1759
1768
if self . value_type ( ) == Value :: String {
@@ -1944,6 +1953,7 @@ impl flatbuffers::Verifiable for DeclarationTuple<'_> {
1944
1953
_ => Ok ( ( ) ) ,
1945
1954
}
1946
1955
} ) ?
1956
+ . visit_field :: < u8 > ( "flag" , Self :: VT_FLAG , false ) ?
1947
1957
. finish ( ) ;
1948
1958
Ok ( ( ) )
1949
1959
}
@@ -1952,6 +1962,7 @@ pub struct DeclarationTupleArgs {
1952
1962
pub property_id : u8 ,
1953
1963
pub value_type : Value ,
1954
1964
pub value : Option < flatbuffers:: WIPOffset < flatbuffers:: UnionWIPOffset > > ,
1965
+ pub flag : u8 ,
1955
1966
}
1956
1967
impl < ' a > Default for DeclarationTupleArgs {
1957
1968
#[ inline]
@@ -1960,6 +1971,7 @@ impl<'a> Default for DeclarationTupleArgs {
1960
1971
property_id : 0 ,
1961
1972
value_type : Value :: NONE ,
1962
1973
value : None ,
1974
+ flag : 0 ,
1963
1975
}
1964
1976
}
1965
1977
}
@@ -1982,6 +1994,10 @@ impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DeclarationTupleBuilder<'a, 'b,
1982
1994
self . fbb_ . push_slot_always :: < flatbuffers:: WIPOffset < _ > > ( DeclarationTuple :: VT_VALUE , value) ;
1983
1995
}
1984
1996
#[ inline]
1997
+ pub fn add_flag ( & mut self , flag : u8 ) {
1998
+ self . fbb_ . push_slot :: < u8 > ( DeclarationTuple :: VT_FLAG , flag, 0 ) ;
1999
+ }
2000
+ #[ inline]
1985
2001
pub fn new ( _fbb : & ' b mut flatbuffers:: FlatBufferBuilder < ' a , A > ) -> DeclarationTupleBuilder < ' a , ' b , A > {
1986
2002
let start = _fbb. start_table ( ) ;
1987
2003
DeclarationTupleBuilder {
@@ -2084,6 +2100,7 @@ impl core::fmt::Debug for DeclarationTuple<'_> {
2084
2100
ds. field ( "value" , & x)
2085
2101
} ,
2086
2102
} ;
2103
+ ds. field ( "flag" , & self . flag ( ) ) ;
2087
2104
ds. finish ( )
2088
2105
}
2089
2106
}
0 commit comments