re_types_builder/
reflection.rs

1// automatically generated by the FlatBuffers compiler, do not modify
2
3// @generated
4
5use core::cmp::Ordering;
6use core::mem;
7
8extern crate flatbuffers;
9use self::flatbuffers::{EndianScalar, Follow};
10
11#[expect(unused_imports, dead_code)]
12pub mod reflection {
13
14    use core::cmp::Ordering;
15    use core::mem;
16
17    extern crate flatbuffers;
18    use self::flatbuffers::{EndianScalar, Follow};
19
20    #[deprecated(
21        since = "2.0.0",
22        note = "Use associated constants instead. This will no longer be generated in 2021."
23    )]
24    pub const ENUM_MIN_BASE_TYPE: i8 = 0;
25    #[deprecated(
26        since = "2.0.0",
27        note = "Use associated constants instead. This will no longer be generated in 2021."
28    )]
29    pub const ENUM_MAX_BASE_TYPE: i8 = 19;
30    #[deprecated(
31        since = "2.0.0",
32        note = "Use associated constants instead. This will no longer be generated in 2021."
33    )]
34    #[expect(non_camel_case_types)]
35    pub const ENUM_VALUES_BASE_TYPE: [BaseType; 20] = [
36        BaseType::None,
37        BaseType::UType,
38        BaseType::Bool,
39        BaseType::Byte,
40        BaseType::UByte,
41        BaseType::Short,
42        BaseType::UShort,
43        BaseType::Int,
44        BaseType::UInt,
45        BaseType::Long,
46        BaseType::ULong,
47        BaseType::Float,
48        BaseType::Double,
49        BaseType::String,
50        BaseType::Vector,
51        BaseType::Obj,
52        BaseType::Union,
53        BaseType::Array,
54        BaseType::Vector64,
55        BaseType::MaxBaseType,
56    ];
57
58    #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
59    #[repr(transparent)]
60    pub struct BaseType(pub i8);
61    #[expect(non_upper_case_globals)]
62    impl BaseType {
63        pub const None: Self = Self(0);
64        pub const UType: Self = Self(1);
65        pub const Bool: Self = Self(2);
66        pub const Byte: Self = Self(3);
67        pub const UByte: Self = Self(4);
68        pub const Short: Self = Self(5);
69        pub const UShort: Self = Self(6);
70        pub const Int: Self = Self(7);
71        pub const UInt: Self = Self(8);
72        pub const Long: Self = Self(9);
73        pub const ULong: Self = Self(10);
74        pub const Float: Self = Self(11);
75        pub const Double: Self = Self(12);
76        pub const String: Self = Self(13);
77        pub const Vector: Self = Self(14);
78        pub const Obj: Self = Self(15);
79        pub const Union: Self = Self(16);
80        pub const Array: Self = Self(17);
81        pub const Vector64: Self = Self(18);
82        pub const MaxBaseType: Self = Self(19);
83
84        pub const ENUM_MIN: i8 = 0;
85        pub const ENUM_MAX: i8 = 19;
86        pub const ENUM_VALUES: &'static [Self] = &[
87            Self::None,
88            Self::UType,
89            Self::Bool,
90            Self::Byte,
91            Self::UByte,
92            Self::Short,
93            Self::UShort,
94            Self::Int,
95            Self::UInt,
96            Self::Long,
97            Self::ULong,
98            Self::Float,
99            Self::Double,
100            Self::String,
101            Self::Vector,
102            Self::Obj,
103            Self::Union,
104            Self::Array,
105            Self::Vector64,
106            Self::MaxBaseType,
107        ];
108        /// Returns the variant's name or "" if unknown.
109        pub fn variant_name(self) -> Option<&'static str> {
110            match self {
111                Self::None => Some("None"),
112                Self::UType => Some("UType"),
113                Self::Bool => Some("Bool"),
114                Self::Byte => Some("Byte"),
115                Self::UByte => Some("UByte"),
116                Self::Short => Some("Short"),
117                Self::UShort => Some("UShort"),
118                Self::Int => Some("Int"),
119                Self::UInt => Some("UInt"),
120                Self::Long => Some("Long"),
121                Self::ULong => Some("ULong"),
122                Self::Float => Some("Float"),
123                Self::Double => Some("Double"),
124                Self::String => Some("String"),
125                Self::Vector => Some("Vector"),
126                Self::Obj => Some("Obj"),
127                Self::Union => Some("Union"),
128                Self::Array => Some("Array"),
129                Self::Vector64 => Some("Vector64"),
130                Self::MaxBaseType => Some("MaxBaseType"),
131                _ => None,
132            }
133        }
134    }
135    impl core::fmt::Debug for BaseType {
136        fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
137            if let Some(name) = self.variant_name() {
138                f.write_str(name)
139            } else {
140                f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
141            }
142        }
143    }
144    impl<'a> flatbuffers::Follow<'a> for BaseType {
145        type Inner = Self;
146        #[inline]
147        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
148            let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
149            Self(b)
150        }
151    }
152
153    impl flatbuffers::Push for BaseType {
154        type Output = BaseType;
155        #[inline]
156        unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
157            flatbuffers::emplace_scalar::<i8>(dst, self.0);
158        }
159    }
160
161    impl flatbuffers::EndianScalar for BaseType {
162        type Scalar = i8;
163        #[inline]
164        fn to_little_endian(self) -> i8 {
165            self.0.to_le()
166        }
167        #[inline]
168        #[expect(clippy::wrong_self_convention)]
169        fn from_little_endian(v: i8) -> Self {
170            let b = i8::from_le(v);
171            Self(b)
172        }
173    }
174
175    impl<'a> flatbuffers::Verifiable for BaseType {
176        #[inline]
177        fn run_verifier(
178            v: &mut flatbuffers::Verifier,
179            pos: usize,
180        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
181            use self::flatbuffers::Verifiable;
182            i8::run_verifier(v, pos)
183        }
184    }
185
186    impl flatbuffers::SimpleToVerifyInSlice for BaseType {}
187    #[expect(non_upper_case_globals)]
188    mod bitflags_advanced_features {
189        flatbuffers::bitflags::bitflags! {
190          /// New schema language features that are not supported by old code generators.
191          #[derive(Default, Debug, Eq, PartialEq, Copy, Clone)]
192          pub struct AdvancedFeatures: u64 {
193            const AdvancedArrayFeatures = 1;
194            const AdvancedUnionFeatures = 2;
195            const OptionalScalars = 4;
196            const DefaultVectorsAndStrings = 8;
197          }
198        }
199    }
200    pub use self::bitflags_advanced_features::AdvancedFeatures;
201
202    impl<'a> flatbuffers::Follow<'a> for AdvancedFeatures {
203        type Inner = Self;
204        #[inline]
205        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
206            let b = flatbuffers::read_scalar_at::<u64>(buf, loc);
207            Self::from_bits_retain(b)
208        }
209    }
210
211    impl flatbuffers::Push for AdvancedFeatures {
212        type Output = AdvancedFeatures;
213        #[inline]
214        unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
215            flatbuffers::emplace_scalar::<u64>(dst, self.bits());
216        }
217    }
218
219    impl flatbuffers::EndianScalar for AdvancedFeatures {
220        type Scalar = u64;
221        #[inline]
222        fn to_little_endian(self) -> u64 {
223            self.bits().to_le()
224        }
225        #[inline]
226        #[expect(clippy::wrong_self_convention)]
227        fn from_little_endian(v: u64) -> Self {
228            let b = u64::from_le(v);
229            unsafe { Self::from_bits_retain(b) }
230        }
231    }
232
233    impl<'a> flatbuffers::Verifiable for AdvancedFeatures {
234        #[inline]
235        fn run_verifier(
236            v: &mut flatbuffers::Verifier,
237            pos: usize,
238        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
239            use self::flatbuffers::Verifiable;
240            u64::run_verifier(v, pos)
241        }
242    }
243
244    impl flatbuffers::SimpleToVerifyInSlice for AdvancedFeatures {}
245    pub enum TypeOffset {}
246    #[derive(Copy, Clone, PartialEq)]
247
248    pub struct Type<'a> {
249        pub _tab: flatbuffers::Table<'a>,
250    }
251
252    impl<'a> flatbuffers::Follow<'a> for Type<'a> {
253        type Inner = Type<'a>;
254        #[inline]
255        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
256            Self {
257                _tab: flatbuffers::Table::new(buf, loc),
258            }
259        }
260    }
261
262    impl<'a> Type<'a> {
263        pub const VT_BASE_TYPE: flatbuffers::VOffsetT = 4;
264        pub const VT_ELEMENT: flatbuffers::VOffsetT = 6;
265        pub const VT_INDEX: flatbuffers::VOffsetT = 8;
266        pub const VT_FIXED_LENGTH: flatbuffers::VOffsetT = 10;
267        pub const VT_BASE_SIZE: flatbuffers::VOffsetT = 12;
268        pub const VT_ELEMENT_SIZE: flatbuffers::VOffsetT = 14;
269
270        #[inline]
271        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
272            Type { _tab: table }
273        }
274        #[expect(unused_mut)]
275        pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
276            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
277            args: &'args TypeArgs,
278        ) -> flatbuffers::WIPOffset<Type<'bldr>> {
279            let mut builder = TypeBuilder::new(_fbb);
280            builder.add_element_size(args.element_size);
281            builder.add_base_size(args.base_size);
282            builder.add_index(args.index);
283            builder.add_fixed_length(args.fixed_length);
284            builder.add_element(args.element);
285            builder.add_base_type(args.base_type);
286            builder.finish()
287        }
288
289        #[inline]
290        pub fn base_type(&self) -> BaseType {
291            // Safety:
292            // Created from valid Table for this object
293            // which contains a valid value in this slot
294            unsafe {
295                self._tab
296                    .get::<BaseType>(Type::VT_BASE_TYPE, Some(BaseType::None))
297                    .unwrap()
298            }
299        }
300        #[inline]
301        pub fn element(&self) -> BaseType {
302            // Safety:
303            // Created from valid Table for this object
304            // which contains a valid value in this slot
305            unsafe {
306                self._tab
307                    .get::<BaseType>(Type::VT_ELEMENT, Some(BaseType::None))
308                    .unwrap()
309            }
310        }
311        #[inline]
312        pub fn index(&self) -> i32 {
313            // Safety:
314            // Created from valid Table for this object
315            // which contains a valid value in this slot
316            unsafe { self._tab.get::<i32>(Type::VT_INDEX, Some(-1)).unwrap() }
317        }
318        #[inline]
319        pub fn fixed_length(&self) -> u16 {
320            // Safety:
321            // Created from valid Table for this object
322            // which contains a valid value in this slot
323            unsafe {
324                self._tab
325                    .get::<u16>(Type::VT_FIXED_LENGTH, Some(0))
326                    .unwrap()
327            }
328        }
329        /// The size (octets) of the `base_type` field.
330        #[inline]
331        pub fn base_size(&self) -> u32 {
332            // Safety:
333            // Created from valid Table for this object
334            // which contains a valid value in this slot
335            unsafe { self._tab.get::<u32>(Type::VT_BASE_SIZE, Some(4)).unwrap() }
336        }
337        /// The size (octets) of the `element` field, if present.
338        #[inline]
339        pub fn element_size(&self) -> u32 {
340            // Safety:
341            // Created from valid Table for this object
342            // which contains a valid value in this slot
343            unsafe {
344                self._tab
345                    .get::<u32>(Type::VT_ELEMENT_SIZE, Some(0))
346                    .unwrap()
347            }
348        }
349    }
350
351    impl flatbuffers::Verifiable for Type<'_> {
352        #[inline]
353        fn run_verifier(
354            v: &mut flatbuffers::Verifier,
355            pos: usize,
356        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
357            use self::flatbuffers::Verifiable;
358            v.visit_table(pos)?
359                .visit_field::<BaseType>("base_type", Self::VT_BASE_TYPE, false)?
360                .visit_field::<BaseType>("element", Self::VT_ELEMENT, false)?
361                .visit_field::<i32>("index", Self::VT_INDEX, false)?
362                .visit_field::<u16>("fixed_length", Self::VT_FIXED_LENGTH, false)?
363                .visit_field::<u32>("base_size", Self::VT_BASE_SIZE, false)?
364                .visit_field::<u32>("element_size", Self::VT_ELEMENT_SIZE, false)?
365                .finish();
366            Ok(())
367        }
368    }
369    pub struct TypeArgs {
370        pub base_type: BaseType,
371        pub element: BaseType,
372        pub index: i32,
373        pub fixed_length: u16,
374        pub base_size: u32,
375        pub element_size: u32,
376    }
377    impl<'a> Default for TypeArgs {
378        #[inline]
379        fn default() -> Self {
380            TypeArgs {
381                base_type: BaseType::None,
382                element: BaseType::None,
383                index: -1,
384                fixed_length: 0,
385                base_size: 4,
386                element_size: 0,
387            }
388        }
389    }
390
391    pub struct TypeBuilder<'a: 'b, 'b> {
392        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
393        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
394    }
395    impl<'a: 'b, 'b> TypeBuilder<'a, 'b> {
396        #[inline]
397        pub fn add_base_type(&mut self, base_type: BaseType) {
398            self.fbb_
399                .push_slot::<BaseType>(Type::VT_BASE_TYPE, base_type, BaseType::None);
400        }
401        #[inline]
402        pub fn add_element(&mut self, element: BaseType) {
403            self.fbb_
404                .push_slot::<BaseType>(Type::VT_ELEMENT, element, BaseType::None);
405        }
406        #[inline]
407        pub fn add_index(&mut self, index: i32) {
408            self.fbb_.push_slot::<i32>(Type::VT_INDEX, index, -1);
409        }
410        #[inline]
411        pub fn add_fixed_length(&mut self, fixed_length: u16) {
412            self.fbb_
413                .push_slot::<u16>(Type::VT_FIXED_LENGTH, fixed_length, 0);
414        }
415        #[inline]
416        pub fn add_base_size(&mut self, base_size: u32) {
417            self.fbb_.push_slot::<u32>(Type::VT_BASE_SIZE, base_size, 4);
418        }
419        #[inline]
420        pub fn add_element_size(&mut self, element_size: u32) {
421            self.fbb_
422                .push_slot::<u32>(Type::VT_ELEMENT_SIZE, element_size, 0);
423        }
424        #[inline]
425        pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TypeBuilder<'a, 'b> {
426            let start = _fbb.start_table();
427            TypeBuilder {
428                fbb_: _fbb,
429                start_: start,
430            }
431        }
432        #[inline]
433        pub fn finish(self) -> flatbuffers::WIPOffset<Type<'a>> {
434            let o = self.fbb_.end_table(self.start_);
435            flatbuffers::WIPOffset::new(o.value())
436        }
437    }
438
439    impl core::fmt::Debug for Type<'_> {
440        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
441            let mut ds = f.debug_struct("Type");
442            ds.field("base_type", &self.base_type());
443            ds.field("element", &self.element());
444            ds.field("index", &self.index());
445            ds.field("fixed_length", &self.fixed_length());
446            ds.field("base_size", &self.base_size());
447            ds.field("element_size", &self.element_size());
448            ds.finish()
449        }
450    }
451    pub enum KeyValueOffset {}
452    #[derive(Copy, Clone, PartialEq)]
453
454    pub struct KeyValue<'a> {
455        pub _tab: flatbuffers::Table<'a>,
456    }
457
458    impl<'a> flatbuffers::Follow<'a> for KeyValue<'a> {
459        type Inner = KeyValue<'a>;
460        #[inline]
461        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
462            Self {
463                _tab: flatbuffers::Table::new(buf, loc),
464            }
465        }
466    }
467
468    impl<'a> KeyValue<'a> {
469        pub const VT_KEY: flatbuffers::VOffsetT = 4;
470        pub const VT_VALUE: flatbuffers::VOffsetT = 6;
471
472        #[inline]
473        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
474            KeyValue { _tab: table }
475        }
476        #[expect(unused_mut)]
477        pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
478            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
479            args: &'args KeyValueArgs<'args>,
480        ) -> flatbuffers::WIPOffset<KeyValue<'bldr>> {
481            let mut builder = KeyValueBuilder::new(_fbb);
482            if let Some(x) = args.value {
483                builder.add_value(x);
484            }
485            if let Some(x) = args.key {
486                builder.add_key(x);
487            }
488            builder.finish()
489        }
490
491        #[inline]
492        pub fn key(&self) -> &'a str {
493            // Safety:
494            // Created from valid Table for this object
495            // which contains a valid value in this slot
496            unsafe {
497                self._tab
498                    .get::<flatbuffers::ForwardsUOffset<&str>>(KeyValue::VT_KEY, None)
499                    .unwrap()
500            }
501        }
502        #[inline]
503        pub fn key_compare_less_than(&self, o: &KeyValue) -> bool {
504            self.key() < o.key()
505        }
506
507        #[inline]
508        pub fn key_compare_with_value(&self, val: &str) -> ::core::cmp::Ordering {
509            let key = self.key();
510            key.cmp(val)
511        }
512        #[inline]
513        pub fn value(&self) -> Option<&'a str> {
514            // Safety:
515            // Created from valid Table for this object
516            // which contains a valid value in this slot
517            unsafe {
518                self._tab
519                    .get::<flatbuffers::ForwardsUOffset<&str>>(KeyValue::VT_VALUE, None)
520            }
521        }
522    }
523
524    impl flatbuffers::Verifiable for KeyValue<'_> {
525        #[inline]
526        fn run_verifier(
527            v: &mut flatbuffers::Verifier,
528            pos: usize,
529        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
530            use self::flatbuffers::Verifiable;
531            v.visit_table(pos)?
532                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("key", Self::VT_KEY, true)?
533                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("value", Self::VT_VALUE, false)?
534                .finish();
535            Ok(())
536        }
537    }
538    pub struct KeyValueArgs<'a> {
539        pub key: Option<flatbuffers::WIPOffset<&'a str>>,
540        pub value: Option<flatbuffers::WIPOffset<&'a str>>,
541    }
542    impl<'a> Default for KeyValueArgs<'a> {
543        #[inline]
544        fn default() -> Self {
545            KeyValueArgs {
546                key: None, // required field
547                value: None,
548            }
549        }
550    }
551
552    pub struct KeyValueBuilder<'a: 'b, 'b> {
553        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
554        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
555    }
556    impl<'a: 'b, 'b> KeyValueBuilder<'a, 'b> {
557        #[inline]
558        pub fn add_key(&mut self, key: flatbuffers::WIPOffset<&'b str>) {
559            self.fbb_
560                .push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_KEY, key);
561        }
562        #[inline]
563        pub fn add_value(&mut self, value: flatbuffers::WIPOffset<&'b str>) {
564            self.fbb_
565                .push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_VALUE, value);
566        }
567        #[inline]
568        pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> KeyValueBuilder<'a, 'b> {
569            let start = _fbb.start_table();
570            KeyValueBuilder {
571                fbb_: _fbb,
572                start_: start,
573            }
574        }
575        #[inline]
576        pub fn finish(self) -> flatbuffers::WIPOffset<KeyValue<'a>> {
577            let o = self.fbb_.end_table(self.start_);
578            self.fbb_.required(o, KeyValue::VT_KEY, "key");
579            flatbuffers::WIPOffset::new(o.value())
580        }
581    }
582
583    impl core::fmt::Debug for KeyValue<'_> {
584        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
585            let mut ds = f.debug_struct("KeyValue");
586            ds.field("key", &self.key());
587            ds.field("value", &self.value());
588            ds.finish()
589        }
590    }
591    pub enum EnumValOffset {}
592    #[derive(Copy, Clone, PartialEq)]
593
594    pub struct EnumVal<'a> {
595        pub _tab: flatbuffers::Table<'a>,
596    }
597
598    impl<'a> flatbuffers::Follow<'a> for EnumVal<'a> {
599        type Inner = EnumVal<'a>;
600        #[inline]
601        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
602            Self {
603                _tab: flatbuffers::Table::new(buf, loc),
604            }
605        }
606    }
607
608    impl<'a> EnumVal<'a> {
609        pub const VT_NAME: flatbuffers::VOffsetT = 4;
610        pub const VT_VALUE: flatbuffers::VOffsetT = 6;
611        pub const VT_UNION_TYPE: flatbuffers::VOffsetT = 10;
612        pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 12;
613        pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 14;
614
615        #[inline]
616        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
617            EnumVal { _tab: table }
618        }
619        #[expect(unused_mut)]
620        pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
621            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
622            args: &'args EnumValArgs<'args>,
623        ) -> flatbuffers::WIPOffset<EnumVal<'bldr>> {
624            let mut builder = EnumValBuilder::new(_fbb);
625            builder.add_value(args.value);
626            if let Some(x) = args.attributes {
627                builder.add_attributes(x);
628            }
629            if let Some(x) = args.documentation {
630                builder.add_documentation(x);
631            }
632            if let Some(x) = args.union_type {
633                builder.add_union_type(x);
634            }
635            if let Some(x) = args.name {
636                builder.add_name(x);
637            }
638            builder.finish()
639        }
640
641        #[inline]
642        pub fn name(&self) -> &'a str {
643            // Safety:
644            // Created from valid Table for this object
645            // which contains a valid value in this slot
646            unsafe {
647                self._tab
648                    .get::<flatbuffers::ForwardsUOffset<&str>>(EnumVal::VT_NAME, None)
649                    .unwrap()
650            }
651        }
652        #[inline]
653        pub fn value(&self) -> i64 {
654            // Safety:
655            // Created from valid Table for this object
656            // which contains a valid value in this slot
657            unsafe { self._tab.get::<i64>(EnumVal::VT_VALUE, Some(0)).unwrap() }
658        }
659        #[inline]
660        pub fn key_compare_less_than(&self, o: &EnumVal) -> bool {
661            self.value() < o.value()
662        }
663
664        #[inline]
665        pub fn key_compare_with_value(&self, val: i64) -> ::core::cmp::Ordering {
666            let key = self.value();
667            key.cmp(&val)
668        }
669        #[inline]
670        pub fn union_type(&self) -> Option<Type<'a>> {
671            // Safety:
672            // Created from valid Table for this object
673            // which contains a valid value in this slot
674            unsafe {
675                self._tab
676                    .get::<flatbuffers::ForwardsUOffset<Type>>(EnumVal::VT_UNION_TYPE, None)
677            }
678        }
679        #[inline]
680        pub fn documentation(
681            &self,
682        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
683            // Safety:
684            // Created from valid Table for this object
685            // which contains a valid value in this slot
686            unsafe {
687                self._tab.get::<flatbuffers::ForwardsUOffset<
688                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
689                >>(EnumVal::VT_DOCUMENTATION, None)
690            }
691        }
692        #[inline]
693        pub fn attributes(
694            &self,
695        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
696            // Safety:
697            // Created from valid Table for this object
698            // which contains a valid value in this slot
699            unsafe {
700                self._tab.get::<flatbuffers::ForwardsUOffset<
701                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
702                >>(EnumVal::VT_ATTRIBUTES, None)
703            }
704        }
705    }
706
707    impl flatbuffers::Verifiable for EnumVal<'_> {
708        #[inline]
709        fn run_verifier(
710            v: &mut flatbuffers::Verifier,
711            pos: usize,
712        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
713            use self::flatbuffers::Verifiable;
714            v.visit_table(pos)?
715                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
716                .visit_field::<i64>("value", Self::VT_VALUE, false)?
717                .visit_field::<flatbuffers::ForwardsUOffset<Type>>(
718                    "union_type",
719                    Self::VT_UNION_TYPE,
720                    false,
721                )?
722                .visit_field::<flatbuffers::ForwardsUOffset<
723                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>,
724                >>("documentation", Self::VT_DOCUMENTATION, false)?
725                .visit_field::<flatbuffers::ForwardsUOffset<
726                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>,
727                >>("attributes", Self::VT_ATTRIBUTES, false)?
728                .finish();
729            Ok(())
730        }
731    }
732    pub struct EnumValArgs<'a> {
733        pub name: Option<flatbuffers::WIPOffset<&'a str>>,
734        pub value: i64,
735        pub union_type: Option<flatbuffers::WIPOffset<Type<'a>>>,
736        pub documentation: Option<
737            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>,
738        >,
739        pub attributes: Option<
740            flatbuffers::WIPOffset<
741                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>,
742            >,
743        >,
744    }
745    impl<'a> Default for EnumValArgs<'a> {
746        #[inline]
747        fn default() -> Self {
748            EnumValArgs {
749                name: None, // required field
750                value: 0,
751                union_type: None,
752                documentation: None,
753                attributes: None,
754            }
755        }
756    }
757
758    pub struct EnumValBuilder<'a: 'b, 'b> {
759        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
760        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
761    }
762    impl<'a: 'b, 'b> EnumValBuilder<'a, 'b> {
763        #[inline]
764        pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
765            self.fbb_
766                .push_slot_always::<flatbuffers::WIPOffset<_>>(EnumVal::VT_NAME, name);
767        }
768        #[inline]
769        pub fn add_value(&mut self, value: i64) {
770            self.fbb_.push_slot::<i64>(EnumVal::VT_VALUE, value, 0);
771        }
772        #[inline]
773        pub fn add_union_type(&mut self, union_type: flatbuffers::WIPOffset<Type<'b>>) {
774            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Type>>(
775                EnumVal::VT_UNION_TYPE,
776                union_type,
777            );
778        }
779        #[inline]
780        pub fn add_documentation(
781            &mut self,
782            documentation: flatbuffers::WIPOffset<
783                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>,
784            >,
785        ) {
786            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
787                EnumVal::VT_DOCUMENTATION,
788                documentation,
789            );
790        }
791        #[inline]
792        pub fn add_attributes(
793            &mut self,
794            attributes: flatbuffers::WIPOffset<
795                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
796            >,
797        ) {
798            self.fbb_
799                .push_slot_always::<flatbuffers::WIPOffset<_>>(EnumVal::VT_ATTRIBUTES, attributes);
800        }
801        #[inline]
802        pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> EnumValBuilder<'a, 'b> {
803            let start = _fbb.start_table();
804            EnumValBuilder {
805                fbb_: _fbb,
806                start_: start,
807            }
808        }
809        #[inline]
810        pub fn finish(self) -> flatbuffers::WIPOffset<EnumVal<'a>> {
811            let o = self.fbb_.end_table(self.start_);
812            self.fbb_.required(o, EnumVal::VT_NAME, "name");
813            flatbuffers::WIPOffset::new(o.value())
814        }
815    }
816
817    impl core::fmt::Debug for EnumVal<'_> {
818        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
819            let mut ds = f.debug_struct("EnumVal");
820            ds.field("name", &self.name());
821            ds.field("value", &self.value());
822            ds.field("union_type", &self.union_type());
823            ds.field("documentation", &self.documentation());
824            ds.field("attributes", &self.attributes());
825            ds.finish()
826        }
827    }
828    pub enum EnumOffset {}
829    #[derive(Copy, Clone, PartialEq)]
830
831    pub struct Enum<'a> {
832        pub _tab: flatbuffers::Table<'a>,
833    }
834
835    impl<'a> flatbuffers::Follow<'a> for Enum<'a> {
836        type Inner = Enum<'a>;
837        #[inline]
838        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
839            Self {
840                _tab: flatbuffers::Table::new(buf, loc),
841            }
842        }
843    }
844
845    impl<'a> Enum<'a> {
846        pub const VT_NAME: flatbuffers::VOffsetT = 4;
847        pub const VT_VALUES: flatbuffers::VOffsetT = 6;
848        pub const VT_IS_UNION: flatbuffers::VOffsetT = 8;
849        pub const VT_UNDERLYING_TYPE: flatbuffers::VOffsetT = 10;
850        pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 12;
851        pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 14;
852        pub const VT_DECLARATION_FILE: flatbuffers::VOffsetT = 16;
853
854        #[inline]
855        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
856            Enum { _tab: table }
857        }
858        #[expect(unused_mut)]
859        pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
860            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
861            args: &'args EnumArgs<'args>,
862        ) -> flatbuffers::WIPOffset<Enum<'bldr>> {
863            let mut builder = EnumBuilder::new(_fbb);
864            if let Some(x) = args.declaration_file {
865                builder.add_declaration_file(x);
866            }
867            if let Some(x) = args.documentation {
868                builder.add_documentation(x);
869            }
870            if let Some(x) = args.attributes {
871                builder.add_attributes(x);
872            }
873            if let Some(x) = args.underlying_type {
874                builder.add_underlying_type(x);
875            }
876            if let Some(x) = args.values {
877                builder.add_values(x);
878            }
879            if let Some(x) = args.name {
880                builder.add_name(x);
881            }
882            builder.add_is_union(args.is_union);
883            builder.finish()
884        }
885
886        #[inline]
887        pub fn name(&self) -> &'a str {
888            // Safety:
889            // Created from valid Table for this object
890            // which contains a valid value in this slot
891            unsafe {
892                self._tab
893                    .get::<flatbuffers::ForwardsUOffset<&str>>(Enum::VT_NAME, None)
894                    .unwrap()
895            }
896        }
897        #[inline]
898        pub fn key_compare_less_than(&self, o: &Enum) -> bool {
899            self.name() < o.name()
900        }
901
902        #[inline]
903        pub fn key_compare_with_value(&self, val: &str) -> ::core::cmp::Ordering {
904            let key = self.name();
905            key.cmp(val)
906        }
907        #[inline]
908        pub fn values(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<EnumVal<'a>>> {
909            // Safety:
910            // Created from valid Table for this object
911            // which contains a valid value in this slot
912            unsafe {
913                self._tab
914                    .get::<flatbuffers::ForwardsUOffset<
915                        flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<EnumVal>>,
916                    >>(Enum::VT_VALUES, None)
917                    .unwrap()
918            }
919        }
920        #[inline]
921        pub fn is_union(&self) -> bool {
922            // Safety:
923            // Created from valid Table for this object
924            // which contains a valid value in this slot
925            unsafe {
926                self._tab
927                    .get::<bool>(Enum::VT_IS_UNION, Some(false))
928                    .unwrap()
929            }
930        }
931        #[inline]
932        pub fn underlying_type(&self) -> Type<'a> {
933            // Safety:
934            // Created from valid Table for this object
935            // which contains a valid value in this slot
936            unsafe {
937                self._tab
938                    .get::<flatbuffers::ForwardsUOffset<Type>>(Enum::VT_UNDERLYING_TYPE, None)
939                    .unwrap()
940            }
941        }
942        #[inline]
943        pub fn attributes(
944            &self,
945        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
946            // Safety:
947            // Created from valid Table for this object
948            // which contains a valid value in this slot
949            unsafe {
950                self._tab.get::<flatbuffers::ForwardsUOffset<
951                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
952                >>(Enum::VT_ATTRIBUTES, None)
953            }
954        }
955        #[inline]
956        pub fn documentation(
957            &self,
958        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
959            // Safety:
960            // Created from valid Table for this object
961            // which contains a valid value in this slot
962            unsafe {
963                self._tab.get::<flatbuffers::ForwardsUOffset<
964                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
965                >>(Enum::VT_DOCUMENTATION, None)
966            }
967        }
968        /// File that this Enum is declared in.
969        #[inline]
970        pub fn declaration_file(&self) -> Option<&'a str> {
971            // Safety:
972            // Created from valid Table for this object
973            // which contains a valid value in this slot
974            unsafe {
975                self._tab
976                    .get::<flatbuffers::ForwardsUOffset<&str>>(Enum::VT_DECLARATION_FILE, None)
977            }
978        }
979    }
980
981    impl flatbuffers::Verifiable for Enum<'_> {
982        #[inline]
983        fn run_verifier(
984            v: &mut flatbuffers::Verifier,
985            pos: usize,
986        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
987            use self::flatbuffers::Verifiable;
988            v.visit_table(pos)?
989                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
990                .visit_field::<flatbuffers::ForwardsUOffset<
991                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<EnumVal>>,
992                >>("values", Self::VT_VALUES, true)?
993                .visit_field::<bool>("is_union", Self::VT_IS_UNION, false)?
994                .visit_field::<flatbuffers::ForwardsUOffset<Type>>(
995                    "underlying_type",
996                    Self::VT_UNDERLYING_TYPE,
997                    true,
998                )?
999                .visit_field::<flatbuffers::ForwardsUOffset<
1000                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>,
1001                >>("attributes", Self::VT_ATTRIBUTES, false)?
1002                .visit_field::<flatbuffers::ForwardsUOffset<
1003                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>,
1004                >>("documentation", Self::VT_DOCUMENTATION, false)?
1005                .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
1006                    "declaration_file",
1007                    Self::VT_DECLARATION_FILE,
1008                    false,
1009                )?
1010                .finish();
1011            Ok(())
1012        }
1013    }
1014    pub struct EnumArgs<'a> {
1015        pub name: Option<flatbuffers::WIPOffset<&'a str>>,
1016        pub values: Option<
1017            flatbuffers::WIPOffset<
1018                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<EnumVal<'a>>>,
1019            >,
1020        >,
1021        pub is_union: bool,
1022        pub underlying_type: Option<flatbuffers::WIPOffset<Type<'a>>>,
1023        pub attributes: Option<
1024            flatbuffers::WIPOffset<
1025                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>,
1026            >,
1027        >,
1028        pub documentation: Option<
1029            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>,
1030        >,
1031        pub declaration_file: Option<flatbuffers::WIPOffset<&'a str>>,
1032    }
1033    impl<'a> Default for EnumArgs<'a> {
1034        #[inline]
1035        fn default() -> Self {
1036            EnumArgs {
1037                name: None,   // required field
1038                values: None, // required field
1039                is_union: false,
1040                underlying_type: None, // required field
1041                attributes: None,
1042                documentation: None,
1043                declaration_file: None,
1044            }
1045        }
1046    }
1047
1048    pub struct EnumBuilder<'a: 'b, 'b> {
1049        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
1050        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1051    }
1052    impl<'a: 'b, 'b> EnumBuilder<'a, 'b> {
1053        #[inline]
1054        pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
1055            self.fbb_
1056                .push_slot_always::<flatbuffers::WIPOffset<_>>(Enum::VT_NAME, name);
1057        }
1058        #[inline]
1059        pub fn add_values(
1060            &mut self,
1061            values: flatbuffers::WIPOffset<
1062                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<EnumVal<'b>>>,
1063            >,
1064        ) {
1065            self.fbb_
1066                .push_slot_always::<flatbuffers::WIPOffset<_>>(Enum::VT_VALUES, values);
1067        }
1068        #[inline]
1069        pub fn add_is_union(&mut self, is_union: bool) {
1070            self.fbb_
1071                .push_slot::<bool>(Enum::VT_IS_UNION, is_union, false);
1072        }
1073        #[inline]
1074        pub fn add_underlying_type(&mut self, underlying_type: flatbuffers::WIPOffset<Type<'b>>) {
1075            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Type>>(
1076                Enum::VT_UNDERLYING_TYPE,
1077                underlying_type,
1078            );
1079        }
1080        #[inline]
1081        pub fn add_attributes(
1082            &mut self,
1083            attributes: flatbuffers::WIPOffset<
1084                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
1085            >,
1086        ) {
1087            self.fbb_
1088                .push_slot_always::<flatbuffers::WIPOffset<_>>(Enum::VT_ATTRIBUTES, attributes);
1089        }
1090        #[inline]
1091        pub fn add_documentation(
1092            &mut self,
1093            documentation: flatbuffers::WIPOffset<
1094                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>,
1095            >,
1096        ) {
1097            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1098                Enum::VT_DOCUMENTATION,
1099                documentation,
1100            );
1101        }
1102        #[inline]
1103        pub fn add_declaration_file(&mut self, declaration_file: flatbuffers::WIPOffset<&'b str>) {
1104            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1105                Enum::VT_DECLARATION_FILE,
1106                declaration_file,
1107            );
1108        }
1109        #[inline]
1110        pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> EnumBuilder<'a, 'b> {
1111            let start = _fbb.start_table();
1112            EnumBuilder {
1113                fbb_: _fbb,
1114                start_: start,
1115            }
1116        }
1117        #[inline]
1118        pub fn finish(self) -> flatbuffers::WIPOffset<Enum<'a>> {
1119            let o = self.fbb_.end_table(self.start_);
1120            self.fbb_.required(o, Enum::VT_NAME, "name");
1121            self.fbb_.required(o, Enum::VT_VALUES, "values");
1122            self.fbb_
1123                .required(o, Enum::VT_UNDERLYING_TYPE, "underlying_type");
1124            flatbuffers::WIPOffset::new(o.value())
1125        }
1126    }
1127
1128    impl core::fmt::Debug for Enum<'_> {
1129        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1130            let mut ds = f.debug_struct("Enum");
1131            ds.field("name", &self.name());
1132            ds.field("values", &self.values());
1133            ds.field("is_union", &self.is_union());
1134            ds.field("underlying_type", &self.underlying_type());
1135            ds.field("attributes", &self.attributes());
1136            ds.field("documentation", &self.documentation());
1137            ds.field("declaration_file", &self.declaration_file());
1138            ds.finish()
1139        }
1140    }
1141    pub enum FieldOffset {}
1142    #[derive(Copy, Clone, PartialEq)]
1143
1144    pub struct Field<'a> {
1145        pub _tab: flatbuffers::Table<'a>,
1146    }
1147
1148    impl<'a> flatbuffers::Follow<'a> for Field<'a> {
1149        type Inner = Field<'a>;
1150        #[inline]
1151        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1152            Self {
1153                _tab: flatbuffers::Table::new(buf, loc),
1154            }
1155        }
1156    }
1157
1158    impl<'a> Field<'a> {
1159        pub const VT_NAME: flatbuffers::VOffsetT = 4;
1160        pub const VT_TYPE_: flatbuffers::VOffsetT = 6;
1161        pub const VT_ID: flatbuffers::VOffsetT = 8;
1162        pub const VT_OFFSET: flatbuffers::VOffsetT = 10;
1163        pub const VT_DEFAULT_INTEGER: flatbuffers::VOffsetT = 12;
1164        pub const VT_DEFAULT_REAL: flatbuffers::VOffsetT = 14;
1165        pub const VT_DEPRECATED: flatbuffers::VOffsetT = 16;
1166        pub const VT_REQUIRED: flatbuffers::VOffsetT = 18;
1167        pub const VT_KEY: flatbuffers::VOffsetT = 20;
1168        pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 22;
1169        pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 24;
1170        pub const VT_OPTIONAL: flatbuffers::VOffsetT = 26;
1171        pub const VT_PADDING: flatbuffers::VOffsetT = 28;
1172        pub const VT_OFFSET64: flatbuffers::VOffsetT = 30;
1173
1174        #[inline]
1175        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1176            Field { _tab: table }
1177        }
1178        #[expect(unused_mut)]
1179        pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
1180            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
1181            args: &'args FieldArgs<'args>,
1182        ) -> flatbuffers::WIPOffset<Field<'bldr>> {
1183            let mut builder = FieldBuilder::new(_fbb);
1184            builder.add_default_real(args.default_real);
1185            builder.add_default_integer(args.default_integer);
1186            if let Some(x) = args.documentation {
1187                builder.add_documentation(x);
1188            }
1189            if let Some(x) = args.attributes {
1190                builder.add_attributes(x);
1191            }
1192            if let Some(x) = args.type_ {
1193                builder.add_type_(x);
1194            }
1195            if let Some(x) = args.name {
1196                builder.add_name(x);
1197            }
1198            builder.add_padding(args.padding);
1199            builder.add_offset(args.offset);
1200            builder.add_id(args.id);
1201            builder.add_offset64(args.offset64);
1202            builder.add_optional(args.optional);
1203            builder.add_key(args.key);
1204            builder.add_required(args.required);
1205            builder.add_deprecated(args.deprecated);
1206            builder.finish()
1207        }
1208
1209        #[inline]
1210        pub fn name(&self) -> &'a str {
1211            // Safety:
1212            // Created from valid Table for this object
1213            // which contains a valid value in this slot
1214            unsafe {
1215                self._tab
1216                    .get::<flatbuffers::ForwardsUOffset<&str>>(Field::VT_NAME, None)
1217                    .unwrap()
1218            }
1219        }
1220        #[inline]
1221        pub fn key_compare_less_than(&self, o: &Field) -> bool {
1222            self.name() < o.name()
1223        }
1224
1225        #[inline]
1226        pub fn key_compare_with_value(&self, val: &str) -> ::core::cmp::Ordering {
1227            let key = self.name();
1228            key.cmp(val)
1229        }
1230        #[inline]
1231        pub fn type_(&self) -> Type<'a> {
1232            // Safety:
1233            // Created from valid Table for this object
1234            // which contains a valid value in this slot
1235            unsafe {
1236                self._tab
1237                    .get::<flatbuffers::ForwardsUOffset<Type>>(Field::VT_TYPE_, None)
1238                    .unwrap()
1239            }
1240        }
1241        #[inline]
1242        pub fn id(&self) -> u16 {
1243            // Safety:
1244            // Created from valid Table for this object
1245            // which contains a valid value in this slot
1246            unsafe { self._tab.get::<u16>(Field::VT_ID, Some(0)).unwrap() }
1247        }
1248        /// Offset into the vtable for tables, or into the struct.
1249        #[inline]
1250        pub fn offset(&self) -> u16 {
1251            // Safety:
1252            // Created from valid Table for this object
1253            // which contains a valid value in this slot
1254            unsafe { self._tab.get::<u16>(Field::VT_OFFSET, Some(0)).unwrap() }
1255        }
1256        #[inline]
1257        pub fn default_integer(&self) -> i64 {
1258            // Safety:
1259            // Created from valid Table for this object
1260            // which contains a valid value in this slot
1261            unsafe {
1262                self._tab
1263                    .get::<i64>(Field::VT_DEFAULT_INTEGER, Some(0))
1264                    .unwrap()
1265            }
1266        }
1267        #[inline]
1268        pub fn default_real(&self) -> f64 {
1269            // Safety:
1270            // Created from valid Table for this object
1271            // which contains a valid value in this slot
1272            unsafe {
1273                self._tab
1274                    .get::<f64>(Field::VT_DEFAULT_REAL, Some(0.0))
1275                    .unwrap()
1276            }
1277        }
1278        #[inline]
1279        pub fn deprecated(&self) -> bool {
1280            // Safety:
1281            // Created from valid Table for this object
1282            // which contains a valid value in this slot
1283            unsafe {
1284                self._tab
1285                    .get::<bool>(Field::VT_DEPRECATED, Some(false))
1286                    .unwrap()
1287            }
1288        }
1289        #[inline]
1290        pub fn required(&self) -> bool {
1291            // Safety:
1292            // Created from valid Table for this object
1293            // which contains a valid value in this slot
1294            unsafe {
1295                self._tab
1296                    .get::<bool>(Field::VT_REQUIRED, Some(false))
1297                    .unwrap()
1298            }
1299        }
1300        #[inline]
1301        pub fn key(&self) -> bool {
1302            // Safety:
1303            // Created from valid Table for this object
1304            // which contains a valid value in this slot
1305            unsafe { self._tab.get::<bool>(Field::VT_KEY, Some(false)).unwrap() }
1306        }
1307        #[inline]
1308        pub fn attributes(
1309            &self,
1310        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
1311            // Safety:
1312            // Created from valid Table for this object
1313            // which contains a valid value in this slot
1314            unsafe {
1315                self._tab.get::<flatbuffers::ForwardsUOffset<
1316                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
1317                >>(Field::VT_ATTRIBUTES, None)
1318            }
1319        }
1320        #[inline]
1321        pub fn documentation(
1322            &self,
1323        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
1324            // Safety:
1325            // Created from valid Table for this object
1326            // which contains a valid value in this slot
1327            unsafe {
1328                self._tab.get::<flatbuffers::ForwardsUOffset<
1329                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
1330                >>(Field::VT_DOCUMENTATION, None)
1331            }
1332        }
1333        #[inline]
1334        pub fn optional(&self) -> bool {
1335            // Safety:
1336            // Created from valid Table for this object
1337            // which contains a valid value in this slot
1338            unsafe {
1339                self._tab
1340                    .get::<bool>(Field::VT_OPTIONAL, Some(false))
1341                    .unwrap()
1342            }
1343        }
1344        /// Number of padding octets to always add after this field. Structs only.
1345        #[inline]
1346        pub fn padding(&self) -> u16 {
1347            // Safety:
1348            // Created from valid Table for this object
1349            // which contains a valid value in this slot
1350            unsafe { self._tab.get::<u16>(Field::VT_PADDING, Some(0)).unwrap() }
1351        }
1352        /// If the field uses 64-bit offsets.
1353        #[inline]
1354        pub fn offset64(&self) -> bool {
1355            // Safety:
1356            // Created from valid Table for this object
1357            // which contains a valid value in this slot
1358            unsafe {
1359                self._tab
1360                    .get::<bool>(Field::VT_OFFSET64, Some(false))
1361                    .unwrap()
1362            }
1363        }
1364    }
1365
1366    impl flatbuffers::Verifiable for Field<'_> {
1367        #[inline]
1368        fn run_verifier(
1369            v: &mut flatbuffers::Verifier,
1370            pos: usize,
1371        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1372            use self::flatbuffers::Verifiable;
1373            v.visit_table(pos)?
1374                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
1375                .visit_field::<flatbuffers::ForwardsUOffset<Type>>("type_", Self::VT_TYPE_, true)?
1376                .visit_field::<u16>("id", Self::VT_ID, false)?
1377                .visit_field::<u16>("offset", Self::VT_OFFSET, false)?
1378                .visit_field::<i64>("default_integer", Self::VT_DEFAULT_INTEGER, false)?
1379                .visit_field::<f64>("default_real", Self::VT_DEFAULT_REAL, false)?
1380                .visit_field::<bool>("deprecated", Self::VT_DEPRECATED, false)?
1381                .visit_field::<bool>("required", Self::VT_REQUIRED, false)?
1382                .visit_field::<bool>("key", Self::VT_KEY, false)?
1383                .visit_field::<flatbuffers::ForwardsUOffset<
1384                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>,
1385                >>("attributes", Self::VT_ATTRIBUTES, false)?
1386                .visit_field::<flatbuffers::ForwardsUOffset<
1387                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>,
1388                >>("documentation", Self::VT_DOCUMENTATION, false)?
1389                .visit_field::<bool>("optional", Self::VT_OPTIONAL, false)?
1390                .visit_field::<u16>("padding", Self::VT_PADDING, false)?
1391                .visit_field::<bool>("offset64", Self::VT_OFFSET64, false)?
1392                .finish();
1393            Ok(())
1394        }
1395    }
1396    pub struct FieldArgs<'a> {
1397        pub name: Option<flatbuffers::WIPOffset<&'a str>>,
1398        pub type_: Option<flatbuffers::WIPOffset<Type<'a>>>,
1399        pub id: u16,
1400        pub offset: u16,
1401        pub default_integer: i64,
1402        pub default_real: f64,
1403        pub deprecated: bool,
1404        pub required: bool,
1405        pub key: bool,
1406        pub attributes: Option<
1407            flatbuffers::WIPOffset<
1408                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>,
1409            >,
1410        >,
1411        pub documentation: Option<
1412            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>,
1413        >,
1414        pub optional: bool,
1415        pub padding: u16,
1416        pub offset64: bool,
1417    }
1418    impl<'a> Default for FieldArgs<'a> {
1419        #[inline]
1420        fn default() -> Self {
1421            FieldArgs {
1422                name: None,  // required field
1423                type_: None, // required field
1424                id: 0,
1425                offset: 0,
1426                default_integer: 0,
1427                default_real: 0.0,
1428                deprecated: false,
1429                required: false,
1430                key: false,
1431                attributes: None,
1432                documentation: None,
1433                optional: false,
1434                padding: 0,
1435                offset64: false,
1436            }
1437        }
1438    }
1439
1440    pub struct FieldBuilder<'a: 'b, 'b> {
1441        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
1442        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1443    }
1444    impl<'a: 'b, 'b> FieldBuilder<'a, 'b> {
1445        #[inline]
1446        pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
1447            self.fbb_
1448                .push_slot_always::<flatbuffers::WIPOffset<_>>(Field::VT_NAME, name);
1449        }
1450        #[inline]
1451        pub fn add_type_(&mut self, type_: flatbuffers::WIPOffset<Type<'b>>) {
1452            self.fbb_
1453                .push_slot_always::<flatbuffers::WIPOffset<Type>>(Field::VT_TYPE_, type_);
1454        }
1455        #[inline]
1456        pub fn add_id(&mut self, id: u16) {
1457            self.fbb_.push_slot::<u16>(Field::VT_ID, id, 0);
1458        }
1459        #[inline]
1460        pub fn add_offset(&mut self, offset: u16) {
1461            self.fbb_.push_slot::<u16>(Field::VT_OFFSET, offset, 0);
1462        }
1463        #[inline]
1464        pub fn add_default_integer(&mut self, default_integer: i64) {
1465            self.fbb_
1466                .push_slot::<i64>(Field::VT_DEFAULT_INTEGER, default_integer, 0);
1467        }
1468        #[inline]
1469        pub fn add_default_real(&mut self, default_real: f64) {
1470            self.fbb_
1471                .push_slot::<f64>(Field::VT_DEFAULT_REAL, default_real, 0.0);
1472        }
1473        #[inline]
1474        pub fn add_deprecated(&mut self, deprecated: bool) {
1475            self.fbb_
1476                .push_slot::<bool>(Field::VT_DEPRECATED, deprecated, false);
1477        }
1478        #[inline]
1479        pub fn add_required(&mut self, required: bool) {
1480            self.fbb_
1481                .push_slot::<bool>(Field::VT_REQUIRED, required, false);
1482        }
1483        #[inline]
1484        pub fn add_key(&mut self, key: bool) {
1485            self.fbb_.push_slot::<bool>(Field::VT_KEY, key, false);
1486        }
1487        #[inline]
1488        pub fn add_attributes(
1489            &mut self,
1490            attributes: flatbuffers::WIPOffset<
1491                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
1492            >,
1493        ) {
1494            self.fbb_
1495                .push_slot_always::<flatbuffers::WIPOffset<_>>(Field::VT_ATTRIBUTES, attributes);
1496        }
1497        #[inline]
1498        pub fn add_documentation(
1499            &mut self,
1500            documentation: flatbuffers::WIPOffset<
1501                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>,
1502            >,
1503        ) {
1504            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1505                Field::VT_DOCUMENTATION,
1506                documentation,
1507            );
1508        }
1509        #[inline]
1510        pub fn add_optional(&mut self, optional: bool) {
1511            self.fbb_
1512                .push_slot::<bool>(Field::VT_OPTIONAL, optional, false);
1513        }
1514        #[inline]
1515        pub fn add_padding(&mut self, padding: u16) {
1516            self.fbb_.push_slot::<u16>(Field::VT_PADDING, padding, 0);
1517        }
1518        #[inline]
1519        pub fn add_offset64(&mut self, offset64: bool) {
1520            self.fbb_
1521                .push_slot::<bool>(Field::VT_OFFSET64, offset64, false);
1522        }
1523        #[inline]
1524        pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FieldBuilder<'a, 'b> {
1525            let start = _fbb.start_table();
1526            FieldBuilder {
1527                fbb_: _fbb,
1528                start_: start,
1529            }
1530        }
1531        #[inline]
1532        pub fn finish(self) -> flatbuffers::WIPOffset<Field<'a>> {
1533            let o = self.fbb_.end_table(self.start_);
1534            self.fbb_.required(o, Field::VT_NAME, "name");
1535            self.fbb_.required(o, Field::VT_TYPE_, "type_");
1536            flatbuffers::WIPOffset::new(o.value())
1537        }
1538    }
1539
1540    impl core::fmt::Debug for Field<'_> {
1541        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1542            let mut ds = f.debug_struct("Field");
1543            ds.field("name", &self.name());
1544            ds.field("type_", &self.type_());
1545            ds.field("id", &self.id());
1546            ds.field("offset", &self.offset());
1547            ds.field("default_integer", &self.default_integer());
1548            ds.field("default_real", &self.default_real());
1549            ds.field("deprecated", &self.deprecated());
1550            ds.field("required", &self.required());
1551            ds.field("key", &self.key());
1552            ds.field("attributes", &self.attributes());
1553            ds.field("documentation", &self.documentation());
1554            ds.field("optional", &self.optional());
1555            ds.field("padding", &self.padding());
1556            ds.field("offset64", &self.offset64());
1557            ds.finish()
1558        }
1559    }
1560    pub enum ObjectOffset {}
1561    #[derive(Copy, Clone, PartialEq)]
1562
1563    pub struct Object<'a> {
1564        pub _tab: flatbuffers::Table<'a>,
1565    }
1566
1567    impl<'a> flatbuffers::Follow<'a> for Object<'a> {
1568        type Inner = Object<'a>;
1569        #[inline]
1570        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1571            Self {
1572                _tab: flatbuffers::Table::new(buf, loc),
1573            }
1574        }
1575    }
1576
1577    impl<'a> Object<'a> {
1578        pub const VT_NAME: flatbuffers::VOffsetT = 4;
1579        pub const VT_FIELDS: flatbuffers::VOffsetT = 6;
1580        pub const VT_IS_STRUCT: flatbuffers::VOffsetT = 8;
1581        pub const VT_MINALIGN: flatbuffers::VOffsetT = 10;
1582        pub const VT_BYTESIZE: flatbuffers::VOffsetT = 12;
1583        pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 14;
1584        pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 16;
1585        pub const VT_DECLARATION_FILE: flatbuffers::VOffsetT = 18;
1586
1587        #[inline]
1588        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1589            Object { _tab: table }
1590        }
1591        #[expect(unused_mut)]
1592        pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
1593            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
1594            args: &'args ObjectArgs<'args>,
1595        ) -> flatbuffers::WIPOffset<Object<'bldr>> {
1596            let mut builder = ObjectBuilder::new(_fbb);
1597            if let Some(x) = args.declaration_file {
1598                builder.add_declaration_file(x);
1599            }
1600            if let Some(x) = args.documentation {
1601                builder.add_documentation(x);
1602            }
1603            if let Some(x) = args.attributes {
1604                builder.add_attributes(x);
1605            }
1606            builder.add_bytesize(args.bytesize);
1607            builder.add_minalign(args.minalign);
1608            if let Some(x) = args.fields {
1609                builder.add_fields(x);
1610            }
1611            if let Some(x) = args.name {
1612                builder.add_name(x);
1613            }
1614            builder.add_is_struct(args.is_struct);
1615            builder.finish()
1616        }
1617
1618        #[inline]
1619        pub fn name(&self) -> &'a str {
1620            // Safety:
1621            // Created from valid Table for this object
1622            // which contains a valid value in this slot
1623            unsafe {
1624                self._tab
1625                    .get::<flatbuffers::ForwardsUOffset<&str>>(Object::VT_NAME, None)
1626                    .unwrap()
1627            }
1628        }
1629        #[inline]
1630        pub fn key_compare_less_than(&self, o: &Object) -> bool {
1631            self.name() < o.name()
1632        }
1633
1634        #[inline]
1635        pub fn key_compare_with_value(&self, val: &str) -> ::core::cmp::Ordering {
1636            let key = self.name();
1637            key.cmp(val)
1638        }
1639        #[inline]
1640        pub fn fields(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field<'a>>> {
1641            // Safety:
1642            // Created from valid Table for this object
1643            // which contains a valid value in this slot
1644            unsafe {
1645                self._tab
1646                    .get::<flatbuffers::ForwardsUOffset<
1647                        flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field>>,
1648                    >>(Object::VT_FIELDS, None)
1649                    .unwrap()
1650            }
1651        }
1652        #[inline]
1653        pub fn is_struct(&self) -> bool {
1654            // Safety:
1655            // Created from valid Table for this object
1656            // which contains a valid value in this slot
1657            unsafe {
1658                self._tab
1659                    .get::<bool>(Object::VT_IS_STRUCT, Some(false))
1660                    .unwrap()
1661            }
1662        }
1663        #[inline]
1664        pub fn minalign(&self) -> i32 {
1665            // Safety:
1666            // Created from valid Table for this object
1667            // which contains a valid value in this slot
1668            unsafe { self._tab.get::<i32>(Object::VT_MINALIGN, Some(0)).unwrap() }
1669        }
1670        #[inline]
1671        pub fn bytesize(&self) -> i32 {
1672            // Safety:
1673            // Created from valid Table for this object
1674            // which contains a valid value in this slot
1675            unsafe { self._tab.get::<i32>(Object::VT_BYTESIZE, Some(0)).unwrap() }
1676        }
1677        #[inline]
1678        pub fn attributes(
1679            &self,
1680        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
1681            // Safety:
1682            // Created from valid Table for this object
1683            // which contains a valid value in this slot
1684            unsafe {
1685                self._tab.get::<flatbuffers::ForwardsUOffset<
1686                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
1687                >>(Object::VT_ATTRIBUTES, None)
1688            }
1689        }
1690        #[inline]
1691        pub fn documentation(
1692            &self,
1693        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
1694            // Safety:
1695            // Created from valid Table for this object
1696            // which contains a valid value in this slot
1697            unsafe {
1698                self._tab.get::<flatbuffers::ForwardsUOffset<
1699                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
1700                >>(Object::VT_DOCUMENTATION, None)
1701            }
1702        }
1703        /// File that this Object is declared in.
1704        #[inline]
1705        pub fn declaration_file(&self) -> Option<&'a str> {
1706            // Safety:
1707            // Created from valid Table for this object
1708            // which contains a valid value in this slot
1709            unsafe {
1710                self._tab
1711                    .get::<flatbuffers::ForwardsUOffset<&str>>(Object::VT_DECLARATION_FILE, None)
1712            }
1713        }
1714    }
1715
1716    impl flatbuffers::Verifiable for Object<'_> {
1717        #[inline]
1718        fn run_verifier(
1719            v: &mut flatbuffers::Verifier,
1720            pos: usize,
1721        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1722            use self::flatbuffers::Verifiable;
1723            v.visit_table(pos)?
1724                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
1725                .visit_field::<flatbuffers::ForwardsUOffset<
1726                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Field>>,
1727                >>("fields", Self::VT_FIELDS, true)?
1728                .visit_field::<bool>("is_struct", Self::VT_IS_STRUCT, false)?
1729                .visit_field::<i32>("minalign", Self::VT_MINALIGN, false)?
1730                .visit_field::<i32>("bytesize", Self::VT_BYTESIZE, false)?
1731                .visit_field::<flatbuffers::ForwardsUOffset<
1732                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>,
1733                >>("attributes", Self::VT_ATTRIBUTES, false)?
1734                .visit_field::<flatbuffers::ForwardsUOffset<
1735                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>,
1736                >>("documentation", Self::VT_DOCUMENTATION, false)?
1737                .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
1738                    "declaration_file",
1739                    Self::VT_DECLARATION_FILE,
1740                    false,
1741                )?
1742                .finish();
1743            Ok(())
1744        }
1745    }
1746    pub struct ObjectArgs<'a> {
1747        pub name: Option<flatbuffers::WIPOffset<&'a str>>,
1748        pub fields: Option<
1749            flatbuffers::WIPOffset<
1750                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field<'a>>>,
1751            >,
1752        >,
1753        pub is_struct: bool,
1754        pub minalign: i32,
1755        pub bytesize: i32,
1756        pub attributes: Option<
1757            flatbuffers::WIPOffset<
1758                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>,
1759            >,
1760        >,
1761        pub documentation: Option<
1762            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>,
1763        >,
1764        pub declaration_file: Option<flatbuffers::WIPOffset<&'a str>>,
1765    }
1766    impl<'a> Default for ObjectArgs<'a> {
1767        #[inline]
1768        fn default() -> Self {
1769            ObjectArgs {
1770                name: None,   // required field
1771                fields: None, // required field
1772                is_struct: false,
1773                minalign: 0,
1774                bytesize: 0,
1775                attributes: None,
1776                documentation: None,
1777                declaration_file: None,
1778            }
1779        }
1780    }
1781
1782    pub struct ObjectBuilder<'a: 'b, 'b> {
1783        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
1784        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1785    }
1786    impl<'a: 'b, 'b> ObjectBuilder<'a, 'b> {
1787        #[inline]
1788        pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
1789            self.fbb_
1790                .push_slot_always::<flatbuffers::WIPOffset<_>>(Object::VT_NAME, name);
1791        }
1792        #[inline]
1793        pub fn add_fields(
1794            &mut self,
1795            fields: flatbuffers::WIPOffset<
1796                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Field<'b>>>,
1797            >,
1798        ) {
1799            self.fbb_
1800                .push_slot_always::<flatbuffers::WIPOffset<_>>(Object::VT_FIELDS, fields);
1801        }
1802        #[inline]
1803        pub fn add_is_struct(&mut self, is_struct: bool) {
1804            self.fbb_
1805                .push_slot::<bool>(Object::VT_IS_STRUCT, is_struct, false);
1806        }
1807        #[inline]
1808        pub fn add_minalign(&mut self, minalign: i32) {
1809            self.fbb_.push_slot::<i32>(Object::VT_MINALIGN, minalign, 0);
1810        }
1811        #[inline]
1812        pub fn add_bytesize(&mut self, bytesize: i32) {
1813            self.fbb_.push_slot::<i32>(Object::VT_BYTESIZE, bytesize, 0);
1814        }
1815        #[inline]
1816        pub fn add_attributes(
1817            &mut self,
1818            attributes: flatbuffers::WIPOffset<
1819                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
1820            >,
1821        ) {
1822            self.fbb_
1823                .push_slot_always::<flatbuffers::WIPOffset<_>>(Object::VT_ATTRIBUTES, attributes);
1824        }
1825        #[inline]
1826        pub fn add_documentation(
1827            &mut self,
1828            documentation: flatbuffers::WIPOffset<
1829                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>,
1830            >,
1831        ) {
1832            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1833                Object::VT_DOCUMENTATION,
1834                documentation,
1835            );
1836        }
1837        #[inline]
1838        pub fn add_declaration_file(&mut self, declaration_file: flatbuffers::WIPOffset<&'b str>) {
1839            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1840                Object::VT_DECLARATION_FILE,
1841                declaration_file,
1842            );
1843        }
1844        #[inline]
1845        pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ObjectBuilder<'a, 'b> {
1846            let start = _fbb.start_table();
1847            ObjectBuilder {
1848                fbb_: _fbb,
1849                start_: start,
1850            }
1851        }
1852        #[inline]
1853        pub fn finish(self) -> flatbuffers::WIPOffset<Object<'a>> {
1854            let o = self.fbb_.end_table(self.start_);
1855            self.fbb_.required(o, Object::VT_NAME, "name");
1856            self.fbb_.required(o, Object::VT_FIELDS, "fields");
1857            flatbuffers::WIPOffset::new(o.value())
1858        }
1859    }
1860
1861    impl core::fmt::Debug for Object<'_> {
1862        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1863            let mut ds = f.debug_struct("Object");
1864            ds.field("name", &self.name());
1865            ds.field("fields", &self.fields());
1866            ds.field("is_struct", &self.is_struct());
1867            ds.field("minalign", &self.minalign());
1868            ds.field("bytesize", &self.bytesize());
1869            ds.field("attributes", &self.attributes());
1870            ds.field("documentation", &self.documentation());
1871            ds.field("declaration_file", &self.declaration_file());
1872            ds.finish()
1873        }
1874    }
1875    pub enum RPCCallOffset {}
1876    #[derive(Copy, Clone, PartialEq)]
1877
1878    pub struct RPCCall<'a> {
1879        pub _tab: flatbuffers::Table<'a>,
1880    }
1881
1882    impl<'a> flatbuffers::Follow<'a> for RPCCall<'a> {
1883        type Inner = RPCCall<'a>;
1884        #[inline]
1885        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1886            Self {
1887                _tab: flatbuffers::Table::new(buf, loc),
1888            }
1889        }
1890    }
1891
1892    impl<'a> RPCCall<'a> {
1893        pub const VT_NAME: flatbuffers::VOffsetT = 4;
1894        pub const VT_REQUEST: flatbuffers::VOffsetT = 6;
1895        pub const VT_RESPONSE: flatbuffers::VOffsetT = 8;
1896        pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 10;
1897        pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 12;
1898
1899        #[inline]
1900        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1901            RPCCall { _tab: table }
1902        }
1903        #[expect(unused_mut)]
1904        pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
1905            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
1906            args: &'args RPCCallArgs<'args>,
1907        ) -> flatbuffers::WIPOffset<RPCCall<'bldr>> {
1908            let mut builder = RPCCallBuilder::new(_fbb);
1909            if let Some(x) = args.documentation {
1910                builder.add_documentation(x);
1911            }
1912            if let Some(x) = args.attributes {
1913                builder.add_attributes(x);
1914            }
1915            if let Some(x) = args.response {
1916                builder.add_response(x);
1917            }
1918            if let Some(x) = args.request {
1919                builder.add_request(x);
1920            }
1921            if let Some(x) = args.name {
1922                builder.add_name(x);
1923            }
1924            builder.finish()
1925        }
1926
1927        #[inline]
1928        pub fn name(&self) -> &'a str {
1929            // Safety:
1930            // Created from valid Table for this object
1931            // which contains a valid value in this slot
1932            unsafe {
1933                self._tab
1934                    .get::<flatbuffers::ForwardsUOffset<&str>>(RPCCall::VT_NAME, None)
1935                    .unwrap()
1936            }
1937        }
1938        #[inline]
1939        pub fn key_compare_less_than(&self, o: &RPCCall) -> bool {
1940            self.name() < o.name()
1941        }
1942
1943        #[inline]
1944        pub fn key_compare_with_value(&self, val: &str) -> ::core::cmp::Ordering {
1945            let key = self.name();
1946            key.cmp(val)
1947        }
1948        #[inline]
1949        pub fn request(&self) -> Object<'a> {
1950            // Safety:
1951            // Created from valid Table for this object
1952            // which contains a valid value in this slot
1953            unsafe {
1954                self._tab
1955                    .get::<flatbuffers::ForwardsUOffset<Object>>(RPCCall::VT_REQUEST, None)
1956                    .unwrap()
1957            }
1958        }
1959        #[inline]
1960        pub fn response(&self) -> Object<'a> {
1961            // Safety:
1962            // Created from valid Table for this object
1963            // which contains a valid value in this slot
1964            unsafe {
1965                self._tab
1966                    .get::<flatbuffers::ForwardsUOffset<Object>>(RPCCall::VT_RESPONSE, None)
1967                    .unwrap()
1968            }
1969        }
1970        #[inline]
1971        pub fn attributes(
1972            &self,
1973        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
1974            // Safety:
1975            // Created from valid Table for this object
1976            // which contains a valid value in this slot
1977            unsafe {
1978                self._tab.get::<flatbuffers::ForwardsUOffset<
1979                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
1980                >>(RPCCall::VT_ATTRIBUTES, None)
1981            }
1982        }
1983        #[inline]
1984        pub fn documentation(
1985            &self,
1986        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
1987            // Safety:
1988            // Created from valid Table for this object
1989            // which contains a valid value in this slot
1990            unsafe {
1991                self._tab.get::<flatbuffers::ForwardsUOffset<
1992                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
1993                >>(RPCCall::VT_DOCUMENTATION, None)
1994            }
1995        }
1996    }
1997
1998    impl flatbuffers::Verifiable for RPCCall<'_> {
1999        #[inline]
2000        fn run_verifier(
2001            v: &mut flatbuffers::Verifier,
2002            pos: usize,
2003        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2004            use self::flatbuffers::Verifiable;
2005            v.visit_table(pos)?
2006                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
2007                .visit_field::<flatbuffers::ForwardsUOffset<Object>>(
2008                    "request",
2009                    Self::VT_REQUEST,
2010                    true,
2011                )?
2012                .visit_field::<flatbuffers::ForwardsUOffset<Object>>(
2013                    "response",
2014                    Self::VT_RESPONSE,
2015                    true,
2016                )?
2017                .visit_field::<flatbuffers::ForwardsUOffset<
2018                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>,
2019                >>("attributes", Self::VT_ATTRIBUTES, false)?
2020                .visit_field::<flatbuffers::ForwardsUOffset<
2021                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>,
2022                >>("documentation", Self::VT_DOCUMENTATION, false)?
2023                .finish();
2024            Ok(())
2025        }
2026    }
2027    pub struct RPCCallArgs<'a> {
2028        pub name: Option<flatbuffers::WIPOffset<&'a str>>,
2029        pub request: Option<flatbuffers::WIPOffset<Object<'a>>>,
2030        pub response: Option<flatbuffers::WIPOffset<Object<'a>>>,
2031        pub attributes: Option<
2032            flatbuffers::WIPOffset<
2033                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>,
2034            >,
2035        >,
2036        pub documentation: Option<
2037            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>,
2038        >,
2039    }
2040    impl<'a> Default for RPCCallArgs<'a> {
2041        #[inline]
2042        fn default() -> Self {
2043            RPCCallArgs {
2044                name: None,     // required field
2045                request: None,  // required field
2046                response: None, // required field
2047                attributes: None,
2048                documentation: None,
2049            }
2050        }
2051    }
2052
2053    pub struct RPCCallBuilder<'a: 'b, 'b> {
2054        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
2055        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2056    }
2057    impl<'a: 'b, 'b> RPCCallBuilder<'a, 'b> {
2058        #[inline]
2059        pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
2060            self.fbb_
2061                .push_slot_always::<flatbuffers::WIPOffset<_>>(RPCCall::VT_NAME, name);
2062        }
2063        #[inline]
2064        pub fn add_request(&mut self, request: flatbuffers::WIPOffset<Object<'b>>) {
2065            self.fbb_
2066                .push_slot_always::<flatbuffers::WIPOffset<Object>>(RPCCall::VT_REQUEST, request);
2067        }
2068        #[inline]
2069        pub fn add_response(&mut self, response: flatbuffers::WIPOffset<Object<'b>>) {
2070            self.fbb_
2071                .push_slot_always::<flatbuffers::WIPOffset<Object>>(RPCCall::VT_RESPONSE, response);
2072        }
2073        #[inline]
2074        pub fn add_attributes(
2075            &mut self,
2076            attributes: flatbuffers::WIPOffset<
2077                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
2078            >,
2079        ) {
2080            self.fbb_
2081                .push_slot_always::<flatbuffers::WIPOffset<_>>(RPCCall::VT_ATTRIBUTES, attributes);
2082        }
2083        #[inline]
2084        pub fn add_documentation(
2085            &mut self,
2086            documentation: flatbuffers::WIPOffset<
2087                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>,
2088            >,
2089        ) {
2090            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2091                RPCCall::VT_DOCUMENTATION,
2092                documentation,
2093            );
2094        }
2095        #[inline]
2096        pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RPCCallBuilder<'a, 'b> {
2097            let start = _fbb.start_table();
2098            RPCCallBuilder {
2099                fbb_: _fbb,
2100                start_: start,
2101            }
2102        }
2103        #[inline]
2104        pub fn finish(self) -> flatbuffers::WIPOffset<RPCCall<'a>> {
2105            let o = self.fbb_.end_table(self.start_);
2106            self.fbb_.required(o, RPCCall::VT_NAME, "name");
2107            self.fbb_.required(o, RPCCall::VT_REQUEST, "request");
2108            self.fbb_.required(o, RPCCall::VT_RESPONSE, "response");
2109            flatbuffers::WIPOffset::new(o.value())
2110        }
2111    }
2112
2113    impl core::fmt::Debug for RPCCall<'_> {
2114        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2115            let mut ds = f.debug_struct("RPCCall");
2116            ds.field("name", &self.name());
2117            ds.field("request", &self.request());
2118            ds.field("response", &self.response());
2119            ds.field("attributes", &self.attributes());
2120            ds.field("documentation", &self.documentation());
2121            ds.finish()
2122        }
2123    }
2124    pub enum ServiceOffset {}
2125    #[derive(Copy, Clone, PartialEq)]
2126
2127    pub struct Service<'a> {
2128        pub _tab: flatbuffers::Table<'a>,
2129    }
2130
2131    impl<'a> flatbuffers::Follow<'a> for Service<'a> {
2132        type Inner = Service<'a>;
2133        #[inline]
2134        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2135            Self {
2136                _tab: flatbuffers::Table::new(buf, loc),
2137            }
2138        }
2139    }
2140
2141    impl<'a> Service<'a> {
2142        pub const VT_NAME: flatbuffers::VOffsetT = 4;
2143        pub const VT_CALLS: flatbuffers::VOffsetT = 6;
2144        pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 8;
2145        pub const VT_DOCUMENTATION: flatbuffers::VOffsetT = 10;
2146        pub const VT_DECLARATION_FILE: flatbuffers::VOffsetT = 12;
2147
2148        #[inline]
2149        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2150            Service { _tab: table }
2151        }
2152        #[expect(unused_mut)]
2153        pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
2154            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
2155            args: &'args ServiceArgs<'args>,
2156        ) -> flatbuffers::WIPOffset<Service<'bldr>> {
2157            let mut builder = ServiceBuilder::new(_fbb);
2158            if let Some(x) = args.declaration_file {
2159                builder.add_declaration_file(x);
2160            }
2161            if let Some(x) = args.documentation {
2162                builder.add_documentation(x);
2163            }
2164            if let Some(x) = args.attributes {
2165                builder.add_attributes(x);
2166            }
2167            if let Some(x) = args.calls {
2168                builder.add_calls(x);
2169            }
2170            if let Some(x) = args.name {
2171                builder.add_name(x);
2172            }
2173            builder.finish()
2174        }
2175
2176        #[inline]
2177        pub fn name(&self) -> &'a str {
2178            // Safety:
2179            // Created from valid Table for this object
2180            // which contains a valid value in this slot
2181            unsafe {
2182                self._tab
2183                    .get::<flatbuffers::ForwardsUOffset<&str>>(Service::VT_NAME, None)
2184                    .unwrap()
2185            }
2186        }
2187        #[inline]
2188        pub fn key_compare_less_than(&self, o: &Service) -> bool {
2189            self.name() < o.name()
2190        }
2191
2192        #[inline]
2193        pub fn key_compare_with_value(&self, val: &str) -> ::core::cmp::Ordering {
2194            let key = self.name();
2195            key.cmp(val)
2196        }
2197        #[inline]
2198        pub fn calls(
2199            &self,
2200        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RPCCall<'a>>>> {
2201            // Safety:
2202            // Created from valid Table for this object
2203            // which contains a valid value in this slot
2204            unsafe {
2205                self._tab.get::<flatbuffers::ForwardsUOffset<
2206                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RPCCall>>,
2207                >>(Service::VT_CALLS, None)
2208            }
2209        }
2210        #[inline]
2211        pub fn attributes(
2212            &self,
2213        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
2214            // Safety:
2215            // Created from valid Table for this object
2216            // which contains a valid value in this slot
2217            unsafe {
2218                self._tab.get::<flatbuffers::ForwardsUOffset<
2219                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
2220                >>(Service::VT_ATTRIBUTES, None)
2221            }
2222        }
2223        #[inline]
2224        pub fn documentation(
2225            &self,
2226        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
2227            // Safety:
2228            // Created from valid Table for this object
2229            // which contains a valid value in this slot
2230            unsafe {
2231                self._tab.get::<flatbuffers::ForwardsUOffset<
2232                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
2233                >>(Service::VT_DOCUMENTATION, None)
2234            }
2235        }
2236        /// File that this Service is declared in.
2237        #[inline]
2238        pub fn declaration_file(&self) -> Option<&'a str> {
2239            // Safety:
2240            // Created from valid Table for this object
2241            // which contains a valid value in this slot
2242            unsafe {
2243                self._tab
2244                    .get::<flatbuffers::ForwardsUOffset<&str>>(Service::VT_DECLARATION_FILE, None)
2245            }
2246        }
2247    }
2248
2249    impl flatbuffers::Verifiable for Service<'_> {
2250        #[inline]
2251        fn run_verifier(
2252            v: &mut flatbuffers::Verifier,
2253            pos: usize,
2254        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2255            use self::flatbuffers::Verifiable;
2256            v.visit_table(pos)?
2257                .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
2258                .visit_field::<flatbuffers::ForwardsUOffset<
2259                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<RPCCall>>,
2260                >>("calls", Self::VT_CALLS, false)?
2261                .visit_field::<flatbuffers::ForwardsUOffset<
2262                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>,
2263                >>("attributes", Self::VT_ATTRIBUTES, false)?
2264                .visit_field::<flatbuffers::ForwardsUOffset<
2265                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>,
2266                >>("documentation", Self::VT_DOCUMENTATION, false)?
2267                .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
2268                    "declaration_file",
2269                    Self::VT_DECLARATION_FILE,
2270                    false,
2271                )?
2272                .finish();
2273            Ok(())
2274        }
2275    }
2276    pub struct ServiceArgs<'a> {
2277        pub name: Option<flatbuffers::WIPOffset<&'a str>>,
2278        pub calls: Option<
2279            flatbuffers::WIPOffset<
2280                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RPCCall<'a>>>,
2281            >,
2282        >,
2283        pub attributes: Option<
2284            flatbuffers::WIPOffset<
2285                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>,
2286            >,
2287        >,
2288        pub documentation: Option<
2289            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>,
2290        >,
2291        pub declaration_file: Option<flatbuffers::WIPOffset<&'a str>>,
2292    }
2293    impl<'a> Default for ServiceArgs<'a> {
2294        #[inline]
2295        fn default() -> Self {
2296            ServiceArgs {
2297                name: None, // required field
2298                calls: None,
2299                attributes: None,
2300                documentation: None,
2301                declaration_file: None,
2302            }
2303        }
2304    }
2305
2306    pub struct ServiceBuilder<'a: 'b, 'b> {
2307        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
2308        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2309    }
2310    impl<'a: 'b, 'b> ServiceBuilder<'a, 'b> {
2311        #[inline]
2312        pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
2313            self.fbb_
2314                .push_slot_always::<flatbuffers::WIPOffset<_>>(Service::VT_NAME, name);
2315        }
2316        #[inline]
2317        pub fn add_calls(
2318            &mut self,
2319            calls: flatbuffers::WIPOffset<
2320                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<RPCCall<'b>>>,
2321            >,
2322        ) {
2323            self.fbb_
2324                .push_slot_always::<flatbuffers::WIPOffset<_>>(Service::VT_CALLS, calls);
2325        }
2326        #[inline]
2327        pub fn add_attributes(
2328            &mut self,
2329            attributes: flatbuffers::WIPOffset<
2330                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
2331            >,
2332        ) {
2333            self.fbb_
2334                .push_slot_always::<flatbuffers::WIPOffset<_>>(Service::VT_ATTRIBUTES, attributes);
2335        }
2336        #[inline]
2337        pub fn add_documentation(
2338            &mut self,
2339            documentation: flatbuffers::WIPOffset<
2340                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>,
2341            >,
2342        ) {
2343            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2344                Service::VT_DOCUMENTATION,
2345                documentation,
2346            );
2347        }
2348        #[inline]
2349        pub fn add_declaration_file(&mut self, declaration_file: flatbuffers::WIPOffset<&'b str>) {
2350            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2351                Service::VT_DECLARATION_FILE,
2352                declaration_file,
2353            );
2354        }
2355        #[inline]
2356        pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ServiceBuilder<'a, 'b> {
2357            let start = _fbb.start_table();
2358            ServiceBuilder {
2359                fbb_: _fbb,
2360                start_: start,
2361            }
2362        }
2363        #[inline]
2364        pub fn finish(self) -> flatbuffers::WIPOffset<Service<'a>> {
2365            let o = self.fbb_.end_table(self.start_);
2366            self.fbb_.required(o, Service::VT_NAME, "name");
2367            flatbuffers::WIPOffset::new(o.value())
2368        }
2369    }
2370
2371    impl core::fmt::Debug for Service<'_> {
2372        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2373            let mut ds = f.debug_struct("Service");
2374            ds.field("name", &self.name());
2375            ds.field("calls", &self.calls());
2376            ds.field("attributes", &self.attributes());
2377            ds.field("documentation", &self.documentation());
2378            ds.field("declaration_file", &self.declaration_file());
2379            ds.finish()
2380        }
2381    }
2382    pub enum SchemaFileOffset {}
2383    #[derive(Copy, Clone, PartialEq)]
2384
2385    /// File specific information.
2386    /// Symbols declared within a file may be recovered by iterating over all
2387    /// symbols and examining the `declaration_file` field.
2388    pub struct SchemaFile<'a> {
2389        pub _tab: flatbuffers::Table<'a>,
2390    }
2391
2392    impl<'a> flatbuffers::Follow<'a> for SchemaFile<'a> {
2393        type Inner = SchemaFile<'a>;
2394        #[inline]
2395        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2396            Self {
2397                _tab: flatbuffers::Table::new(buf, loc),
2398            }
2399        }
2400    }
2401
2402    impl<'a> SchemaFile<'a> {
2403        pub const VT_FILENAME: flatbuffers::VOffsetT = 4;
2404        pub const VT_INCLUDED_FILENAMES: flatbuffers::VOffsetT = 6;
2405
2406        #[inline]
2407        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2408            SchemaFile { _tab: table }
2409        }
2410        #[expect(unused_mut)]
2411        pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
2412            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
2413            args: &'args SchemaFileArgs<'args>,
2414        ) -> flatbuffers::WIPOffset<SchemaFile<'bldr>> {
2415            let mut builder = SchemaFileBuilder::new(_fbb);
2416            if let Some(x) = args.included_filenames {
2417                builder.add_included_filenames(x);
2418            }
2419            if let Some(x) = args.filename {
2420                builder.add_filename(x);
2421            }
2422            builder.finish()
2423        }
2424
2425        /// Filename, relative to project root.
2426        #[inline]
2427        pub fn filename(&self) -> &'a str {
2428            // Safety:
2429            // Created from valid Table for this object
2430            // which contains a valid value in this slot
2431            unsafe {
2432                self._tab
2433                    .get::<flatbuffers::ForwardsUOffset<&str>>(SchemaFile::VT_FILENAME, None)
2434                    .unwrap()
2435            }
2436        }
2437        #[inline]
2438        pub fn key_compare_less_than(&self, o: &SchemaFile) -> bool {
2439            self.filename() < o.filename()
2440        }
2441
2442        #[inline]
2443        pub fn key_compare_with_value(&self, val: &str) -> ::core::cmp::Ordering {
2444            let key = self.filename();
2445            key.cmp(val)
2446        }
2447        /// Names of included files, relative to project root.
2448        #[inline]
2449        pub fn included_filenames(
2450            &self,
2451        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
2452            // Safety:
2453            // Created from valid Table for this object
2454            // which contains a valid value in this slot
2455            unsafe {
2456                self._tab.get::<flatbuffers::ForwardsUOffset<
2457                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
2458                >>(SchemaFile::VT_INCLUDED_FILENAMES, None)
2459            }
2460        }
2461    }
2462
2463    impl flatbuffers::Verifiable for SchemaFile<'_> {
2464        #[inline]
2465        fn run_verifier(
2466            v: &mut flatbuffers::Verifier,
2467            pos: usize,
2468        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2469            use self::flatbuffers::Verifiable;
2470            v.visit_table(pos)?
2471                .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
2472                    "filename",
2473                    Self::VT_FILENAME,
2474                    true,
2475                )?
2476                .visit_field::<flatbuffers::ForwardsUOffset<
2477                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>,
2478                >>("included_filenames", Self::VT_INCLUDED_FILENAMES, false)?
2479                .finish();
2480            Ok(())
2481        }
2482    }
2483    pub struct SchemaFileArgs<'a> {
2484        pub filename: Option<flatbuffers::WIPOffset<&'a str>>,
2485        pub included_filenames: Option<
2486            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>,
2487        >,
2488    }
2489    impl<'a> Default for SchemaFileArgs<'a> {
2490        #[inline]
2491        fn default() -> Self {
2492            SchemaFileArgs {
2493                filename: None, // required field
2494                included_filenames: None,
2495            }
2496        }
2497    }
2498
2499    pub struct SchemaFileBuilder<'a: 'b, 'b> {
2500        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
2501        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2502    }
2503    impl<'a: 'b, 'b> SchemaFileBuilder<'a, 'b> {
2504        #[inline]
2505        pub fn add_filename(&mut self, filename: flatbuffers::WIPOffset<&'b str>) {
2506            self.fbb_
2507                .push_slot_always::<flatbuffers::WIPOffset<_>>(SchemaFile::VT_FILENAME, filename);
2508        }
2509        #[inline]
2510        pub fn add_included_filenames(
2511            &mut self,
2512            included_filenames: flatbuffers::WIPOffset<
2513                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>,
2514            >,
2515        ) {
2516            self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2517                SchemaFile::VT_INCLUDED_FILENAMES,
2518                included_filenames,
2519            );
2520        }
2521        #[inline]
2522        pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SchemaFileBuilder<'a, 'b> {
2523            let start = _fbb.start_table();
2524            SchemaFileBuilder {
2525                fbb_: _fbb,
2526                start_: start,
2527            }
2528        }
2529        #[inline]
2530        pub fn finish(self) -> flatbuffers::WIPOffset<SchemaFile<'a>> {
2531            let o = self.fbb_.end_table(self.start_);
2532            self.fbb_.required(o, SchemaFile::VT_FILENAME, "filename");
2533            flatbuffers::WIPOffset::new(o.value())
2534        }
2535    }
2536
2537    impl core::fmt::Debug for SchemaFile<'_> {
2538        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2539            let mut ds = f.debug_struct("SchemaFile");
2540            ds.field("filename", &self.filename());
2541            ds.field("included_filenames", &self.included_filenames());
2542            ds.finish()
2543        }
2544    }
2545    pub enum SchemaOffset {}
2546    #[derive(Copy, Clone, PartialEq)]
2547
2548    pub struct Schema<'a> {
2549        pub _tab: flatbuffers::Table<'a>,
2550    }
2551
2552    impl<'a> flatbuffers::Follow<'a> for Schema<'a> {
2553        type Inner = Schema<'a>;
2554        #[inline]
2555        unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2556            Self {
2557                _tab: flatbuffers::Table::new(buf, loc),
2558            }
2559        }
2560    }
2561
2562    impl<'a> Schema<'a> {
2563        pub const VT_OBJECTS: flatbuffers::VOffsetT = 4;
2564        pub const VT_ENUMS: flatbuffers::VOffsetT = 6;
2565        pub const VT_FILE_IDENT: flatbuffers::VOffsetT = 8;
2566        pub const VT_FILE_EXT: flatbuffers::VOffsetT = 10;
2567        pub const VT_ROOT_TABLE: flatbuffers::VOffsetT = 12;
2568        pub const VT_SERVICES: flatbuffers::VOffsetT = 14;
2569        pub const VT_ADVANCED_FEATURES: flatbuffers::VOffsetT = 16;
2570        pub const VT_FBS_FILES: flatbuffers::VOffsetT = 18;
2571
2572        #[inline]
2573        pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2574            Schema { _tab: table }
2575        }
2576        #[expect(unused_mut)]
2577        pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
2578            _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
2579            args: &'args SchemaArgs<'args>,
2580        ) -> flatbuffers::WIPOffset<Schema<'bldr>> {
2581            let mut builder = SchemaBuilder::new(_fbb);
2582            builder.add_advanced_features(args.advanced_features);
2583            if let Some(x) = args.fbs_files {
2584                builder.add_fbs_files(x);
2585            }
2586            if let Some(x) = args.services {
2587                builder.add_services(x);
2588            }
2589            if let Some(x) = args.root_table {
2590                builder.add_root_table(x);
2591            }
2592            if let Some(x) = args.file_ext {
2593                builder.add_file_ext(x);
2594            }
2595            if let Some(x) = args.file_ident {
2596                builder.add_file_ident(x);
2597            }
2598            if let Some(x) = args.enums {
2599                builder.add_enums(x);
2600            }
2601            if let Some(x) = args.objects {
2602                builder.add_objects(x);
2603            }
2604            builder.finish()
2605        }
2606
2607        #[inline]
2608        pub fn objects(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Object<'a>>> {
2609            // Safety:
2610            // Created from valid Table for this object
2611            // which contains a valid value in this slot
2612            unsafe {
2613                self._tab
2614                    .get::<flatbuffers::ForwardsUOffset<
2615                        flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Object>>,
2616                    >>(Schema::VT_OBJECTS, None)
2617                    .unwrap()
2618            }
2619        }
2620        #[inline]
2621        pub fn enums(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Enum<'a>>> {
2622            // Safety:
2623            // Created from valid Table for this object
2624            // which contains a valid value in this slot
2625            unsafe {
2626                self._tab
2627                    .get::<flatbuffers::ForwardsUOffset<
2628                        flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Enum>>,
2629                    >>(Schema::VT_ENUMS, None)
2630                    .unwrap()
2631            }
2632        }
2633        #[inline]
2634        pub fn file_ident(&self) -> Option<&'a str> {
2635            // Safety:
2636            // Created from valid Table for this object
2637            // which contains a valid value in this slot
2638            unsafe {
2639                self._tab
2640                    .get::<flatbuffers::ForwardsUOffset<&str>>(Schema::VT_FILE_IDENT, None)
2641            }
2642        }
2643        #[inline]
2644        pub fn file_ext(&self) -> Option<&'a str> {
2645            // Safety:
2646            // Created from valid Table for this object
2647            // which contains a valid value in this slot
2648            unsafe {
2649                self._tab
2650                    .get::<flatbuffers::ForwardsUOffset<&str>>(Schema::VT_FILE_EXT, None)
2651            }
2652        }
2653        #[inline]
2654        pub fn root_table(&self) -> Option<Object<'a>> {
2655            // Safety:
2656            // Created from valid Table for this object
2657            // which contains a valid value in this slot
2658            unsafe {
2659                self._tab
2660                    .get::<flatbuffers::ForwardsUOffset<Object>>(Schema::VT_ROOT_TABLE, None)
2661            }
2662        }
2663        #[inline]
2664        pub fn services(
2665            &self,
2666        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Service<'a>>>> {
2667            // Safety:
2668            // Created from valid Table for this object
2669            // which contains a valid value in this slot
2670            unsafe {
2671                self._tab.get::<flatbuffers::ForwardsUOffset<
2672                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Service>>,
2673                >>(Schema::VT_SERVICES, None)
2674            }
2675        }
2676        #[inline]
2677        pub fn advanced_features(&self) -> AdvancedFeatures {
2678            // Safety:
2679            // Created from valid Table for this object
2680            // which contains a valid value in this slot
2681            unsafe {
2682                self._tab
2683                    .get::<AdvancedFeatures>(Schema::VT_ADVANCED_FEATURES, Some(Default::default()))
2684                    .unwrap()
2685            }
2686        }
2687        /// All the files used in this compilation. Files are relative to where
2688        /// flatc was invoked.
2689        #[inline]
2690        pub fn fbs_files(
2691            &self,
2692        ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SchemaFile<'a>>>> {
2693            // Safety:
2694            // Created from valid Table for this object
2695            // which contains a valid value in this slot
2696            unsafe {
2697                self._tab.get::<flatbuffers::ForwardsUOffset<
2698                    flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SchemaFile>>,
2699                >>(Schema::VT_FBS_FILES, None)
2700            }
2701        }
2702    }
2703
2704    impl flatbuffers::Verifiable for Schema<'_> {
2705        #[inline]
2706        fn run_verifier(
2707            v: &mut flatbuffers::Verifier,
2708            pos: usize,
2709        ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2710            use self::flatbuffers::Verifiable;
2711            v.visit_table(pos)?
2712                .visit_field::<flatbuffers::ForwardsUOffset<
2713                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Object>>,
2714                >>("objects", Self::VT_OBJECTS, true)?
2715                .visit_field::<flatbuffers::ForwardsUOffset<
2716                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Enum>>,
2717                >>("enums", Self::VT_ENUMS, true)?
2718                .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
2719                    "file_ident",
2720                    Self::VT_FILE_IDENT,
2721                    false,
2722                )?
2723                .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
2724                    "file_ext",
2725                    Self::VT_FILE_EXT,
2726                    false,
2727                )?
2728                .visit_field::<flatbuffers::ForwardsUOffset<Object>>(
2729                    "root_table",
2730                    Self::VT_ROOT_TABLE,
2731                    false,
2732                )?
2733                .visit_field::<flatbuffers::ForwardsUOffset<
2734                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Service>>,
2735                >>("services", Self::VT_SERVICES, false)?
2736                .visit_field::<AdvancedFeatures>(
2737                    "advanced_features",
2738                    Self::VT_ADVANCED_FEATURES,
2739                    false,
2740                )?
2741                .visit_field::<flatbuffers::ForwardsUOffset<
2742                    flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<SchemaFile>>,
2743                >>("fbs_files", Self::VT_FBS_FILES, false)?
2744                .finish();
2745            Ok(())
2746        }
2747    }
2748    pub struct SchemaArgs<'a> {
2749        pub objects: Option<
2750            flatbuffers::WIPOffset<
2751                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Object<'a>>>,
2752            >,
2753        >,
2754        pub enums: Option<
2755            flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Enum<'a>>>>,
2756        >,
2757        pub file_ident: Option<flatbuffers::WIPOffset<&'a str>>,
2758        pub file_ext: Option<flatbuffers::WIPOffset<&'a str>>,
2759        pub root_table: Option<flatbuffers::WIPOffset<Object<'a>>>,
2760        pub services: Option<
2761            flatbuffers::WIPOffset<
2762                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Service<'a>>>,
2763            >,
2764        >,
2765        pub advanced_features: AdvancedFeatures,
2766        pub fbs_files: Option<
2767            flatbuffers::WIPOffset<
2768                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SchemaFile<'a>>>,
2769            >,
2770        >,
2771    }
2772    impl<'a> Default for SchemaArgs<'a> {
2773        #[inline]
2774        fn default() -> Self {
2775            SchemaArgs {
2776                objects: None, // required field
2777                enums: None,   // required field
2778                file_ident: None,
2779                file_ext: None,
2780                root_table: None,
2781                services: None,
2782                advanced_features: Default::default(),
2783                fbs_files: None,
2784            }
2785        }
2786    }
2787
2788    pub struct SchemaBuilder<'a: 'b, 'b> {
2789        fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
2790        start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2791    }
2792    impl<'a: 'b, 'b> SchemaBuilder<'a, 'b> {
2793        #[inline]
2794        pub fn add_objects(
2795            &mut self,
2796            objects: flatbuffers::WIPOffset<
2797                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Object<'b>>>,
2798            >,
2799        ) {
2800            self.fbb_
2801                .push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_OBJECTS, objects);
2802        }
2803        #[inline]
2804        pub fn add_enums(
2805            &mut self,
2806            enums: flatbuffers::WIPOffset<
2807                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Enum<'b>>>,
2808            >,
2809        ) {
2810            self.fbb_
2811                .push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_ENUMS, enums);
2812        }
2813        #[inline]
2814        pub fn add_file_ident(&mut self, file_ident: flatbuffers::WIPOffset<&'b str>) {
2815            self.fbb_
2816                .push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_FILE_IDENT, file_ident);
2817        }
2818        #[inline]
2819        pub fn add_file_ext(&mut self, file_ext: flatbuffers::WIPOffset<&'b str>) {
2820            self.fbb_
2821                .push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_FILE_EXT, file_ext);
2822        }
2823        #[inline]
2824        pub fn add_root_table(&mut self, root_table: flatbuffers::WIPOffset<Object<'b>>) {
2825            self.fbb_
2826                .push_slot_always::<flatbuffers::WIPOffset<Object>>(
2827                    Schema::VT_ROOT_TABLE,
2828                    root_table,
2829                );
2830        }
2831        #[inline]
2832        pub fn add_services(
2833            &mut self,
2834            services: flatbuffers::WIPOffset<
2835                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Service<'b>>>,
2836            >,
2837        ) {
2838            self.fbb_
2839                .push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_SERVICES, services);
2840        }
2841        #[inline]
2842        pub fn add_advanced_features(&mut self, advanced_features: AdvancedFeatures) {
2843            self.fbb_.push_slot::<AdvancedFeatures>(
2844                Schema::VT_ADVANCED_FEATURES,
2845                advanced_features,
2846                Default::default(),
2847            );
2848        }
2849        #[inline]
2850        pub fn add_fbs_files(
2851            &mut self,
2852            fbs_files: flatbuffers::WIPOffset<
2853                flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<SchemaFile<'b>>>,
2854            >,
2855        ) {
2856            self.fbb_
2857                .push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_FBS_FILES, fbs_files);
2858        }
2859        #[inline]
2860        pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SchemaBuilder<'a, 'b> {
2861            let start = _fbb.start_table();
2862            SchemaBuilder {
2863                fbb_: _fbb,
2864                start_: start,
2865            }
2866        }
2867        #[inline]
2868        pub fn finish(self) -> flatbuffers::WIPOffset<Schema<'a>> {
2869            let o = self.fbb_.end_table(self.start_);
2870            self.fbb_.required(o, Schema::VT_OBJECTS, "objects");
2871            self.fbb_.required(o, Schema::VT_ENUMS, "enums");
2872            flatbuffers::WIPOffset::new(o.value())
2873        }
2874    }
2875
2876    impl core::fmt::Debug for Schema<'_> {
2877        fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2878            let mut ds = f.debug_struct("Schema");
2879            ds.field("objects", &self.objects());
2880            ds.field("enums", &self.enums());
2881            ds.field("file_ident", &self.file_ident());
2882            ds.field("file_ext", &self.file_ext());
2883            ds.field("root_table", &self.root_table());
2884            ds.field("services", &self.services());
2885            ds.field("advanced_features", &self.advanced_features());
2886            ds.field("fbs_files", &self.fbs_files());
2887            ds.finish()
2888        }
2889    }
2890    #[inline]
2891    /// Verifies that a buffer of bytes contains a `Schema`
2892    /// and returns it.
2893    /// Note that verification is still experimental and may not
2894    /// catch every error, or be maximally performant. For the
2895    /// previous, unchecked, behavior use
2896    /// `root_as_schema_unchecked`.
2897    pub fn root_as_schema(buf: &[u8]) -> Result<Schema, flatbuffers::InvalidFlatbuffer> {
2898        flatbuffers::root::<Schema>(buf)
2899    }
2900    #[inline]
2901    /// Verifies that a buffer of bytes contains a size prefixed
2902    /// `Schema` and returns it.
2903    /// Note that verification is still experimental and may not
2904    /// catch every error, or be maximally performant. For the
2905    /// previous, unchecked, behavior use
2906    /// `size_prefixed_root_as_schema_unchecked`.
2907    pub fn size_prefixed_root_as_schema(
2908        buf: &[u8],
2909    ) -> Result<Schema, flatbuffers::InvalidFlatbuffer> {
2910        flatbuffers::size_prefixed_root::<Schema>(buf)
2911    }
2912    #[inline]
2913    /// Verifies, with the given options, that a buffer of bytes
2914    /// contains a `Schema` and returns it.
2915    /// Note that verification is still experimental and may not
2916    /// catch every error, or be maximally performant. For the
2917    /// previous, unchecked, behavior use
2918    /// `root_as_schema_unchecked`.
2919    pub fn root_as_schema_with_opts<'b, 'o>(
2920        opts: &'o flatbuffers::VerifierOptions,
2921        buf: &'b [u8],
2922    ) -> Result<Schema<'b>, flatbuffers::InvalidFlatbuffer> {
2923        flatbuffers::root_with_opts::<Schema<'b>>(opts, buf)
2924    }
2925    #[inline]
2926    /// Verifies, with the given verifier options, that a buffer of
2927    /// bytes contains a size prefixed `Schema` and returns
2928    /// it. Note that verification is still experimental and may not
2929    /// catch every error, or be maximally performant. For the
2930    /// previous, unchecked, behavior use
2931    /// `root_as_schema_unchecked`.
2932    pub fn size_prefixed_root_as_schema_with_opts<'b, 'o>(
2933        opts: &'o flatbuffers::VerifierOptions,
2934        buf: &'b [u8],
2935    ) -> Result<Schema<'b>, flatbuffers::InvalidFlatbuffer> {
2936        flatbuffers::size_prefixed_root_with_opts::<Schema<'b>>(opts, buf)
2937    }
2938    #[inline]
2939    /// Assumes, without verification, that a buffer of bytes contains a Schema and returns it.
2940    /// # Safety
2941    /// Callers must trust the given bytes do indeed contain a valid `Schema`.
2942    pub unsafe fn root_as_schema_unchecked(buf: &[u8]) -> Schema {
2943        flatbuffers::root_unchecked::<Schema>(buf)
2944    }
2945    #[inline]
2946    /// Assumes, without verification, that a buffer of bytes contains a size prefixed Schema and returns it.
2947    /// # Safety
2948    /// Callers must trust the given bytes do indeed contain a valid size prefixed `Schema`.
2949    pub unsafe fn size_prefixed_root_as_schema_unchecked(buf: &[u8]) -> Schema {
2950        flatbuffers::size_prefixed_root_unchecked::<Schema>(buf)
2951    }
2952    pub const SCHEMA_IDENTIFIER: &str = "BFBS";
2953
2954    #[inline]
2955    pub fn schema_buffer_has_identifier(buf: &[u8]) -> bool {
2956        flatbuffers::buffer_has_identifier(buf, SCHEMA_IDENTIFIER, false)
2957    }
2958
2959    #[inline]
2960    pub fn schema_size_prefixed_buffer_has_identifier(buf: &[u8]) -> bool {
2961        flatbuffers::buffer_has_identifier(buf, SCHEMA_IDENTIFIER, true)
2962    }
2963
2964    pub const SCHEMA_EXTENSION: &str = "bfbs";
2965
2966    #[inline]
2967    pub fn finish_schema_buffer<'a, 'b>(
2968        fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
2969        root: flatbuffers::WIPOffset<Schema<'a>>,
2970    ) {
2971        fbb.finish(root, Some(SCHEMA_IDENTIFIER));
2972    }
2973
2974    #[inline]
2975    pub fn finish_size_prefixed_schema_buffer<'a, 'b>(
2976        fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
2977        root: flatbuffers::WIPOffset<Schema<'a>>,
2978    ) {
2979        fbb.finish_size_prefixed(root, Some(SCHEMA_IDENTIFIER));
2980    }
2981} // pub mod reflection