Skip to main content

fcb_core/fb/
header_generated.rs

1// automatically generated by the FlatBuffers compiler, do not modify
2
3// @generated
4
5use crate::extension_generated::*;
6use crate::geometry_generated::*;
7use core::cmp::Ordering;
8use core::mem;
9
10extern crate flatbuffers;
11use self::flatbuffers::{EndianScalar, Follow};
12
13#[deprecated(
14    since = "2.0.0",
15    note = "Use associated constants instead. This will no longer be generated in 2021."
16)]
17pub const ENUM_MIN_COLUMN_TYPE: u8 = 0;
18#[deprecated(
19    since = "2.0.0",
20    note = "Use associated constants instead. This will no longer be generated in 2021."
21)]
22pub const ENUM_MAX_COLUMN_TYPE: u8 = 14;
23#[deprecated(
24    since = "2.0.0",
25    note = "Use associated constants instead. This will no longer be generated in 2021."
26)]
27#[allow(non_camel_case_types)]
28pub const ENUM_VALUES_COLUMN_TYPE: [ColumnType; 15] = [
29    ColumnType::Byte,
30    ColumnType::UByte,
31    ColumnType::Bool,
32    ColumnType::Short,
33    ColumnType::UShort,
34    ColumnType::Int,
35    ColumnType::UInt,
36    ColumnType::Long,
37    ColumnType::ULong,
38    ColumnType::Float,
39    ColumnType::Double,
40    ColumnType::String,
41    ColumnType::Json,
42    ColumnType::DateTime,
43    ColumnType::Binary,
44];
45
46#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
47#[repr(transparent)]
48pub struct ColumnType(pub u8);
49#[allow(non_upper_case_globals)]
50impl ColumnType {
51    pub const Byte: Self = Self(0);
52    pub const UByte: Self = Self(1);
53    pub const Bool: Self = Self(2);
54    pub const Short: Self = Self(3);
55    pub const UShort: Self = Self(4);
56    pub const Int: Self = Self(5);
57    pub const UInt: Self = Self(6);
58    pub const Long: Self = Self(7);
59    pub const ULong: Self = Self(8);
60    pub const Float: Self = Self(9);
61    pub const Double: Self = Self(10);
62    pub const String: Self = Self(11);
63    pub const Json: Self = Self(12);
64    pub const DateTime: Self = Self(13);
65    pub const Binary: Self = Self(14);
66
67    pub const ENUM_MIN: u8 = 0;
68    pub const ENUM_MAX: u8 = 14;
69    pub const ENUM_VALUES: &'static [Self] = &[
70        Self::Byte,
71        Self::UByte,
72        Self::Bool,
73        Self::Short,
74        Self::UShort,
75        Self::Int,
76        Self::UInt,
77        Self::Long,
78        Self::ULong,
79        Self::Float,
80        Self::Double,
81        Self::String,
82        Self::Json,
83        Self::DateTime,
84        Self::Binary,
85    ];
86    /// Returns the variant's name or "" if unknown.
87    pub fn variant_name(self) -> Option<&'static str> {
88        match self {
89            Self::Byte => Some("Byte"),
90            Self::UByte => Some("UByte"),
91            Self::Bool => Some("Bool"),
92            Self::Short => Some("Short"),
93            Self::UShort => Some("UShort"),
94            Self::Int => Some("Int"),
95            Self::UInt => Some("UInt"),
96            Self::Long => Some("Long"),
97            Self::ULong => Some("ULong"),
98            Self::Float => Some("Float"),
99            Self::Double => Some("Double"),
100            Self::String => Some("String"),
101            Self::Json => Some("Json"),
102            Self::DateTime => Some("DateTime"),
103            Self::Binary => Some("Binary"),
104            _ => None,
105        }
106    }
107}
108impl core::fmt::Debug for ColumnType {
109    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
110        if let Some(name) = self.variant_name() {
111            f.write_str(name)
112        } else {
113            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
114        }
115    }
116}
117impl<'a> flatbuffers::Follow<'a> for ColumnType {
118    type Inner = Self;
119    #[inline]
120    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
121        let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
122        Self(b)
123    }
124}
125
126impl flatbuffers::Push for ColumnType {
127    type Output = ColumnType;
128    #[inline]
129    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
130        unsafe {
131            flatbuffers::emplace_scalar::<u8>(dst, self.0);
132        }
133    }
134}
135
136impl flatbuffers::EndianScalar for ColumnType {
137    type Scalar = u8;
138    #[inline]
139    fn to_little_endian(self) -> u8 {
140        self.0.to_le()
141    }
142    #[inline]
143    #[allow(clippy::wrong_self_convention)]
144    fn from_little_endian(v: u8) -> Self {
145        let b = u8::from_le(v);
146        Self(b)
147    }
148}
149
150impl<'a> flatbuffers::Verifiable for ColumnType {
151    #[inline]
152    fn run_verifier(
153        v: &mut flatbuffers::Verifier,
154        pos: usize,
155    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
156        use self::flatbuffers::Verifiable;
157        u8::run_verifier(v, pos)
158    }
159}
160
161impl flatbuffers::SimpleToVerifyInSlice for ColumnType {}
162#[deprecated(
163    since = "2.0.0",
164    note = "Use associated constants instead. This will no longer be generated in 2021."
165)]
166pub const ENUM_MIN_TEXTURE_FORMAT: u8 = 0;
167#[deprecated(
168    since = "2.0.0",
169    note = "Use associated constants instead. This will no longer be generated in 2021."
170)]
171pub const ENUM_MAX_TEXTURE_FORMAT: u8 = 1;
172#[deprecated(
173    since = "2.0.0",
174    note = "Use associated constants instead. This will no longer be generated in 2021."
175)]
176#[allow(non_camel_case_types)]
177pub const ENUM_VALUES_TEXTURE_FORMAT: [TextureFormat; 2] = [TextureFormat::PNG, TextureFormat::JPG];
178
179#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
180#[repr(transparent)]
181pub struct TextureFormat(pub u8);
182#[allow(non_upper_case_globals)]
183impl TextureFormat {
184    pub const PNG: Self = Self(0);
185    pub const JPG: Self = Self(1);
186
187    pub const ENUM_MIN: u8 = 0;
188    pub const ENUM_MAX: u8 = 1;
189    pub const ENUM_VALUES: &'static [Self] = &[Self::PNG, Self::JPG];
190    /// Returns the variant's name or "" if unknown.
191    pub fn variant_name(self) -> Option<&'static str> {
192        match self {
193            Self::PNG => Some("PNG"),
194            Self::JPG => Some("JPG"),
195            _ => None,
196        }
197    }
198}
199impl core::fmt::Debug for TextureFormat {
200    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
201        if let Some(name) = self.variant_name() {
202            f.write_str(name)
203        } else {
204            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
205        }
206    }
207}
208impl<'a> flatbuffers::Follow<'a> for TextureFormat {
209    type Inner = Self;
210    #[inline]
211    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
212        let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
213        Self(b)
214    }
215}
216
217impl flatbuffers::Push for TextureFormat {
218    type Output = TextureFormat;
219    #[inline]
220    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
221        unsafe {
222            flatbuffers::emplace_scalar::<u8>(dst, self.0);
223        }
224    }
225}
226
227impl flatbuffers::EndianScalar for TextureFormat {
228    type Scalar = u8;
229    #[inline]
230    fn to_little_endian(self) -> u8 {
231        self.0.to_le()
232    }
233    #[inline]
234    #[allow(clippy::wrong_self_convention)]
235    fn from_little_endian(v: u8) -> Self {
236        let b = u8::from_le(v);
237        Self(b)
238    }
239}
240
241impl<'a> flatbuffers::Verifiable for TextureFormat {
242    #[inline]
243    fn run_verifier(
244        v: &mut flatbuffers::Verifier,
245        pos: usize,
246    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
247        use self::flatbuffers::Verifiable;
248        u8::run_verifier(v, pos)
249    }
250}
251
252impl flatbuffers::SimpleToVerifyInSlice for TextureFormat {}
253#[deprecated(
254    since = "2.0.0",
255    note = "Use associated constants instead. This will no longer be generated in 2021."
256)]
257pub const ENUM_MIN_WRAP_MODE: u8 = 0;
258#[deprecated(
259    since = "2.0.0",
260    note = "Use associated constants instead. This will no longer be generated in 2021."
261)]
262pub const ENUM_MAX_WRAP_MODE: u8 = 4;
263#[deprecated(
264    since = "2.0.0",
265    note = "Use associated constants instead. This will no longer be generated in 2021."
266)]
267#[allow(non_camel_case_types)]
268pub const ENUM_VALUES_WRAP_MODE: [WrapMode; 5] = [
269    WrapMode::None,
270    WrapMode::Wrap,
271    WrapMode::Mirror,
272    WrapMode::Clamp,
273    WrapMode::Border,
274];
275
276#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
277#[repr(transparent)]
278pub struct WrapMode(pub u8);
279#[allow(non_upper_case_globals)]
280impl WrapMode {
281    pub const None: Self = Self(0);
282    pub const Wrap: Self = Self(1);
283    pub const Mirror: Self = Self(2);
284    pub const Clamp: Self = Self(3);
285    pub const Border: Self = Self(4);
286
287    pub const ENUM_MIN: u8 = 0;
288    pub const ENUM_MAX: u8 = 4;
289    pub const ENUM_VALUES: &'static [Self] = &[
290        Self::None,
291        Self::Wrap,
292        Self::Mirror,
293        Self::Clamp,
294        Self::Border,
295    ];
296    /// Returns the variant's name or "" if unknown.
297    pub fn variant_name(self) -> Option<&'static str> {
298        match self {
299            Self::None => Some("None"),
300            Self::Wrap => Some("Wrap"),
301            Self::Mirror => Some("Mirror"),
302            Self::Clamp => Some("Clamp"),
303            Self::Border => Some("Border"),
304            _ => None,
305        }
306    }
307}
308impl core::fmt::Debug for WrapMode {
309    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
310        if let Some(name) = self.variant_name() {
311            f.write_str(name)
312        } else {
313            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
314        }
315    }
316}
317impl<'a> flatbuffers::Follow<'a> for WrapMode {
318    type Inner = Self;
319    #[inline]
320    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
321        let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
322        Self(b)
323    }
324}
325
326impl flatbuffers::Push for WrapMode {
327    type Output = WrapMode;
328    #[inline]
329    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
330        unsafe {
331            flatbuffers::emplace_scalar::<u8>(dst, self.0);
332        }
333    }
334}
335
336impl flatbuffers::EndianScalar for WrapMode {
337    type Scalar = u8;
338    #[inline]
339    fn to_little_endian(self) -> u8 {
340        self.0.to_le()
341    }
342    #[inline]
343    #[allow(clippy::wrong_self_convention)]
344    fn from_little_endian(v: u8) -> Self {
345        let b = u8::from_le(v);
346        Self(b)
347    }
348}
349
350impl<'a> flatbuffers::Verifiable for WrapMode {
351    #[inline]
352    fn run_verifier(
353        v: &mut flatbuffers::Verifier,
354        pos: usize,
355    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
356        use self::flatbuffers::Verifiable;
357        u8::run_verifier(v, pos)
358    }
359}
360
361impl flatbuffers::SimpleToVerifyInSlice for WrapMode {}
362#[deprecated(
363    since = "2.0.0",
364    note = "Use associated constants instead. This will no longer be generated in 2021."
365)]
366pub const ENUM_MIN_TEXTURE_TYPE: u8 = 0;
367#[deprecated(
368    since = "2.0.0",
369    note = "Use associated constants instead. This will no longer be generated in 2021."
370)]
371pub const ENUM_MAX_TEXTURE_TYPE: u8 = 2;
372#[deprecated(
373    since = "2.0.0",
374    note = "Use associated constants instead. This will no longer be generated in 2021."
375)]
376#[allow(non_camel_case_types)]
377pub const ENUM_VALUES_TEXTURE_TYPE: [TextureType; 3] = [
378    TextureType::Unknown,
379    TextureType::Specific,
380    TextureType::Typical,
381];
382
383#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
384#[repr(transparent)]
385pub struct TextureType(pub u8);
386#[allow(non_upper_case_globals)]
387impl TextureType {
388    pub const Unknown: Self = Self(0);
389    pub const Specific: Self = Self(1);
390    pub const Typical: Self = Self(2);
391
392    pub const ENUM_MIN: u8 = 0;
393    pub const ENUM_MAX: u8 = 2;
394    pub const ENUM_VALUES: &'static [Self] = &[Self::Unknown, Self::Specific, Self::Typical];
395    /// Returns the variant's name or "" if unknown.
396    pub fn variant_name(self) -> Option<&'static str> {
397        match self {
398            Self::Unknown => Some("Unknown"),
399            Self::Specific => Some("Specific"),
400            Self::Typical => Some("Typical"),
401            _ => None,
402        }
403    }
404}
405impl core::fmt::Debug for TextureType {
406    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
407        if let Some(name) = self.variant_name() {
408            f.write_str(name)
409        } else {
410            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
411        }
412    }
413}
414impl<'a> flatbuffers::Follow<'a> for TextureType {
415    type Inner = Self;
416    #[inline]
417    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
418        let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
419        Self(b)
420    }
421}
422
423impl flatbuffers::Push for TextureType {
424    type Output = TextureType;
425    #[inline]
426    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
427        unsafe {
428            flatbuffers::emplace_scalar::<u8>(dst, self.0);
429        }
430    }
431}
432
433impl flatbuffers::EndianScalar for TextureType {
434    type Scalar = u8;
435    #[inline]
436    fn to_little_endian(self) -> u8 {
437        self.0.to_le()
438    }
439    #[inline]
440    #[allow(clippy::wrong_self_convention)]
441    fn from_little_endian(v: u8) -> Self {
442        let b = u8::from_le(v);
443        Self(b)
444    }
445}
446
447impl<'a> flatbuffers::Verifiable for TextureType {
448    #[inline]
449    fn run_verifier(
450        v: &mut flatbuffers::Verifier,
451        pos: usize,
452    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
453        use self::flatbuffers::Verifiable;
454        u8::run_verifier(v, pos)
455    }
456}
457
458impl flatbuffers::SimpleToVerifyInSlice for TextureType {}
459// struct Vector, aligned to 8
460#[repr(transparent)]
461#[derive(Clone, Copy, PartialEq, Default)]
462pub struct Vector(pub [u8; 24]);
463impl core::fmt::Debug for Vector {
464    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
465        f.debug_struct("Vector")
466            .field("x", &self.x())
467            .field("y", &self.y())
468            .field("z", &self.z())
469            .finish()
470    }
471}
472
473impl flatbuffers::SimpleToVerifyInSlice for Vector {}
474impl<'a> flatbuffers::Follow<'a> for Vector {
475    type Inner = &'a Vector;
476    #[inline]
477    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
478        unsafe { <&'a Vector>::follow(buf, loc) }
479    }
480}
481impl<'a> flatbuffers::Follow<'a> for &'a Vector {
482    type Inner = &'a Vector;
483    #[inline]
484    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
485        unsafe { flatbuffers::follow_cast_ref::<Vector>(buf, loc) }
486    }
487}
488impl<'b> flatbuffers::Push for Vector {
489    type Output = Vector;
490    #[inline]
491    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
492        let src = unsafe {
493            ::core::slice::from_raw_parts(
494                self as *const Vector as *const u8,
495                <Self as flatbuffers::Push>::size(),
496            )
497        };
498        dst.copy_from_slice(src);
499    }
500    #[inline]
501    fn alignment() -> flatbuffers::PushAlignment {
502        flatbuffers::PushAlignment::new(8)
503    }
504}
505
506impl<'a> flatbuffers::Verifiable for Vector {
507    #[inline]
508    fn run_verifier(
509        v: &mut flatbuffers::Verifier,
510        pos: usize,
511    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
512        use self::flatbuffers::Verifiable;
513        v.in_buffer::<Self>(pos)
514    }
515}
516
517impl<'a> Vector {
518    #[allow(clippy::too_many_arguments)]
519    pub fn new(x: f64, y: f64, z: f64) -> Self {
520        let mut s = Self([0; 24]);
521        s.set_x(x);
522        s.set_y(y);
523        s.set_z(z);
524        s
525    }
526
527    pub fn x(&self) -> f64 {
528        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
529        // Safety:
530        // Created from a valid Table for this object
531        // Which contains a valid value in this slot
532        EndianScalar::from_little_endian(unsafe {
533            core::ptr::copy_nonoverlapping(
534                self.0[0..].as_ptr(),
535                mem.as_mut_ptr() as *mut u8,
536                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
537            );
538            mem.assume_init()
539        })
540    }
541
542    pub fn set_x(&mut self, x: f64) {
543        let x_le = x.to_little_endian();
544        // Safety:
545        // Created from a valid Table for this object
546        // Which contains a valid value in this slot
547        unsafe {
548            core::ptr::copy_nonoverlapping(
549                &x_le as *const _ as *const u8,
550                self.0[0..].as_mut_ptr(),
551                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
552            );
553        }
554    }
555
556    pub fn y(&self) -> f64 {
557        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
558        // Safety:
559        // Created from a valid Table for this object
560        // Which contains a valid value in this slot
561        EndianScalar::from_little_endian(unsafe {
562            core::ptr::copy_nonoverlapping(
563                self.0[8..].as_ptr(),
564                mem.as_mut_ptr() as *mut u8,
565                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
566            );
567            mem.assume_init()
568        })
569    }
570
571    pub fn set_y(&mut self, x: f64) {
572        let x_le = x.to_little_endian();
573        // Safety:
574        // Created from a valid Table for this object
575        // Which contains a valid value in this slot
576        unsafe {
577            core::ptr::copy_nonoverlapping(
578                &x_le as *const _ as *const u8,
579                self.0[8..].as_mut_ptr(),
580                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
581            );
582        }
583    }
584
585    pub fn z(&self) -> f64 {
586        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
587        // Safety:
588        // Created from a valid Table for this object
589        // Which contains a valid value in this slot
590        EndianScalar::from_little_endian(unsafe {
591            core::ptr::copy_nonoverlapping(
592                self.0[16..].as_ptr(),
593                mem.as_mut_ptr() as *mut u8,
594                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
595            );
596            mem.assume_init()
597        })
598    }
599
600    pub fn set_z(&mut self, x: f64) {
601        let x_le = x.to_little_endian();
602        // Safety:
603        // Created from a valid Table for this object
604        // Which contains a valid value in this slot
605        unsafe {
606            core::ptr::copy_nonoverlapping(
607                &x_le as *const _ as *const u8,
608                self.0[16..].as_mut_ptr(),
609                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
610            );
611        }
612    }
613}
614
615// struct Transform, aligned to 8
616#[repr(transparent)]
617#[derive(Clone, Copy, PartialEq)]
618pub struct Transform(pub [u8; 48]);
619impl Default for Transform {
620    fn default() -> Self {
621        Self([0; 48])
622    }
623}
624impl core::fmt::Debug for Transform {
625    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
626        f.debug_struct("Transform")
627            .field("scale", &self.scale())
628            .field("translate", &self.translate())
629            .finish()
630    }
631}
632
633impl flatbuffers::SimpleToVerifyInSlice for Transform {}
634impl<'a> flatbuffers::Follow<'a> for Transform {
635    type Inner = &'a Transform;
636    #[inline]
637    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
638        unsafe { <&'a Transform>::follow(buf, loc) }
639    }
640}
641impl<'a> flatbuffers::Follow<'a> for &'a Transform {
642    type Inner = &'a Transform;
643    #[inline]
644    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
645        unsafe { flatbuffers::follow_cast_ref::<Transform>(buf, loc) }
646    }
647}
648impl<'b> flatbuffers::Push for Transform {
649    type Output = Transform;
650    #[inline]
651    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
652        let src = unsafe {
653            ::core::slice::from_raw_parts(
654                self as *const Transform as *const u8,
655                <Self as flatbuffers::Push>::size(),
656            )
657        };
658        dst.copy_from_slice(src);
659    }
660    #[inline]
661    fn alignment() -> flatbuffers::PushAlignment {
662        flatbuffers::PushAlignment::new(8)
663    }
664}
665
666impl<'a> flatbuffers::Verifiable for Transform {
667    #[inline]
668    fn run_verifier(
669        v: &mut flatbuffers::Verifier,
670        pos: usize,
671    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
672        use self::flatbuffers::Verifiable;
673        v.in_buffer::<Self>(pos)
674    }
675}
676
677impl<'a> Transform {
678    #[allow(clippy::too_many_arguments)]
679    pub fn new(scale: &Vector, translate: &Vector) -> Self {
680        let mut s = Self([0; 48]);
681        s.set_scale(scale);
682        s.set_translate(translate);
683        s
684    }
685
686    pub fn scale(&self) -> &Vector {
687        // Safety:
688        // Created from a valid Table for this object
689        // Which contains a valid struct in this slot
690        unsafe { &*(self.0[0..].as_ptr() as *const Vector) }
691    }
692
693    #[allow(clippy::identity_op)]
694    pub fn set_scale(&mut self, x: &Vector) {
695        self.0[0..0 + 24].copy_from_slice(&x.0)
696    }
697
698    pub fn translate(&self) -> &Vector {
699        // Safety:
700        // Created from a valid Table for this object
701        // Which contains a valid struct in this slot
702        unsafe { &*(self.0[24..].as_ptr() as *const Vector) }
703    }
704
705    #[allow(clippy::identity_op)]
706    pub fn set_translate(&mut self, x: &Vector) {
707        self.0[24..24 + 24].copy_from_slice(&x.0)
708    }
709}
710
711// struct GeographicalExtent, aligned to 8
712#[repr(transparent)]
713#[derive(Clone, Copy, PartialEq)]
714pub struct GeographicalExtent(pub [u8; 48]);
715impl Default for GeographicalExtent {
716    fn default() -> Self {
717        Self([0; 48])
718    }
719}
720impl core::fmt::Debug for GeographicalExtent {
721    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
722        f.debug_struct("GeographicalExtent")
723            .field("min", &self.min())
724            .field("max", &self.max())
725            .finish()
726    }
727}
728
729impl flatbuffers::SimpleToVerifyInSlice for GeographicalExtent {}
730impl<'a> flatbuffers::Follow<'a> for GeographicalExtent {
731    type Inner = &'a GeographicalExtent;
732    #[inline]
733    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
734        unsafe { <&'a GeographicalExtent>::follow(buf, loc) }
735    }
736}
737impl<'a> flatbuffers::Follow<'a> for &'a GeographicalExtent {
738    type Inner = &'a GeographicalExtent;
739    #[inline]
740    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
741        unsafe { flatbuffers::follow_cast_ref::<GeographicalExtent>(buf, loc) }
742    }
743}
744impl<'b> flatbuffers::Push for GeographicalExtent {
745    type Output = GeographicalExtent;
746    #[inline]
747    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
748        let src = unsafe {
749            ::core::slice::from_raw_parts(
750                self as *const GeographicalExtent as *const u8,
751                <Self as flatbuffers::Push>::size(),
752            )
753        };
754        dst.copy_from_slice(src);
755    }
756    #[inline]
757    fn alignment() -> flatbuffers::PushAlignment {
758        flatbuffers::PushAlignment::new(8)
759    }
760}
761
762impl<'a> flatbuffers::Verifiable for GeographicalExtent {
763    #[inline]
764    fn run_verifier(
765        v: &mut flatbuffers::Verifier,
766        pos: usize,
767    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
768        use self::flatbuffers::Verifiable;
769        v.in_buffer::<Self>(pos)
770    }
771}
772
773impl<'a> GeographicalExtent {
774    #[allow(clippy::too_many_arguments)]
775    pub fn new(min: &Vector, max: &Vector) -> Self {
776        let mut s = Self([0; 48]);
777        s.set_min(min);
778        s.set_max(max);
779        s
780    }
781
782    pub fn min(&self) -> &Vector {
783        // Safety:
784        // Created from a valid Table for this object
785        // Which contains a valid struct in this slot
786        unsafe { &*(self.0[0..].as_ptr() as *const Vector) }
787    }
788
789    #[allow(clippy::identity_op)]
790    pub fn set_min(&mut self, x: &Vector) {
791        self.0[0..0 + 24].copy_from_slice(&x.0)
792    }
793
794    pub fn max(&self) -> &Vector {
795        // Safety:
796        // Created from a valid Table for this object
797        // Which contains a valid struct in this slot
798        unsafe { &*(self.0[24..].as_ptr() as *const Vector) }
799    }
800
801    #[allow(clippy::identity_op)]
802    pub fn set_max(&mut self, x: &Vector) {
803        self.0[24..24 + 24].copy_from_slice(&x.0)
804    }
805}
806
807// struct AttributeIndex, aligned to 4
808#[repr(transparent)]
809#[derive(Clone, Copy, PartialEq, Default)]
810pub struct AttributeIndex(pub [u8; 16]);
811impl core::fmt::Debug for AttributeIndex {
812    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
813        f.debug_struct("AttributeIndex")
814            .field("index", &self.index())
815            .field("length", &self.length())
816            .field("branching_factor", &self.branching_factor())
817            .field("num_unique_items", &self.num_unique_items())
818            .finish()
819    }
820}
821
822impl flatbuffers::SimpleToVerifyInSlice for AttributeIndex {}
823impl<'a> flatbuffers::Follow<'a> for AttributeIndex {
824    type Inner = &'a AttributeIndex;
825    #[inline]
826    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
827        unsafe { <&'a AttributeIndex>::follow(buf, loc) }
828    }
829}
830impl<'a> flatbuffers::Follow<'a> for &'a AttributeIndex {
831    type Inner = &'a AttributeIndex;
832    #[inline]
833    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
834        unsafe { flatbuffers::follow_cast_ref::<AttributeIndex>(buf, loc) }
835    }
836}
837impl<'b> flatbuffers::Push for AttributeIndex {
838    type Output = AttributeIndex;
839    #[inline]
840    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
841        let src = unsafe {
842            ::core::slice::from_raw_parts(
843                self as *const AttributeIndex as *const u8,
844                <Self as flatbuffers::Push>::size(),
845            )
846        };
847        dst.copy_from_slice(src);
848    }
849    #[inline]
850    fn alignment() -> flatbuffers::PushAlignment {
851        flatbuffers::PushAlignment::new(4)
852    }
853}
854
855impl<'a> flatbuffers::Verifiable for AttributeIndex {
856    #[inline]
857    fn run_verifier(
858        v: &mut flatbuffers::Verifier,
859        pos: usize,
860    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
861        use self::flatbuffers::Verifiable;
862        v.in_buffer::<Self>(pos)
863    }
864}
865
866impl<'a> AttributeIndex {
867    #[allow(clippy::too_many_arguments)]
868    pub fn new(index: u16, length: u32, branching_factor: u16, num_unique_items: u32) -> Self {
869        let mut s = Self([0; 16]);
870        s.set_index(index);
871        s.set_length(length);
872        s.set_branching_factor(branching_factor);
873        s.set_num_unique_items(num_unique_items);
874        s
875    }
876
877    pub fn index(&self) -> u16 {
878        let mut mem = core::mem::MaybeUninit::<<u16 as EndianScalar>::Scalar>::uninit();
879        // Safety:
880        // Created from a valid Table for this object
881        // Which contains a valid value in this slot
882        EndianScalar::from_little_endian(unsafe {
883            core::ptr::copy_nonoverlapping(
884                self.0[0..].as_ptr(),
885                mem.as_mut_ptr() as *mut u8,
886                core::mem::size_of::<<u16 as EndianScalar>::Scalar>(),
887            );
888            mem.assume_init()
889        })
890    }
891
892    pub fn set_index(&mut self, x: u16) {
893        let x_le = x.to_little_endian();
894        // Safety:
895        // Created from a valid Table for this object
896        // Which contains a valid value in this slot
897        unsafe {
898            core::ptr::copy_nonoverlapping(
899                &x_le as *const _ as *const u8,
900                self.0[0..].as_mut_ptr(),
901                core::mem::size_of::<<u16 as EndianScalar>::Scalar>(),
902            );
903        }
904    }
905
906    pub fn length(&self) -> u32 {
907        let mut mem = core::mem::MaybeUninit::<<u32 as EndianScalar>::Scalar>::uninit();
908        // Safety:
909        // Created from a valid Table for this object
910        // Which contains a valid value in this slot
911        EndianScalar::from_little_endian(unsafe {
912            core::ptr::copy_nonoverlapping(
913                self.0[4..].as_ptr(),
914                mem.as_mut_ptr() as *mut u8,
915                core::mem::size_of::<<u32 as EndianScalar>::Scalar>(),
916            );
917            mem.assume_init()
918        })
919    }
920
921    pub fn set_length(&mut self, x: u32) {
922        let x_le = x.to_little_endian();
923        // Safety:
924        // Created from a valid Table for this object
925        // Which contains a valid value in this slot
926        unsafe {
927            core::ptr::copy_nonoverlapping(
928                &x_le as *const _ as *const u8,
929                self.0[4..].as_mut_ptr(),
930                core::mem::size_of::<<u32 as EndianScalar>::Scalar>(),
931            );
932        }
933    }
934
935    pub fn branching_factor(&self) -> u16 {
936        let mut mem = core::mem::MaybeUninit::<<u16 as EndianScalar>::Scalar>::uninit();
937        // Safety:
938        // Created from a valid Table for this object
939        // Which contains a valid value in this slot
940        EndianScalar::from_little_endian(unsafe {
941            core::ptr::copy_nonoverlapping(
942                self.0[8..].as_ptr(),
943                mem.as_mut_ptr() as *mut u8,
944                core::mem::size_of::<<u16 as EndianScalar>::Scalar>(),
945            );
946            mem.assume_init()
947        })
948    }
949
950    pub fn set_branching_factor(&mut self, x: u16) {
951        let x_le = x.to_little_endian();
952        // Safety:
953        // Created from a valid Table for this object
954        // Which contains a valid value in this slot
955        unsafe {
956            core::ptr::copy_nonoverlapping(
957                &x_le as *const _ as *const u8,
958                self.0[8..].as_mut_ptr(),
959                core::mem::size_of::<<u16 as EndianScalar>::Scalar>(),
960            );
961        }
962    }
963
964    pub fn num_unique_items(&self) -> u32 {
965        let mut mem = core::mem::MaybeUninit::<<u32 as EndianScalar>::Scalar>::uninit();
966        // Safety:
967        // Created from a valid Table for this object
968        // Which contains a valid value in this slot
969        EndianScalar::from_little_endian(unsafe {
970            core::ptr::copy_nonoverlapping(
971                self.0[12..].as_ptr(),
972                mem.as_mut_ptr() as *mut u8,
973                core::mem::size_of::<<u32 as EndianScalar>::Scalar>(),
974            );
975            mem.assume_init()
976        })
977    }
978
979    pub fn set_num_unique_items(&mut self, x: u32) {
980        let x_le = x.to_little_endian();
981        // Safety:
982        // Created from a valid Table for this object
983        // Which contains a valid value in this slot
984        unsafe {
985            core::ptr::copy_nonoverlapping(
986                &x_le as *const _ as *const u8,
987                self.0[12..].as_mut_ptr(),
988                core::mem::size_of::<<u32 as EndianScalar>::Scalar>(),
989            );
990        }
991    }
992}
993
994// struct Vec2, aligned to 8
995#[repr(transparent)]
996#[derive(Clone, Copy, PartialEq, Default)]
997pub struct Vec2(pub [u8; 16]);
998impl core::fmt::Debug for Vec2 {
999    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1000        f.debug_struct("Vec2")
1001            .field("u", &self.u())
1002            .field("v", &self.v())
1003            .finish()
1004    }
1005}
1006
1007impl flatbuffers::SimpleToVerifyInSlice for Vec2 {}
1008impl<'a> flatbuffers::Follow<'a> for Vec2 {
1009    type Inner = &'a Vec2;
1010    #[inline]
1011    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1012        unsafe { <&'a Vec2>::follow(buf, loc) }
1013    }
1014}
1015impl<'a> flatbuffers::Follow<'a> for &'a Vec2 {
1016    type Inner = &'a Vec2;
1017    #[inline]
1018    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1019        unsafe { flatbuffers::follow_cast_ref::<Vec2>(buf, loc) }
1020    }
1021}
1022impl<'b> flatbuffers::Push for Vec2 {
1023    type Output = Vec2;
1024    #[inline]
1025    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1026        let src = unsafe {
1027            ::core::slice::from_raw_parts(
1028                self as *const Vec2 as *const u8,
1029                <Self as flatbuffers::Push>::size(),
1030            )
1031        };
1032        dst.copy_from_slice(src);
1033    }
1034    #[inline]
1035    fn alignment() -> flatbuffers::PushAlignment {
1036        flatbuffers::PushAlignment::new(8)
1037    }
1038}
1039
1040impl<'a> flatbuffers::Verifiable for Vec2 {
1041    #[inline]
1042    fn run_verifier(
1043        v: &mut flatbuffers::Verifier,
1044        pos: usize,
1045    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1046        use self::flatbuffers::Verifiable;
1047        v.in_buffer::<Self>(pos)
1048    }
1049}
1050
1051impl<'a> Vec2 {
1052    #[allow(clippy::too_many_arguments)]
1053    pub fn new(u: f64, v: f64) -> Self {
1054        let mut s = Self([0; 16]);
1055        s.set_u(u);
1056        s.set_v(v);
1057        s
1058    }
1059
1060    pub fn u(&self) -> f64 {
1061        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
1062        // Safety:
1063        // Created from a valid Table for this object
1064        // Which contains a valid value in this slot
1065        EndianScalar::from_little_endian(unsafe {
1066            core::ptr::copy_nonoverlapping(
1067                self.0[0..].as_ptr(),
1068                mem.as_mut_ptr() as *mut u8,
1069                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
1070            );
1071            mem.assume_init()
1072        })
1073    }
1074
1075    pub fn set_u(&mut self, x: f64) {
1076        let x_le = x.to_little_endian();
1077        // Safety:
1078        // Created from a valid Table for this object
1079        // Which contains a valid value in this slot
1080        unsafe {
1081            core::ptr::copy_nonoverlapping(
1082                &x_le as *const _ as *const u8,
1083                self.0[0..].as_mut_ptr(),
1084                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
1085            );
1086        }
1087    }
1088
1089    pub fn v(&self) -> f64 {
1090        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
1091        // Safety:
1092        // Created from a valid Table for this object
1093        // Which contains a valid value in this slot
1094        EndianScalar::from_little_endian(unsafe {
1095            core::ptr::copy_nonoverlapping(
1096                self.0[8..].as_ptr(),
1097                mem.as_mut_ptr() as *mut u8,
1098                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
1099            );
1100            mem.assume_init()
1101        })
1102    }
1103
1104    pub fn set_v(&mut self, x: f64) {
1105        let x_le = x.to_little_endian();
1106        // Safety:
1107        // Created from a valid Table for this object
1108        // Which contains a valid value in this slot
1109        unsafe {
1110            core::ptr::copy_nonoverlapping(
1111                &x_le as *const _ as *const u8,
1112                self.0[8..].as_mut_ptr(),
1113                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
1114            );
1115        }
1116    }
1117}
1118
1119// struct DoubleVertex, aligned to 8
1120#[repr(transparent)]
1121#[derive(Clone, Copy, PartialEq, Default)]
1122pub struct DoubleVertex(pub [u8; 24]);
1123impl core::fmt::Debug for DoubleVertex {
1124    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1125        f.debug_struct("DoubleVertex")
1126            .field("x", &self.x())
1127            .field("y", &self.y())
1128            .field("z", &self.z())
1129            .finish()
1130    }
1131}
1132
1133impl flatbuffers::SimpleToVerifyInSlice for DoubleVertex {}
1134impl<'a> flatbuffers::Follow<'a> for DoubleVertex {
1135    type Inner = &'a DoubleVertex;
1136    #[inline]
1137    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1138        unsafe { <&'a DoubleVertex>::follow(buf, loc) }
1139    }
1140}
1141impl<'a> flatbuffers::Follow<'a> for &'a DoubleVertex {
1142    type Inner = &'a DoubleVertex;
1143    #[inline]
1144    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1145        unsafe { flatbuffers::follow_cast_ref::<DoubleVertex>(buf, loc) }
1146    }
1147}
1148impl<'b> flatbuffers::Push for DoubleVertex {
1149    type Output = DoubleVertex;
1150    #[inline]
1151    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1152        let src = unsafe {
1153            ::core::slice::from_raw_parts(
1154                self as *const DoubleVertex as *const u8,
1155                <Self as flatbuffers::Push>::size(),
1156            )
1157        };
1158        dst.copy_from_slice(src);
1159    }
1160    #[inline]
1161    fn alignment() -> flatbuffers::PushAlignment {
1162        flatbuffers::PushAlignment::new(8)
1163    }
1164}
1165
1166impl<'a> flatbuffers::Verifiable for DoubleVertex {
1167    #[inline]
1168    fn run_verifier(
1169        v: &mut flatbuffers::Verifier,
1170        pos: usize,
1171    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1172        use self::flatbuffers::Verifiable;
1173        v.in_buffer::<Self>(pos)
1174    }
1175}
1176
1177impl<'a> DoubleVertex {
1178    #[allow(clippy::too_many_arguments)]
1179    pub fn new(x: f64, y: f64, z: f64) -> Self {
1180        let mut s = Self([0; 24]);
1181        s.set_x(x);
1182        s.set_y(y);
1183        s.set_z(z);
1184        s
1185    }
1186
1187    pub fn x(&self) -> f64 {
1188        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
1189        // Safety:
1190        // Created from a valid Table for this object
1191        // Which contains a valid value in this slot
1192        EndianScalar::from_little_endian(unsafe {
1193            core::ptr::copy_nonoverlapping(
1194                self.0[0..].as_ptr(),
1195                mem.as_mut_ptr() as *mut u8,
1196                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
1197            );
1198            mem.assume_init()
1199        })
1200    }
1201
1202    pub fn set_x(&mut self, x: f64) {
1203        let x_le = x.to_little_endian();
1204        // Safety:
1205        // Created from a valid Table for this object
1206        // Which contains a valid value in this slot
1207        unsafe {
1208            core::ptr::copy_nonoverlapping(
1209                &x_le as *const _ as *const u8,
1210                self.0[0..].as_mut_ptr(),
1211                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
1212            );
1213        }
1214    }
1215
1216    pub fn y(&self) -> f64 {
1217        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
1218        // Safety:
1219        // Created from a valid Table for this object
1220        // Which contains a valid value in this slot
1221        EndianScalar::from_little_endian(unsafe {
1222            core::ptr::copy_nonoverlapping(
1223                self.0[8..].as_ptr(),
1224                mem.as_mut_ptr() as *mut u8,
1225                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
1226            );
1227            mem.assume_init()
1228        })
1229    }
1230
1231    pub fn set_y(&mut self, x: f64) {
1232        let x_le = x.to_little_endian();
1233        // Safety:
1234        // Created from a valid Table for this object
1235        // Which contains a valid value in this slot
1236        unsafe {
1237            core::ptr::copy_nonoverlapping(
1238                &x_le as *const _ as *const u8,
1239                self.0[8..].as_mut_ptr(),
1240                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
1241            );
1242        }
1243    }
1244
1245    pub fn z(&self) -> f64 {
1246        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
1247        // Safety:
1248        // Created from a valid Table for this object
1249        // Which contains a valid value in this slot
1250        EndianScalar::from_little_endian(unsafe {
1251            core::ptr::copy_nonoverlapping(
1252                self.0[16..].as_ptr(),
1253                mem.as_mut_ptr() as *mut u8,
1254                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
1255            );
1256            mem.assume_init()
1257        })
1258    }
1259
1260    pub fn set_z(&mut self, x: f64) {
1261        let x_le = x.to_little_endian();
1262        // Safety:
1263        // Created from a valid Table for this object
1264        // Which contains a valid value in this slot
1265        unsafe {
1266            core::ptr::copy_nonoverlapping(
1267                &x_le as *const _ as *const u8,
1268                self.0[16..].as_mut_ptr(),
1269                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
1270            );
1271        }
1272    }
1273}
1274
1275pub enum ColumnOffset {}
1276#[derive(Copy, Clone, PartialEq)]
1277
1278pub struct Column<'a> {
1279    pub _tab: flatbuffers::Table<'a>,
1280}
1281
1282impl<'a> flatbuffers::Follow<'a> for Column<'a> {
1283    type Inner = Column<'a>;
1284    #[inline]
1285    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1286        Self {
1287            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
1288        }
1289    }
1290}
1291
1292impl<'a> Column<'a> {
1293    pub const VT_INDEX: flatbuffers::VOffsetT = 4;
1294    pub const VT_NAME: flatbuffers::VOffsetT = 6;
1295    pub const VT_TYPE_: flatbuffers::VOffsetT = 8;
1296    pub const VT_TITLE: flatbuffers::VOffsetT = 10;
1297    pub const VT_DESCRIPTION: flatbuffers::VOffsetT = 12;
1298    pub const VT_PRECISION: flatbuffers::VOffsetT = 14;
1299    pub const VT_SCALE: flatbuffers::VOffsetT = 16;
1300    pub const VT_NULLABLE: flatbuffers::VOffsetT = 18;
1301    pub const VT_UNIQUE: flatbuffers::VOffsetT = 20;
1302    pub const VT_PRIMARY_KEY: flatbuffers::VOffsetT = 22;
1303    pub const VT_METADATA: flatbuffers::VOffsetT = 24;
1304
1305    #[inline]
1306    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1307        Column { _tab: table }
1308    }
1309    #[allow(unused_mut)]
1310    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1311        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1312        args: &'args ColumnArgs<'args>,
1313    ) -> flatbuffers::WIPOffset<Column<'bldr>> {
1314        let mut builder = ColumnBuilder::new(_fbb);
1315        if let Some(x) = args.metadata {
1316            builder.add_metadata(x);
1317        }
1318        builder.add_scale(args.scale);
1319        builder.add_precision(args.precision);
1320        if let Some(x) = args.description {
1321            builder.add_description(x);
1322        }
1323        if let Some(x) = args.title {
1324            builder.add_title(x);
1325        }
1326        if let Some(x) = args.name {
1327            builder.add_name(x);
1328        }
1329        builder.add_index(args.index);
1330        builder.add_primary_key(args.primary_key);
1331        builder.add_unique(args.unique);
1332        builder.add_nullable(args.nullable);
1333        builder.add_type_(args.type_);
1334        builder.finish()
1335    }
1336
1337    #[inline]
1338    pub fn index(&self) -> u16 {
1339        // Safety:
1340        // Created from valid Table for this object
1341        // which contains a valid value in this slot
1342        unsafe { self._tab.get::<u16>(Column::VT_INDEX, Some(0)).unwrap() }
1343    }
1344    #[inline]
1345    pub fn name(&self) -> &'a str {
1346        // Safety:
1347        // Created from valid Table for this object
1348        // which contains a valid value in this slot
1349        unsafe {
1350            self._tab
1351                .get::<flatbuffers::ForwardsUOffset<&str>>(Column::VT_NAME, None)
1352                .unwrap()
1353        }
1354    }
1355    #[inline]
1356    pub fn type_(&self) -> ColumnType {
1357        // Safety:
1358        // Created from valid Table for this object
1359        // which contains a valid value in this slot
1360        unsafe {
1361            self._tab
1362                .get::<ColumnType>(Column::VT_TYPE_, Some(ColumnType::Byte))
1363                .unwrap()
1364        }
1365    }
1366    #[inline]
1367    pub fn title(&self) -> Option<&'a str> {
1368        // Safety:
1369        // Created from valid Table for this object
1370        // which contains a valid value in this slot
1371        unsafe {
1372            self._tab
1373                .get::<flatbuffers::ForwardsUOffset<&str>>(Column::VT_TITLE, None)
1374        }
1375    }
1376    #[inline]
1377    pub fn description(&self) -> Option<&'a str> {
1378        // Safety:
1379        // Created from valid Table for this object
1380        // which contains a valid value in this slot
1381        unsafe {
1382            self._tab
1383                .get::<flatbuffers::ForwardsUOffset<&str>>(Column::VT_DESCRIPTION, None)
1384        }
1385    }
1386    #[inline]
1387    pub fn precision(&self) -> i32 {
1388        // Safety:
1389        // Created from valid Table for this object
1390        // which contains a valid value in this slot
1391        unsafe {
1392            self._tab
1393                .get::<i32>(Column::VT_PRECISION, Some(-1))
1394                .unwrap()
1395        }
1396    }
1397    #[inline]
1398    pub fn scale(&self) -> i32 {
1399        // Safety:
1400        // Created from valid Table for this object
1401        // which contains a valid value in this slot
1402        unsafe { self._tab.get::<i32>(Column::VT_SCALE, Some(-1)).unwrap() }
1403    }
1404    #[inline]
1405    pub fn nullable(&self) -> bool {
1406        // Safety:
1407        // Created from valid Table for this object
1408        // which contains a valid value in this slot
1409        unsafe {
1410            self._tab
1411                .get::<bool>(Column::VT_NULLABLE, Some(true))
1412                .unwrap()
1413        }
1414    }
1415    #[inline]
1416    pub fn unique(&self) -> bool {
1417        // Safety:
1418        // Created from valid Table for this object
1419        // which contains a valid value in this slot
1420        unsafe {
1421            self._tab
1422                .get::<bool>(Column::VT_UNIQUE, Some(false))
1423                .unwrap()
1424        }
1425    }
1426    #[inline]
1427    pub fn primary_key(&self) -> bool {
1428        // Safety:
1429        // Created from valid Table for this object
1430        // which contains a valid value in this slot
1431        unsafe {
1432            self._tab
1433                .get::<bool>(Column::VT_PRIMARY_KEY, Some(false))
1434                .unwrap()
1435        }
1436    }
1437    #[inline]
1438    pub fn metadata(&self) -> Option<&'a str> {
1439        // Safety:
1440        // Created from valid Table for this object
1441        // which contains a valid value in this slot
1442        unsafe {
1443            self._tab
1444                .get::<flatbuffers::ForwardsUOffset<&str>>(Column::VT_METADATA, None)
1445        }
1446    }
1447}
1448
1449impl flatbuffers::Verifiable for Column<'_> {
1450    #[inline]
1451    fn run_verifier(
1452        v: &mut flatbuffers::Verifier,
1453        pos: usize,
1454    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1455        use self::flatbuffers::Verifiable;
1456        v.visit_table(pos)?
1457            .visit_field::<u16>("index", Self::VT_INDEX, false)?
1458            .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
1459            .visit_field::<ColumnType>("type_", Self::VT_TYPE_, false)?
1460            .visit_field::<flatbuffers::ForwardsUOffset<&str>>("title", Self::VT_TITLE, false)?
1461            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
1462                "description",
1463                Self::VT_DESCRIPTION,
1464                false,
1465            )?
1466            .visit_field::<i32>("precision", Self::VT_PRECISION, false)?
1467            .visit_field::<i32>("scale", Self::VT_SCALE, false)?
1468            .visit_field::<bool>("nullable", Self::VT_NULLABLE, false)?
1469            .visit_field::<bool>("unique", Self::VT_UNIQUE, false)?
1470            .visit_field::<bool>("primary_key", Self::VT_PRIMARY_KEY, false)?
1471            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
1472                "metadata",
1473                Self::VT_METADATA,
1474                false,
1475            )?
1476            .finish();
1477        Ok(())
1478    }
1479}
1480pub struct ColumnArgs<'a> {
1481    pub index: u16,
1482    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
1483    pub type_: ColumnType,
1484    pub title: Option<flatbuffers::WIPOffset<&'a str>>,
1485    pub description: Option<flatbuffers::WIPOffset<&'a str>>,
1486    pub precision: i32,
1487    pub scale: i32,
1488    pub nullable: bool,
1489    pub unique: bool,
1490    pub primary_key: bool,
1491    pub metadata: Option<flatbuffers::WIPOffset<&'a str>>,
1492}
1493impl<'a> Default for ColumnArgs<'a> {
1494    #[inline]
1495    fn default() -> Self {
1496        ColumnArgs {
1497            index: 0,
1498            name: None, // required field
1499            type_: ColumnType::Byte,
1500            title: None,
1501            description: None,
1502            precision: -1,
1503            scale: -1,
1504            nullable: true,
1505            unique: false,
1506            primary_key: false,
1507            metadata: None,
1508        }
1509    }
1510}
1511
1512pub struct ColumnBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1513    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1514    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1515}
1516impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ColumnBuilder<'a, 'b, A> {
1517    #[inline]
1518    pub fn add_index(&mut self, index: u16) {
1519        self.fbb_.push_slot::<u16>(Column::VT_INDEX, index, 0);
1520    }
1521    #[inline]
1522    pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
1523        self.fbb_
1524            .push_slot_always::<flatbuffers::WIPOffset<_>>(Column::VT_NAME, name);
1525    }
1526    #[inline]
1527    pub fn add_type_(&mut self, type_: ColumnType) {
1528        self.fbb_
1529            .push_slot::<ColumnType>(Column::VT_TYPE_, type_, ColumnType::Byte);
1530    }
1531    #[inline]
1532    pub fn add_title(&mut self, title: flatbuffers::WIPOffset<&'b str>) {
1533        self.fbb_
1534            .push_slot_always::<flatbuffers::WIPOffset<_>>(Column::VT_TITLE, title);
1535    }
1536    #[inline]
1537    pub fn add_description(&mut self, description: flatbuffers::WIPOffset<&'b str>) {
1538        self.fbb_
1539            .push_slot_always::<flatbuffers::WIPOffset<_>>(Column::VT_DESCRIPTION, description);
1540    }
1541    #[inline]
1542    pub fn add_precision(&mut self, precision: i32) {
1543        self.fbb_
1544            .push_slot::<i32>(Column::VT_PRECISION, precision, -1);
1545    }
1546    #[inline]
1547    pub fn add_scale(&mut self, scale: i32) {
1548        self.fbb_.push_slot::<i32>(Column::VT_SCALE, scale, -1);
1549    }
1550    #[inline]
1551    pub fn add_nullable(&mut self, nullable: bool) {
1552        self.fbb_
1553            .push_slot::<bool>(Column::VT_NULLABLE, nullable, true);
1554    }
1555    #[inline]
1556    pub fn add_unique(&mut self, unique: bool) {
1557        self.fbb_
1558            .push_slot::<bool>(Column::VT_UNIQUE, unique, false);
1559    }
1560    #[inline]
1561    pub fn add_primary_key(&mut self, primary_key: bool) {
1562        self.fbb_
1563            .push_slot::<bool>(Column::VT_PRIMARY_KEY, primary_key, false);
1564    }
1565    #[inline]
1566    pub fn add_metadata(&mut self, metadata: flatbuffers::WIPOffset<&'b str>) {
1567        self.fbb_
1568            .push_slot_always::<flatbuffers::WIPOffset<_>>(Column::VT_METADATA, metadata);
1569    }
1570    #[inline]
1571    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ColumnBuilder<'a, 'b, A> {
1572        let start = _fbb.start_table();
1573        ColumnBuilder {
1574            fbb_: _fbb,
1575            start_: start,
1576        }
1577    }
1578    #[inline]
1579    pub fn finish(self) -> flatbuffers::WIPOffset<Column<'a>> {
1580        let o = self.fbb_.end_table(self.start_);
1581        self.fbb_.required(o, Column::VT_NAME, "name");
1582        flatbuffers::WIPOffset::new(o.value())
1583    }
1584}
1585
1586impl core::fmt::Debug for Column<'_> {
1587    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1588        let mut ds = f.debug_struct("Column");
1589        ds.field("index", &self.index());
1590        ds.field("name", &self.name());
1591        ds.field("type_", &self.type_());
1592        ds.field("title", &self.title());
1593        ds.field("description", &self.description());
1594        ds.field("precision", &self.precision());
1595        ds.field("scale", &self.scale());
1596        ds.field("nullable", &self.nullable());
1597        ds.field("unique", &self.unique());
1598        ds.field("primary_key", &self.primary_key());
1599        ds.field("metadata", &self.metadata());
1600        ds.finish()
1601    }
1602}
1603pub enum ReferenceSystemOffset {}
1604#[derive(Copy, Clone, PartialEq)]
1605
1606pub struct ReferenceSystem<'a> {
1607    pub _tab: flatbuffers::Table<'a>,
1608}
1609
1610impl<'a> flatbuffers::Follow<'a> for ReferenceSystem<'a> {
1611    type Inner = ReferenceSystem<'a>;
1612    #[inline]
1613    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1614        Self {
1615            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
1616        }
1617    }
1618}
1619
1620impl<'a> ReferenceSystem<'a> {
1621    pub const VT_AUTHORITY: flatbuffers::VOffsetT = 4;
1622    pub const VT_VERSION: flatbuffers::VOffsetT = 6;
1623    pub const VT_CODE: flatbuffers::VOffsetT = 8;
1624    pub const VT_CODE_STRING: flatbuffers::VOffsetT = 10;
1625
1626    #[inline]
1627    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1628        ReferenceSystem { _tab: table }
1629    }
1630    #[allow(unused_mut)]
1631    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1632        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1633        args: &'args ReferenceSystemArgs<'args>,
1634    ) -> flatbuffers::WIPOffset<ReferenceSystem<'bldr>> {
1635        let mut builder = ReferenceSystemBuilder::new(_fbb);
1636        if let Some(x) = args.code_string {
1637            builder.add_code_string(x);
1638        }
1639        builder.add_code(args.code);
1640        builder.add_version(args.version);
1641        if let Some(x) = args.authority {
1642            builder.add_authority(x);
1643        }
1644        builder.finish()
1645    }
1646
1647    #[inline]
1648    pub fn authority(&self) -> Option<&'a str> {
1649        // Safety:
1650        // Created from valid Table for this object
1651        // which contains a valid value in this slot
1652        unsafe {
1653            self._tab
1654                .get::<flatbuffers::ForwardsUOffset<&str>>(ReferenceSystem::VT_AUTHORITY, None)
1655        }
1656    }
1657    #[inline]
1658    pub fn version(&self) -> i32 {
1659        // Safety:
1660        // Created from valid Table for this object
1661        // which contains a valid value in this slot
1662        unsafe {
1663            self._tab
1664                .get::<i32>(ReferenceSystem::VT_VERSION, Some(0))
1665                .unwrap()
1666        }
1667    }
1668    #[inline]
1669    pub fn code(&self) -> i32 {
1670        // Safety:
1671        // Created from valid Table for this object
1672        // which contains a valid value in this slot
1673        unsafe {
1674            self._tab
1675                .get::<i32>(ReferenceSystem::VT_CODE, Some(0))
1676                .unwrap()
1677        }
1678    }
1679    #[inline]
1680    pub fn code_string(&self) -> Option<&'a str> {
1681        // Safety:
1682        // Created from valid Table for this object
1683        // which contains a valid value in this slot
1684        unsafe {
1685            self._tab
1686                .get::<flatbuffers::ForwardsUOffset<&str>>(ReferenceSystem::VT_CODE_STRING, None)
1687        }
1688    }
1689}
1690
1691impl flatbuffers::Verifiable for ReferenceSystem<'_> {
1692    #[inline]
1693    fn run_verifier(
1694        v: &mut flatbuffers::Verifier,
1695        pos: usize,
1696    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1697        use self::flatbuffers::Verifiable;
1698        v.visit_table(pos)?
1699            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
1700                "authority",
1701                Self::VT_AUTHORITY,
1702                false,
1703            )?
1704            .visit_field::<i32>("version", Self::VT_VERSION, false)?
1705            .visit_field::<i32>("code", Self::VT_CODE, false)?
1706            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
1707                "code_string",
1708                Self::VT_CODE_STRING,
1709                false,
1710            )?
1711            .finish();
1712        Ok(())
1713    }
1714}
1715pub struct ReferenceSystemArgs<'a> {
1716    pub authority: Option<flatbuffers::WIPOffset<&'a str>>,
1717    pub version: i32,
1718    pub code: i32,
1719    pub code_string: Option<flatbuffers::WIPOffset<&'a str>>,
1720}
1721impl<'a> Default for ReferenceSystemArgs<'a> {
1722    #[inline]
1723    fn default() -> Self {
1724        ReferenceSystemArgs {
1725            authority: None,
1726            version: 0,
1727            code: 0,
1728            code_string: None,
1729        }
1730    }
1731}
1732
1733pub struct ReferenceSystemBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1734    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1735    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1736}
1737impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ReferenceSystemBuilder<'a, 'b, A> {
1738    #[inline]
1739    pub fn add_authority(&mut self, authority: flatbuffers::WIPOffset<&'b str>) {
1740        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1741            ReferenceSystem::VT_AUTHORITY,
1742            authority,
1743        );
1744    }
1745    #[inline]
1746    pub fn add_version(&mut self, version: i32) {
1747        self.fbb_
1748            .push_slot::<i32>(ReferenceSystem::VT_VERSION, version, 0);
1749    }
1750    #[inline]
1751    pub fn add_code(&mut self, code: i32) {
1752        self.fbb_
1753            .push_slot::<i32>(ReferenceSystem::VT_CODE, code, 0);
1754    }
1755    #[inline]
1756    pub fn add_code_string(&mut self, code_string: flatbuffers::WIPOffset<&'b str>) {
1757        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1758            ReferenceSystem::VT_CODE_STRING,
1759            code_string,
1760        );
1761    }
1762    #[inline]
1763    pub fn new(
1764        _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1765    ) -> ReferenceSystemBuilder<'a, 'b, A> {
1766        let start = _fbb.start_table();
1767        ReferenceSystemBuilder {
1768            fbb_: _fbb,
1769            start_: start,
1770        }
1771    }
1772    #[inline]
1773    pub fn finish(self) -> flatbuffers::WIPOffset<ReferenceSystem<'a>> {
1774        let o = self.fbb_.end_table(self.start_);
1775        flatbuffers::WIPOffset::new(o.value())
1776    }
1777}
1778
1779impl core::fmt::Debug for ReferenceSystem<'_> {
1780    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1781        let mut ds = f.debug_struct("ReferenceSystem");
1782        ds.field("authority", &self.authority());
1783        ds.field("version", &self.version());
1784        ds.field("code", &self.code());
1785        ds.field("code_string", &self.code_string());
1786        ds.finish()
1787    }
1788}
1789pub enum MaterialOffset {}
1790#[derive(Copy, Clone, PartialEq)]
1791
1792pub struct Material<'a> {
1793    pub _tab: flatbuffers::Table<'a>,
1794}
1795
1796impl<'a> flatbuffers::Follow<'a> for Material<'a> {
1797    type Inner = Material<'a>;
1798    #[inline]
1799    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1800        Self {
1801            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
1802        }
1803    }
1804}
1805
1806impl<'a> Material<'a> {
1807    pub const VT_NAME: flatbuffers::VOffsetT = 4;
1808    pub const VT_AMBIENT_INTENSITY: flatbuffers::VOffsetT = 6;
1809    pub const VT_DIFFUSE_COLOR: flatbuffers::VOffsetT = 8;
1810    pub const VT_EMISSIVE_COLOR: flatbuffers::VOffsetT = 10;
1811    pub const VT_SPECULAR_COLOR: flatbuffers::VOffsetT = 12;
1812    pub const VT_SHININESS: flatbuffers::VOffsetT = 14;
1813    pub const VT_TRANSPARENCY: flatbuffers::VOffsetT = 16;
1814    pub const VT_IS_SMOOTH: flatbuffers::VOffsetT = 18;
1815
1816    #[inline]
1817    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1818        Material { _tab: table }
1819    }
1820    #[allow(unused_mut)]
1821    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1822        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1823        args: &'args MaterialArgs<'args>,
1824    ) -> flatbuffers::WIPOffset<Material<'bldr>> {
1825        let mut builder = MaterialBuilder::new(_fbb);
1826        if let Some(x) = args.transparency {
1827            builder.add_transparency(x);
1828        }
1829        if let Some(x) = args.shininess {
1830            builder.add_shininess(x);
1831        }
1832        if let Some(x) = args.ambient_intensity {
1833            builder.add_ambient_intensity(x);
1834        }
1835        if let Some(x) = args.specular_color {
1836            builder.add_specular_color(x);
1837        }
1838        if let Some(x) = args.emissive_color {
1839            builder.add_emissive_color(x);
1840        }
1841        if let Some(x) = args.diffuse_color {
1842            builder.add_diffuse_color(x);
1843        }
1844        if let Some(x) = args.name {
1845            builder.add_name(x);
1846        }
1847        if let Some(x) = args.is_smooth {
1848            builder.add_is_smooth(x);
1849        }
1850        builder.finish()
1851    }
1852
1853    #[inline]
1854    pub fn name(&self) -> &'a str {
1855        // Safety:
1856        // Created from valid Table for this object
1857        // which contains a valid value in this slot
1858        unsafe {
1859            self._tab
1860                .get::<flatbuffers::ForwardsUOffset<&str>>(Material::VT_NAME, None)
1861                .unwrap()
1862        }
1863    }
1864    #[inline]
1865    pub fn ambient_intensity(&self) -> Option<f64> {
1866        // Safety:
1867        // Created from valid Table for this object
1868        // which contains a valid value in this slot
1869        unsafe { self._tab.get::<f64>(Material::VT_AMBIENT_INTENSITY, None) }
1870    }
1871    #[inline]
1872    pub fn diffuse_color(&self) -> Option<flatbuffers::Vector<'a, f64>> {
1873        // Safety:
1874        // Created from valid Table for this object
1875        // which contains a valid value in this slot
1876        unsafe {
1877            self._tab
1878                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f64>>>(
1879                    Material::VT_DIFFUSE_COLOR,
1880                    None,
1881                )
1882        }
1883    }
1884    #[inline]
1885    pub fn emissive_color(&self) -> Option<flatbuffers::Vector<'a, f64>> {
1886        // Safety:
1887        // Created from valid Table for this object
1888        // which contains a valid value in this slot
1889        unsafe {
1890            self._tab
1891                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f64>>>(
1892                    Material::VT_EMISSIVE_COLOR,
1893                    None,
1894                )
1895        }
1896    }
1897    #[inline]
1898    pub fn specular_color(&self) -> Option<flatbuffers::Vector<'a, f64>> {
1899        // Safety:
1900        // Created from valid Table for this object
1901        // which contains a valid value in this slot
1902        unsafe {
1903            self._tab
1904                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f64>>>(
1905                    Material::VT_SPECULAR_COLOR,
1906                    None,
1907                )
1908        }
1909    }
1910    #[inline]
1911    pub fn shininess(&self) -> Option<f64> {
1912        // Safety:
1913        // Created from valid Table for this object
1914        // which contains a valid value in this slot
1915        unsafe { self._tab.get::<f64>(Material::VT_SHININESS, None) }
1916    }
1917    #[inline]
1918    pub fn transparency(&self) -> Option<f64> {
1919        // Safety:
1920        // Created from valid Table for this object
1921        // which contains a valid value in this slot
1922        unsafe { self._tab.get::<f64>(Material::VT_TRANSPARENCY, None) }
1923    }
1924    #[inline]
1925    pub fn is_smooth(&self) -> Option<bool> {
1926        // Safety:
1927        // Created from valid Table for this object
1928        // which contains a valid value in this slot
1929        unsafe { self._tab.get::<bool>(Material::VT_IS_SMOOTH, None) }
1930    }
1931}
1932
1933impl flatbuffers::Verifiable for Material<'_> {
1934    #[inline]
1935    fn run_verifier(
1936        v: &mut flatbuffers::Verifier,
1937        pos: usize,
1938    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1939        use self::flatbuffers::Verifiable;
1940        v.visit_table(pos)?
1941            .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
1942            .visit_field::<f64>("ambient_intensity", Self::VT_AMBIENT_INTENSITY, false)?
1943            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f64>>>(
1944                "diffuse_color",
1945                Self::VT_DIFFUSE_COLOR,
1946                false,
1947            )?
1948            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f64>>>(
1949                "emissive_color",
1950                Self::VT_EMISSIVE_COLOR,
1951                false,
1952            )?
1953            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f64>>>(
1954                "specular_color",
1955                Self::VT_SPECULAR_COLOR,
1956                false,
1957            )?
1958            .visit_field::<f64>("shininess", Self::VT_SHININESS, false)?
1959            .visit_field::<f64>("transparency", Self::VT_TRANSPARENCY, false)?
1960            .visit_field::<bool>("is_smooth", Self::VT_IS_SMOOTH, false)?
1961            .finish();
1962        Ok(())
1963    }
1964}
1965pub struct MaterialArgs<'a> {
1966    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
1967    pub ambient_intensity: Option<f64>,
1968    pub diffuse_color: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f64>>>,
1969    pub emissive_color: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f64>>>,
1970    pub specular_color: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f64>>>,
1971    pub shininess: Option<f64>,
1972    pub transparency: Option<f64>,
1973    pub is_smooth: Option<bool>,
1974}
1975impl<'a> Default for MaterialArgs<'a> {
1976    #[inline]
1977    fn default() -> Self {
1978        MaterialArgs {
1979            name: None, // required field
1980            ambient_intensity: None,
1981            diffuse_color: None,
1982            emissive_color: None,
1983            specular_color: None,
1984            shininess: None,
1985            transparency: None,
1986            is_smooth: None,
1987        }
1988    }
1989}
1990
1991pub struct MaterialBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1992    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1993    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1994}
1995impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MaterialBuilder<'a, 'b, A> {
1996    #[inline]
1997    pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
1998        self.fbb_
1999            .push_slot_always::<flatbuffers::WIPOffset<_>>(Material::VT_NAME, name);
2000    }
2001    #[inline]
2002    pub fn add_ambient_intensity(&mut self, ambient_intensity: f64) {
2003        self.fbb_
2004            .push_slot_always::<f64>(Material::VT_AMBIENT_INTENSITY, ambient_intensity);
2005    }
2006    #[inline]
2007    pub fn add_diffuse_color(
2008        &mut self,
2009        diffuse_color: flatbuffers::WIPOffset<flatbuffers::Vector<'b, f64>>,
2010    ) {
2011        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2012            Material::VT_DIFFUSE_COLOR,
2013            diffuse_color,
2014        );
2015    }
2016    #[inline]
2017    pub fn add_emissive_color(
2018        &mut self,
2019        emissive_color: flatbuffers::WIPOffset<flatbuffers::Vector<'b, f64>>,
2020    ) {
2021        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2022            Material::VT_EMISSIVE_COLOR,
2023            emissive_color,
2024        );
2025    }
2026    #[inline]
2027    pub fn add_specular_color(
2028        &mut self,
2029        specular_color: flatbuffers::WIPOffset<flatbuffers::Vector<'b, f64>>,
2030    ) {
2031        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2032            Material::VT_SPECULAR_COLOR,
2033            specular_color,
2034        );
2035    }
2036    #[inline]
2037    pub fn add_shininess(&mut self, shininess: f64) {
2038        self.fbb_
2039            .push_slot_always::<f64>(Material::VT_SHININESS, shininess);
2040    }
2041    #[inline]
2042    pub fn add_transparency(&mut self, transparency: f64) {
2043        self.fbb_
2044            .push_slot_always::<f64>(Material::VT_TRANSPARENCY, transparency);
2045    }
2046    #[inline]
2047    pub fn add_is_smooth(&mut self, is_smooth: bool) {
2048        self.fbb_
2049            .push_slot_always::<bool>(Material::VT_IS_SMOOTH, is_smooth);
2050    }
2051    #[inline]
2052    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MaterialBuilder<'a, 'b, A> {
2053        let start = _fbb.start_table();
2054        MaterialBuilder {
2055            fbb_: _fbb,
2056            start_: start,
2057        }
2058    }
2059    #[inline]
2060    pub fn finish(self) -> flatbuffers::WIPOffset<Material<'a>> {
2061        let o = self.fbb_.end_table(self.start_);
2062        self.fbb_.required(o, Material::VT_NAME, "name");
2063        flatbuffers::WIPOffset::new(o.value())
2064    }
2065}
2066
2067impl core::fmt::Debug for Material<'_> {
2068    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2069        let mut ds = f.debug_struct("Material");
2070        ds.field("name", &self.name());
2071        ds.field("ambient_intensity", &self.ambient_intensity());
2072        ds.field("diffuse_color", &self.diffuse_color());
2073        ds.field("emissive_color", &self.emissive_color());
2074        ds.field("specular_color", &self.specular_color());
2075        ds.field("shininess", &self.shininess());
2076        ds.field("transparency", &self.transparency());
2077        ds.field("is_smooth", &self.is_smooth());
2078        ds.finish()
2079    }
2080}
2081pub enum TextureOffset {}
2082#[derive(Copy, Clone, PartialEq)]
2083
2084pub struct Texture<'a> {
2085    pub _tab: flatbuffers::Table<'a>,
2086}
2087
2088impl<'a> flatbuffers::Follow<'a> for Texture<'a> {
2089    type Inner = Texture<'a>;
2090    #[inline]
2091    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2092        Self {
2093            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
2094        }
2095    }
2096}
2097
2098impl<'a> Texture<'a> {
2099    pub const VT_TYPE_: flatbuffers::VOffsetT = 4;
2100    pub const VT_IMAGE: flatbuffers::VOffsetT = 6;
2101    pub const VT_WRAP_MODE: flatbuffers::VOffsetT = 8;
2102    pub const VT_TEXTURE_TYPE: flatbuffers::VOffsetT = 10;
2103    pub const VT_BORDER_COLOR: flatbuffers::VOffsetT = 12;
2104
2105    #[inline]
2106    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2107        Texture { _tab: table }
2108    }
2109    #[allow(unused_mut)]
2110    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2111        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2112        args: &'args TextureArgs<'args>,
2113    ) -> flatbuffers::WIPOffset<Texture<'bldr>> {
2114        let mut builder = TextureBuilder::new(_fbb);
2115        if let Some(x) = args.border_color {
2116            builder.add_border_color(x);
2117        }
2118        if let Some(x) = args.image {
2119            builder.add_image(x);
2120        }
2121        if let Some(x) = args.texture_type {
2122            builder.add_texture_type(x);
2123        }
2124        if let Some(x) = args.wrap_mode {
2125            builder.add_wrap_mode(x);
2126        }
2127        builder.add_type_(args.type_);
2128        builder.finish()
2129    }
2130
2131    #[inline]
2132    pub fn type_(&self) -> TextureFormat {
2133        // Safety:
2134        // Created from valid Table for this object
2135        // which contains a valid value in this slot
2136        unsafe {
2137            self._tab
2138                .get::<TextureFormat>(Texture::VT_TYPE_, Some(TextureFormat::PNG))
2139                .unwrap()
2140        }
2141    }
2142    #[inline]
2143    pub fn image(&self) -> &'a str {
2144        // Safety:
2145        // Created from valid Table for this object
2146        // which contains a valid value in this slot
2147        unsafe {
2148            self._tab
2149                .get::<flatbuffers::ForwardsUOffset<&str>>(Texture::VT_IMAGE, None)
2150                .unwrap()
2151        }
2152    }
2153    #[inline]
2154    pub fn wrap_mode(&self) -> Option<WrapMode> {
2155        // Safety:
2156        // Created from valid Table for this object
2157        // which contains a valid value in this slot
2158        unsafe { self._tab.get::<WrapMode>(Texture::VT_WRAP_MODE, None) }
2159    }
2160    #[inline]
2161    pub fn texture_type(&self) -> Option<TextureType> {
2162        // Safety:
2163        // Created from valid Table for this object
2164        // which contains a valid value in this slot
2165        unsafe { self._tab.get::<TextureType>(Texture::VT_TEXTURE_TYPE, None) }
2166    }
2167    #[inline]
2168    pub fn border_color(&self) -> Option<flatbuffers::Vector<'a, f64>> {
2169        // Safety:
2170        // Created from valid Table for this object
2171        // which contains a valid value in this slot
2172        unsafe {
2173            self._tab
2174                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f64>>>(
2175                    Texture::VT_BORDER_COLOR,
2176                    None,
2177                )
2178        }
2179    }
2180}
2181
2182impl flatbuffers::Verifiable for Texture<'_> {
2183    #[inline]
2184    fn run_verifier(
2185        v: &mut flatbuffers::Verifier,
2186        pos: usize,
2187    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2188        use self::flatbuffers::Verifiable;
2189        v.visit_table(pos)?
2190            .visit_field::<TextureFormat>("type_", Self::VT_TYPE_, false)?
2191            .visit_field::<flatbuffers::ForwardsUOffset<&str>>("image", Self::VT_IMAGE, true)?
2192            .visit_field::<WrapMode>("wrap_mode", Self::VT_WRAP_MODE, false)?
2193            .visit_field::<TextureType>("texture_type", Self::VT_TEXTURE_TYPE, false)?
2194            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f64>>>(
2195                "border_color",
2196                Self::VT_BORDER_COLOR,
2197                false,
2198            )?
2199            .finish();
2200        Ok(())
2201    }
2202}
2203pub struct TextureArgs<'a> {
2204    pub type_: TextureFormat,
2205    pub image: Option<flatbuffers::WIPOffset<&'a str>>,
2206    pub wrap_mode: Option<WrapMode>,
2207    pub texture_type: Option<TextureType>,
2208    pub border_color: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f64>>>,
2209}
2210impl<'a> Default for TextureArgs<'a> {
2211    #[inline]
2212    fn default() -> Self {
2213        TextureArgs {
2214            type_: TextureFormat::PNG,
2215            image: None, // required field
2216            wrap_mode: None,
2217            texture_type: None,
2218            border_color: None,
2219        }
2220    }
2221}
2222
2223pub struct TextureBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2224    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2225    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2226}
2227impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TextureBuilder<'a, 'b, A> {
2228    #[inline]
2229    pub fn add_type_(&mut self, type_: TextureFormat) {
2230        self.fbb_
2231            .push_slot::<TextureFormat>(Texture::VT_TYPE_, type_, TextureFormat::PNG);
2232    }
2233    #[inline]
2234    pub fn add_image(&mut self, image: flatbuffers::WIPOffset<&'b str>) {
2235        self.fbb_
2236            .push_slot_always::<flatbuffers::WIPOffset<_>>(Texture::VT_IMAGE, image);
2237    }
2238    #[inline]
2239    pub fn add_wrap_mode(&mut self, wrap_mode: WrapMode) {
2240        self.fbb_
2241            .push_slot_always::<WrapMode>(Texture::VT_WRAP_MODE, wrap_mode);
2242    }
2243    #[inline]
2244    pub fn add_texture_type(&mut self, texture_type: TextureType) {
2245        self.fbb_
2246            .push_slot_always::<TextureType>(Texture::VT_TEXTURE_TYPE, texture_type);
2247    }
2248    #[inline]
2249    pub fn add_border_color(
2250        &mut self,
2251        border_color: flatbuffers::WIPOffset<flatbuffers::Vector<'b, f64>>,
2252    ) {
2253        self.fbb_
2254            .push_slot_always::<flatbuffers::WIPOffset<_>>(Texture::VT_BORDER_COLOR, border_color);
2255    }
2256    #[inline]
2257    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TextureBuilder<'a, 'b, A> {
2258        let start = _fbb.start_table();
2259        TextureBuilder {
2260            fbb_: _fbb,
2261            start_: start,
2262        }
2263    }
2264    #[inline]
2265    pub fn finish(self) -> flatbuffers::WIPOffset<Texture<'a>> {
2266        let o = self.fbb_.end_table(self.start_);
2267        self.fbb_.required(o, Texture::VT_IMAGE, "image");
2268        flatbuffers::WIPOffset::new(o.value())
2269    }
2270}
2271
2272impl core::fmt::Debug for Texture<'_> {
2273    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2274        let mut ds = f.debug_struct("Texture");
2275        ds.field("type_", &self.type_());
2276        ds.field("image", &self.image());
2277        ds.field("wrap_mode", &self.wrap_mode());
2278        ds.field("texture_type", &self.texture_type());
2279        ds.field("border_color", &self.border_color());
2280        ds.finish()
2281    }
2282}
2283pub enum AppearanceOffset {}
2284#[derive(Copy, Clone, PartialEq)]
2285
2286pub struct Appearance<'a> {
2287    pub _tab: flatbuffers::Table<'a>,
2288}
2289
2290impl<'a> flatbuffers::Follow<'a> for Appearance<'a> {
2291    type Inner = Appearance<'a>;
2292    #[inline]
2293    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2294        Self {
2295            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
2296        }
2297    }
2298}
2299
2300impl<'a> Appearance<'a> {
2301    pub const VT_MATERIALS: flatbuffers::VOffsetT = 4;
2302    pub const VT_TEXTURES: flatbuffers::VOffsetT = 6;
2303    pub const VT_VERTICES_TEXTURE: flatbuffers::VOffsetT = 8;
2304    pub const VT_DEFAULT_THEME_TEXTURE: flatbuffers::VOffsetT = 10;
2305    pub const VT_DEFAULT_THEME_MATERIAL: flatbuffers::VOffsetT = 12;
2306
2307    #[inline]
2308    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2309        Appearance { _tab: table }
2310    }
2311    #[allow(unused_mut)]
2312    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2313        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2314        args: &'args AppearanceArgs<'args>,
2315    ) -> flatbuffers::WIPOffset<Appearance<'bldr>> {
2316        let mut builder = AppearanceBuilder::new(_fbb);
2317        if let Some(x) = args.default_theme_material {
2318            builder.add_default_theme_material(x);
2319        }
2320        if let Some(x) = args.default_theme_texture {
2321            builder.add_default_theme_texture(x);
2322        }
2323        if let Some(x) = args.vertices_texture {
2324            builder.add_vertices_texture(x);
2325        }
2326        if let Some(x) = args.textures {
2327            builder.add_textures(x);
2328        }
2329        if let Some(x) = args.materials {
2330            builder.add_materials(x);
2331        }
2332        builder.finish()
2333    }
2334
2335    #[inline]
2336    pub fn materials(
2337        &self,
2338    ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Material<'a>>>> {
2339        // Safety:
2340        // Created from valid Table for this object
2341        // which contains a valid value in this slot
2342        unsafe {
2343            self._tab.get::<flatbuffers::ForwardsUOffset<
2344                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Material>>,
2345            >>(Appearance::VT_MATERIALS, None)
2346        }
2347    }
2348    #[inline]
2349    pub fn textures(
2350        &self,
2351    ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Texture<'a>>>> {
2352        // Safety:
2353        // Created from valid Table for this object
2354        // which contains a valid value in this slot
2355        unsafe {
2356            self._tab.get::<flatbuffers::ForwardsUOffset<
2357                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Texture>>,
2358            >>(Appearance::VT_TEXTURES, None)
2359        }
2360    }
2361    #[inline]
2362    pub fn vertices_texture(&self) -> Option<flatbuffers::Vector<'a, Vec2>> {
2363        // Safety:
2364        // Created from valid Table for this object
2365        // which contains a valid value in this slot
2366        unsafe {
2367            self._tab
2368                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, Vec2>>>(
2369                    Appearance::VT_VERTICES_TEXTURE,
2370                    None,
2371                )
2372        }
2373    }
2374    #[inline]
2375    pub fn default_theme_texture(&self) -> Option<&'a str> {
2376        // Safety:
2377        // Created from valid Table for this object
2378        // which contains a valid value in this slot
2379        unsafe {
2380            self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(
2381                Appearance::VT_DEFAULT_THEME_TEXTURE,
2382                None,
2383            )
2384        }
2385    }
2386    #[inline]
2387    pub fn default_theme_material(&self) -> Option<&'a str> {
2388        // Safety:
2389        // Created from valid Table for this object
2390        // which contains a valid value in this slot
2391        unsafe {
2392            self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(
2393                Appearance::VT_DEFAULT_THEME_MATERIAL,
2394                None,
2395            )
2396        }
2397    }
2398}
2399
2400impl flatbuffers::Verifiable for Appearance<'_> {
2401    #[inline]
2402    fn run_verifier(
2403        v: &mut flatbuffers::Verifier,
2404        pos: usize,
2405    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2406        use self::flatbuffers::Verifiable;
2407        v.visit_table(pos)?
2408            .visit_field::<flatbuffers::ForwardsUOffset<
2409                flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Material>>,
2410            >>("materials", Self::VT_MATERIALS, false)?
2411            .visit_field::<flatbuffers::ForwardsUOffset<
2412                flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Texture>>,
2413            >>("textures", Self::VT_TEXTURES, false)?
2414            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, Vec2>>>(
2415                "vertices_texture",
2416                Self::VT_VERTICES_TEXTURE,
2417                false,
2418            )?
2419            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
2420                "default_theme_texture",
2421                Self::VT_DEFAULT_THEME_TEXTURE,
2422                false,
2423            )?
2424            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
2425                "default_theme_material",
2426                Self::VT_DEFAULT_THEME_MATERIAL,
2427                false,
2428            )?
2429            .finish();
2430        Ok(())
2431    }
2432}
2433pub struct AppearanceArgs<'a> {
2434    pub materials: Option<
2435        flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Material<'a>>>>,
2436    >,
2437    pub textures: Option<
2438        flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Texture<'a>>>>,
2439    >,
2440    pub vertices_texture: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, Vec2>>>,
2441    pub default_theme_texture: Option<flatbuffers::WIPOffset<&'a str>>,
2442    pub default_theme_material: Option<flatbuffers::WIPOffset<&'a str>>,
2443}
2444impl<'a> Default for AppearanceArgs<'a> {
2445    #[inline]
2446    fn default() -> Self {
2447        AppearanceArgs {
2448            materials: None,
2449            textures: None,
2450            vertices_texture: None,
2451            default_theme_texture: None,
2452            default_theme_material: None,
2453        }
2454    }
2455}
2456
2457pub struct AppearanceBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2458    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2459    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2460}
2461impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AppearanceBuilder<'a, 'b, A> {
2462    #[inline]
2463    pub fn add_materials(
2464        &mut self,
2465        materials: flatbuffers::WIPOffset<
2466            flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Material<'b>>>,
2467        >,
2468    ) {
2469        self.fbb_
2470            .push_slot_always::<flatbuffers::WIPOffset<_>>(Appearance::VT_MATERIALS, materials);
2471    }
2472    #[inline]
2473    pub fn add_textures(
2474        &mut self,
2475        textures: flatbuffers::WIPOffset<
2476            flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Texture<'b>>>,
2477        >,
2478    ) {
2479        self.fbb_
2480            .push_slot_always::<flatbuffers::WIPOffset<_>>(Appearance::VT_TEXTURES, textures);
2481    }
2482    #[inline]
2483    pub fn add_vertices_texture(
2484        &mut self,
2485        vertices_texture: flatbuffers::WIPOffset<flatbuffers::Vector<'b, Vec2>>,
2486    ) {
2487        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2488            Appearance::VT_VERTICES_TEXTURE,
2489            vertices_texture,
2490        );
2491    }
2492    #[inline]
2493    pub fn add_default_theme_texture(
2494        &mut self,
2495        default_theme_texture: flatbuffers::WIPOffset<&'b str>,
2496    ) {
2497        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2498            Appearance::VT_DEFAULT_THEME_TEXTURE,
2499            default_theme_texture,
2500        );
2501    }
2502    #[inline]
2503    pub fn add_default_theme_material(
2504        &mut self,
2505        default_theme_material: flatbuffers::WIPOffset<&'b str>,
2506    ) {
2507        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2508            Appearance::VT_DEFAULT_THEME_MATERIAL,
2509            default_theme_material,
2510        );
2511    }
2512    #[inline]
2513    pub fn new(
2514        _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2515    ) -> AppearanceBuilder<'a, 'b, A> {
2516        let start = _fbb.start_table();
2517        AppearanceBuilder {
2518            fbb_: _fbb,
2519            start_: start,
2520        }
2521    }
2522    #[inline]
2523    pub fn finish(self) -> flatbuffers::WIPOffset<Appearance<'a>> {
2524        let o = self.fbb_.end_table(self.start_);
2525        flatbuffers::WIPOffset::new(o.value())
2526    }
2527}
2528
2529impl core::fmt::Debug for Appearance<'_> {
2530    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2531        let mut ds = f.debug_struct("Appearance");
2532        ds.field("materials", &self.materials());
2533        ds.field("textures", &self.textures());
2534        ds.field("vertices_texture", &self.vertices_texture());
2535        ds.field("default_theme_texture", &self.default_theme_texture());
2536        ds.field("default_theme_material", &self.default_theme_material());
2537        ds.finish()
2538    }
2539}
2540pub enum HeaderOffset {}
2541#[derive(Copy, Clone, PartialEq)]
2542
2543pub struct Header<'a> {
2544    pub _tab: flatbuffers::Table<'a>,
2545}
2546
2547impl<'a> flatbuffers::Follow<'a> for Header<'a> {
2548    type Inner = Header<'a>;
2549    #[inline]
2550    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2551        Self {
2552            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
2553        }
2554    }
2555}
2556
2557impl<'a> Header<'a> {
2558    pub const VT_TRANSFORM: flatbuffers::VOffsetT = 4;
2559    pub const VT_APPEARANCE: flatbuffers::VOffsetT = 6;
2560    pub const VT_COLUMNS: flatbuffers::VOffsetT = 8;
2561    pub const VT_SEMANTIC_COLUMNS: flatbuffers::VOffsetT = 10;
2562    pub const VT_FEATURES_COUNT: flatbuffers::VOffsetT = 12;
2563    pub const VT_INDEX_NODE_SIZE: flatbuffers::VOffsetT = 14;
2564    pub const VT_ATTRIBUTE_INDEX: flatbuffers::VOffsetT = 16;
2565    pub const VT_GEOGRAPHICAL_EXTENT: flatbuffers::VOffsetT = 18;
2566    pub const VT_REFERENCE_SYSTEM: flatbuffers::VOffsetT = 20;
2567    pub const VT_IDENTIFIER: flatbuffers::VOffsetT = 22;
2568    pub const VT_REFERENCE_DATE: flatbuffers::VOffsetT = 24;
2569    pub const VT_TITLE: flatbuffers::VOffsetT = 26;
2570    pub const VT_TEMPLATES: flatbuffers::VOffsetT = 28;
2571    pub const VT_TEMPLATES_VERTICES: flatbuffers::VOffsetT = 30;
2572    pub const VT_EXTENSIONS: flatbuffers::VOffsetT = 32;
2573    pub const VT_POC_CONTACT_NAME: flatbuffers::VOffsetT = 34;
2574    pub const VT_POC_CONTACT_TYPE: flatbuffers::VOffsetT = 36;
2575    pub const VT_POC_ROLE: flatbuffers::VOffsetT = 38;
2576    pub const VT_POC_PHONE: flatbuffers::VOffsetT = 40;
2577    pub const VT_POC_EMAIL: flatbuffers::VOffsetT = 42;
2578    pub const VT_POC_WEBSITE: flatbuffers::VOffsetT = 44;
2579    pub const VT_POC_ADDRESS_THOROUGHFARE_NUMBER: flatbuffers::VOffsetT = 46;
2580    pub const VT_POC_ADDRESS_THOROUGHFARE_NAME: flatbuffers::VOffsetT = 48;
2581    pub const VT_POC_ADDRESS_LOCALITY: flatbuffers::VOffsetT = 50;
2582    pub const VT_POC_ADDRESS_POSTCODE: flatbuffers::VOffsetT = 52;
2583    pub const VT_POC_ADDRESS_COUNTRY: flatbuffers::VOffsetT = 54;
2584    pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 56;
2585    pub const VT_VERSION: flatbuffers::VOffsetT = 58;
2586
2587    #[inline]
2588    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2589        Header { _tab: table }
2590    }
2591    #[allow(unused_mut)]
2592    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2593        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2594        args: &'args HeaderArgs<'args>,
2595    ) -> flatbuffers::WIPOffset<Header<'bldr>> {
2596        let mut builder = HeaderBuilder::new(_fbb);
2597        builder.add_features_count(args.features_count);
2598        if let Some(x) = args.version {
2599            builder.add_version(x);
2600        }
2601        if let Some(x) = args.attributes {
2602            builder.add_attributes(x);
2603        }
2604        if let Some(x) = args.poc_address_country {
2605            builder.add_poc_address_country(x);
2606        }
2607        if let Some(x) = args.poc_address_postcode {
2608            builder.add_poc_address_postcode(x);
2609        }
2610        if let Some(x) = args.poc_address_locality {
2611            builder.add_poc_address_locality(x);
2612        }
2613        if let Some(x) = args.poc_address_thoroughfare_name {
2614            builder.add_poc_address_thoroughfare_name(x);
2615        }
2616        if let Some(x) = args.poc_address_thoroughfare_number {
2617            builder.add_poc_address_thoroughfare_number(x);
2618        }
2619        if let Some(x) = args.poc_website {
2620            builder.add_poc_website(x);
2621        }
2622        if let Some(x) = args.poc_email {
2623            builder.add_poc_email(x);
2624        }
2625        if let Some(x) = args.poc_phone {
2626            builder.add_poc_phone(x);
2627        }
2628        if let Some(x) = args.poc_role {
2629            builder.add_poc_role(x);
2630        }
2631        if let Some(x) = args.poc_contact_type {
2632            builder.add_poc_contact_type(x);
2633        }
2634        if let Some(x) = args.poc_contact_name {
2635            builder.add_poc_contact_name(x);
2636        }
2637        if let Some(x) = args.extensions {
2638            builder.add_extensions(x);
2639        }
2640        if let Some(x) = args.templates_vertices {
2641            builder.add_templates_vertices(x);
2642        }
2643        if let Some(x) = args.templates {
2644            builder.add_templates(x);
2645        }
2646        if let Some(x) = args.title {
2647            builder.add_title(x);
2648        }
2649        if let Some(x) = args.reference_date {
2650            builder.add_reference_date(x);
2651        }
2652        if let Some(x) = args.identifier {
2653            builder.add_identifier(x);
2654        }
2655        if let Some(x) = args.reference_system {
2656            builder.add_reference_system(x);
2657        }
2658        if let Some(x) = args.geographical_extent {
2659            builder.add_geographical_extent(x);
2660        }
2661        if let Some(x) = args.attribute_index {
2662            builder.add_attribute_index(x);
2663        }
2664        if let Some(x) = args.semantic_columns {
2665            builder.add_semantic_columns(x);
2666        }
2667        if let Some(x) = args.columns {
2668            builder.add_columns(x);
2669        }
2670        if let Some(x) = args.appearance {
2671            builder.add_appearance(x);
2672        }
2673        if let Some(x) = args.transform {
2674            builder.add_transform(x);
2675        }
2676        builder.add_index_node_size(args.index_node_size);
2677        builder.finish()
2678    }
2679
2680    #[inline]
2681    pub fn transform(&self) -> Option<&'a Transform> {
2682        // Safety:
2683        // Created from valid Table for this object
2684        // which contains a valid value in this slot
2685        unsafe { self._tab.get::<Transform>(Header::VT_TRANSFORM, None) }
2686    }
2687    #[inline]
2688    pub fn appearance(&self) -> Option<Appearance<'a>> {
2689        // Safety:
2690        // Created from valid Table for this object
2691        // which contains a valid value in this slot
2692        unsafe {
2693            self._tab
2694                .get::<flatbuffers::ForwardsUOffset<Appearance>>(Header::VT_APPEARANCE, None)
2695        }
2696    }
2697    #[inline]
2698    pub fn columns(
2699        &self,
2700    ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Column<'a>>>> {
2701        // Safety:
2702        // Created from valid Table for this object
2703        // which contains a valid value in this slot
2704        unsafe {
2705            self._tab.get::<flatbuffers::ForwardsUOffset<
2706                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Column>>,
2707            >>(Header::VT_COLUMNS, None)
2708        }
2709    }
2710    #[inline]
2711    pub fn semantic_columns(
2712        &self,
2713    ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Column<'a>>>> {
2714        // Safety:
2715        // Created from valid Table for this object
2716        // which contains a valid value in this slot
2717        unsafe {
2718            self._tab.get::<flatbuffers::ForwardsUOffset<
2719                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Column>>,
2720            >>(Header::VT_SEMANTIC_COLUMNS, None)
2721        }
2722    }
2723    #[inline]
2724    pub fn features_count(&self) -> u64 {
2725        // Safety:
2726        // Created from valid Table for this object
2727        // which contains a valid value in this slot
2728        unsafe {
2729            self._tab
2730                .get::<u64>(Header::VT_FEATURES_COUNT, Some(0))
2731                .unwrap()
2732        }
2733    }
2734    #[inline]
2735    pub fn index_node_size(&self) -> u16 {
2736        // Safety:
2737        // Created from valid Table for this object
2738        // which contains a valid value in this slot
2739        unsafe {
2740            self._tab
2741                .get::<u16>(Header::VT_INDEX_NODE_SIZE, Some(16))
2742                .unwrap()
2743        }
2744    }
2745    #[inline]
2746    pub fn attribute_index(&self) -> Option<flatbuffers::Vector<'a, AttributeIndex>> {
2747        // Safety:
2748        // Created from valid Table for this object
2749        // which contains a valid value in this slot
2750        unsafe {
2751            self._tab
2752                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, AttributeIndex>>>(
2753                    Header::VT_ATTRIBUTE_INDEX,
2754                    None,
2755                )
2756        }
2757    }
2758    #[inline]
2759    pub fn geographical_extent(&self) -> Option<&'a GeographicalExtent> {
2760        // Safety:
2761        // Created from valid Table for this object
2762        // which contains a valid value in this slot
2763        unsafe {
2764            self._tab
2765                .get::<GeographicalExtent>(Header::VT_GEOGRAPHICAL_EXTENT, None)
2766        }
2767    }
2768    #[inline]
2769    pub fn reference_system(&self) -> Option<ReferenceSystem<'a>> {
2770        // Safety:
2771        // Created from valid Table for this object
2772        // which contains a valid value in this slot
2773        unsafe {
2774            self._tab
2775                .get::<flatbuffers::ForwardsUOffset<ReferenceSystem>>(
2776                    Header::VT_REFERENCE_SYSTEM,
2777                    None,
2778                )
2779        }
2780    }
2781    #[inline]
2782    pub fn identifier(&self) -> Option<&'a str> {
2783        // Safety:
2784        // Created from valid Table for this object
2785        // which contains a valid value in this slot
2786        unsafe {
2787            self._tab
2788                .get::<flatbuffers::ForwardsUOffset<&str>>(Header::VT_IDENTIFIER, None)
2789        }
2790    }
2791    #[inline]
2792    pub fn reference_date(&self) -> Option<&'a str> {
2793        // Safety:
2794        // Created from valid Table for this object
2795        // which contains a valid value in this slot
2796        unsafe {
2797            self._tab
2798                .get::<flatbuffers::ForwardsUOffset<&str>>(Header::VT_REFERENCE_DATE, None)
2799        }
2800    }
2801    #[inline]
2802    pub fn title(&self) -> Option<&'a str> {
2803        // Safety:
2804        // Created from valid Table for this object
2805        // which contains a valid value in this slot
2806        unsafe {
2807            self._tab
2808                .get::<flatbuffers::ForwardsUOffset<&str>>(Header::VT_TITLE, None)
2809        }
2810    }
2811    #[inline]
2812    pub fn templates(
2813        &self,
2814    ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Geometry<'a>>>> {
2815        // Safety:
2816        // Created from valid Table for this object
2817        // which contains a valid value in this slot
2818        unsafe {
2819            self._tab.get::<flatbuffers::ForwardsUOffset<
2820                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Geometry>>,
2821            >>(Header::VT_TEMPLATES, None)
2822        }
2823    }
2824    #[inline]
2825    pub fn templates_vertices(&self) -> Option<flatbuffers::Vector<'a, DoubleVertex>> {
2826        // Safety:
2827        // Created from valid Table for this object
2828        // which contains a valid value in this slot
2829        unsafe {
2830            self._tab
2831                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, DoubleVertex>>>(
2832                    Header::VT_TEMPLATES_VERTICES,
2833                    None,
2834                )
2835        }
2836    }
2837    #[inline]
2838    pub fn extensions(
2839        &self,
2840    ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Extension<'a>>>> {
2841        // Safety:
2842        // Created from valid Table for this object
2843        // which contains a valid value in this slot
2844        unsafe {
2845            self._tab.get::<flatbuffers::ForwardsUOffset<
2846                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Extension>>,
2847            >>(Header::VT_EXTENSIONS, None)
2848        }
2849    }
2850    #[inline]
2851    pub fn poc_contact_name(&self) -> Option<&'a str> {
2852        // Safety:
2853        // Created from valid Table for this object
2854        // which contains a valid value in this slot
2855        unsafe {
2856            self._tab
2857                .get::<flatbuffers::ForwardsUOffset<&str>>(Header::VT_POC_CONTACT_NAME, None)
2858        }
2859    }
2860    #[inline]
2861    pub fn poc_contact_type(&self) -> Option<&'a str> {
2862        // Safety:
2863        // Created from valid Table for this object
2864        // which contains a valid value in this slot
2865        unsafe {
2866            self._tab
2867                .get::<flatbuffers::ForwardsUOffset<&str>>(Header::VT_POC_CONTACT_TYPE, None)
2868        }
2869    }
2870    #[inline]
2871    pub fn poc_role(&self) -> Option<&'a str> {
2872        // Safety:
2873        // Created from valid Table for this object
2874        // which contains a valid value in this slot
2875        unsafe {
2876            self._tab
2877                .get::<flatbuffers::ForwardsUOffset<&str>>(Header::VT_POC_ROLE, None)
2878        }
2879    }
2880    #[inline]
2881    pub fn poc_phone(&self) -> Option<&'a str> {
2882        // Safety:
2883        // Created from valid Table for this object
2884        // which contains a valid value in this slot
2885        unsafe {
2886            self._tab
2887                .get::<flatbuffers::ForwardsUOffset<&str>>(Header::VT_POC_PHONE, None)
2888        }
2889    }
2890    #[inline]
2891    pub fn poc_email(&self) -> Option<&'a str> {
2892        // Safety:
2893        // Created from valid Table for this object
2894        // which contains a valid value in this slot
2895        unsafe {
2896            self._tab
2897                .get::<flatbuffers::ForwardsUOffset<&str>>(Header::VT_POC_EMAIL, None)
2898        }
2899    }
2900    #[inline]
2901    pub fn poc_website(&self) -> Option<&'a str> {
2902        // Safety:
2903        // Created from valid Table for this object
2904        // which contains a valid value in this slot
2905        unsafe {
2906            self._tab
2907                .get::<flatbuffers::ForwardsUOffset<&str>>(Header::VT_POC_WEBSITE, None)
2908        }
2909    }
2910    #[inline]
2911    pub fn poc_address_thoroughfare_number(&self) -> Option<&'a str> {
2912        // Safety:
2913        // Created from valid Table for this object
2914        // which contains a valid value in this slot
2915        unsafe {
2916            self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(
2917                Header::VT_POC_ADDRESS_THOROUGHFARE_NUMBER,
2918                None,
2919            )
2920        }
2921    }
2922    #[inline]
2923    pub fn poc_address_thoroughfare_name(&self) -> Option<&'a str> {
2924        // Safety:
2925        // Created from valid Table for this object
2926        // which contains a valid value in this slot
2927        unsafe {
2928            self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(
2929                Header::VT_POC_ADDRESS_THOROUGHFARE_NAME,
2930                None,
2931            )
2932        }
2933    }
2934    #[inline]
2935    pub fn poc_address_locality(&self) -> Option<&'a str> {
2936        // Safety:
2937        // Created from valid Table for this object
2938        // which contains a valid value in this slot
2939        unsafe {
2940            self._tab
2941                .get::<flatbuffers::ForwardsUOffset<&str>>(Header::VT_POC_ADDRESS_LOCALITY, None)
2942        }
2943    }
2944    #[inline]
2945    pub fn poc_address_postcode(&self) -> Option<&'a str> {
2946        // Safety:
2947        // Created from valid Table for this object
2948        // which contains a valid value in this slot
2949        unsafe {
2950            self._tab
2951                .get::<flatbuffers::ForwardsUOffset<&str>>(Header::VT_POC_ADDRESS_POSTCODE, None)
2952        }
2953    }
2954    #[inline]
2955    pub fn poc_address_country(&self) -> Option<&'a str> {
2956        // Safety:
2957        // Created from valid Table for this object
2958        // which contains a valid value in this slot
2959        unsafe {
2960            self._tab
2961                .get::<flatbuffers::ForwardsUOffset<&str>>(Header::VT_POC_ADDRESS_COUNTRY, None)
2962        }
2963    }
2964    #[inline]
2965    pub fn attributes(&self) -> Option<flatbuffers::Vector<'a, u8>> {
2966        // Safety:
2967        // Created from valid Table for this object
2968        // which contains a valid value in this slot
2969        unsafe {
2970            self._tab
2971                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
2972                    Header::VT_ATTRIBUTES,
2973                    None,
2974                )
2975        }
2976    }
2977    #[inline]
2978    pub fn version(&self) -> &'a str {
2979        // Safety:
2980        // Created from valid Table for this object
2981        // which contains a valid value in this slot
2982        unsafe {
2983            self._tab
2984                .get::<flatbuffers::ForwardsUOffset<&str>>(Header::VT_VERSION, None)
2985                .unwrap()
2986        }
2987    }
2988}
2989
2990impl flatbuffers::Verifiable for Header<'_> {
2991    #[inline]
2992    fn run_verifier(
2993        v: &mut flatbuffers::Verifier,
2994        pos: usize,
2995    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2996        use self::flatbuffers::Verifiable;
2997        v.visit_table(pos)?
2998            .visit_field::<Transform>("transform", Self::VT_TRANSFORM, false)?
2999            .visit_field::<flatbuffers::ForwardsUOffset<Appearance>>(
3000                "appearance",
3001                Self::VT_APPEARANCE,
3002                false,
3003            )?
3004            .visit_field::<flatbuffers::ForwardsUOffset<
3005                flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Column>>,
3006            >>("columns", Self::VT_COLUMNS, false)?
3007            .visit_field::<flatbuffers::ForwardsUOffset<
3008                flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Column>>,
3009            >>("semantic_columns", Self::VT_SEMANTIC_COLUMNS, false)?
3010            .visit_field::<u64>("features_count", Self::VT_FEATURES_COUNT, false)?
3011            .visit_field::<u16>("index_node_size", Self::VT_INDEX_NODE_SIZE, false)?
3012            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, AttributeIndex>>>(
3013                "attribute_index",
3014                Self::VT_ATTRIBUTE_INDEX,
3015                false,
3016            )?
3017            .visit_field::<GeographicalExtent>(
3018                "geographical_extent",
3019                Self::VT_GEOGRAPHICAL_EXTENT,
3020                false,
3021            )?
3022            .visit_field::<flatbuffers::ForwardsUOffset<ReferenceSystem>>(
3023                "reference_system",
3024                Self::VT_REFERENCE_SYSTEM,
3025                false,
3026            )?
3027            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3028                "identifier",
3029                Self::VT_IDENTIFIER,
3030                false,
3031            )?
3032            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3033                "reference_date",
3034                Self::VT_REFERENCE_DATE,
3035                false,
3036            )?
3037            .visit_field::<flatbuffers::ForwardsUOffset<&str>>("title", Self::VT_TITLE, false)?
3038            .visit_field::<flatbuffers::ForwardsUOffset<
3039                flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Geometry>>,
3040            >>("templates", Self::VT_TEMPLATES, false)?
3041            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, DoubleVertex>>>(
3042                "templates_vertices",
3043                Self::VT_TEMPLATES_VERTICES,
3044                false,
3045            )?
3046            .visit_field::<flatbuffers::ForwardsUOffset<
3047                flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Extension>>,
3048            >>("extensions", Self::VT_EXTENSIONS, false)?
3049            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3050                "poc_contact_name",
3051                Self::VT_POC_CONTACT_NAME,
3052                false,
3053            )?
3054            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3055                "poc_contact_type",
3056                Self::VT_POC_CONTACT_TYPE,
3057                false,
3058            )?
3059            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3060                "poc_role",
3061                Self::VT_POC_ROLE,
3062                false,
3063            )?
3064            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3065                "poc_phone",
3066                Self::VT_POC_PHONE,
3067                false,
3068            )?
3069            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3070                "poc_email",
3071                Self::VT_POC_EMAIL,
3072                false,
3073            )?
3074            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3075                "poc_website",
3076                Self::VT_POC_WEBSITE,
3077                false,
3078            )?
3079            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3080                "poc_address_thoroughfare_number",
3081                Self::VT_POC_ADDRESS_THOROUGHFARE_NUMBER,
3082                false,
3083            )?
3084            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3085                "poc_address_thoroughfare_name",
3086                Self::VT_POC_ADDRESS_THOROUGHFARE_NAME,
3087                false,
3088            )?
3089            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3090                "poc_address_locality",
3091                Self::VT_POC_ADDRESS_LOCALITY,
3092                false,
3093            )?
3094            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3095                "poc_address_postcode",
3096                Self::VT_POC_ADDRESS_POSTCODE,
3097                false,
3098            )?
3099            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3100                "poc_address_country",
3101                Self::VT_POC_ADDRESS_COUNTRY,
3102                false,
3103            )?
3104            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>(
3105                "attributes",
3106                Self::VT_ATTRIBUTES,
3107                false,
3108            )?
3109            .visit_field::<flatbuffers::ForwardsUOffset<&str>>("version", Self::VT_VERSION, true)?
3110            .finish();
3111        Ok(())
3112    }
3113}
3114pub struct HeaderArgs<'a> {
3115    pub transform: Option<&'a Transform>,
3116    pub appearance: Option<flatbuffers::WIPOffset<Appearance<'a>>>,
3117    pub columns: Option<
3118        flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Column<'a>>>>,
3119    >,
3120    pub semantic_columns: Option<
3121        flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Column<'a>>>>,
3122    >,
3123    pub features_count: u64,
3124    pub index_node_size: u16,
3125    pub attribute_index: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, AttributeIndex>>>,
3126    pub geographical_extent: Option<&'a GeographicalExtent>,
3127    pub reference_system: Option<flatbuffers::WIPOffset<ReferenceSystem<'a>>>,
3128    pub identifier: Option<flatbuffers::WIPOffset<&'a str>>,
3129    pub reference_date: Option<flatbuffers::WIPOffset<&'a str>>,
3130    pub title: Option<flatbuffers::WIPOffset<&'a str>>,
3131    pub templates: Option<
3132        flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Geometry<'a>>>>,
3133    >,
3134    pub templates_vertices: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, DoubleVertex>>>,
3135    pub extensions: Option<
3136        flatbuffers::WIPOffset<
3137            flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Extension<'a>>>,
3138        >,
3139    >,
3140    pub poc_contact_name: Option<flatbuffers::WIPOffset<&'a str>>,
3141    pub poc_contact_type: Option<flatbuffers::WIPOffset<&'a str>>,
3142    pub poc_role: Option<flatbuffers::WIPOffset<&'a str>>,
3143    pub poc_phone: Option<flatbuffers::WIPOffset<&'a str>>,
3144    pub poc_email: Option<flatbuffers::WIPOffset<&'a str>>,
3145    pub poc_website: Option<flatbuffers::WIPOffset<&'a str>>,
3146    pub poc_address_thoroughfare_number: Option<flatbuffers::WIPOffset<&'a str>>,
3147    pub poc_address_thoroughfare_name: Option<flatbuffers::WIPOffset<&'a str>>,
3148    pub poc_address_locality: Option<flatbuffers::WIPOffset<&'a str>>,
3149    pub poc_address_postcode: Option<flatbuffers::WIPOffset<&'a str>>,
3150    pub poc_address_country: Option<flatbuffers::WIPOffset<&'a str>>,
3151    pub attributes: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
3152    pub version: Option<flatbuffers::WIPOffset<&'a str>>,
3153}
3154impl<'a> Default for HeaderArgs<'a> {
3155    #[inline]
3156    fn default() -> Self {
3157        HeaderArgs {
3158            transform: None,
3159            appearance: None,
3160            columns: None,
3161            semantic_columns: None,
3162            features_count: 0,
3163            index_node_size: 16,
3164            attribute_index: None,
3165            geographical_extent: None,
3166            reference_system: None,
3167            identifier: None,
3168            reference_date: None,
3169            title: None,
3170            templates: None,
3171            templates_vertices: None,
3172            extensions: None,
3173            poc_contact_name: None,
3174            poc_contact_type: None,
3175            poc_role: None,
3176            poc_phone: None,
3177            poc_email: None,
3178            poc_website: None,
3179            poc_address_thoroughfare_number: None,
3180            poc_address_thoroughfare_name: None,
3181            poc_address_locality: None,
3182            poc_address_postcode: None,
3183            poc_address_country: None,
3184            attributes: None,
3185            version: None, // required field
3186        }
3187    }
3188}
3189
3190pub struct HeaderBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3191    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3192    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3193}
3194impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> HeaderBuilder<'a, 'b, A> {
3195    #[inline]
3196    pub fn add_transform(&mut self, transform: &Transform) {
3197        self.fbb_
3198            .push_slot_always::<&Transform>(Header::VT_TRANSFORM, transform);
3199    }
3200    #[inline]
3201    pub fn add_appearance(&mut self, appearance: flatbuffers::WIPOffset<Appearance<'b>>) {
3202        self.fbb_
3203            .push_slot_always::<flatbuffers::WIPOffset<Appearance>>(
3204                Header::VT_APPEARANCE,
3205                appearance,
3206            );
3207    }
3208    #[inline]
3209    pub fn add_columns(
3210        &mut self,
3211        columns: flatbuffers::WIPOffset<
3212            flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Column<'b>>>,
3213        >,
3214    ) {
3215        self.fbb_
3216            .push_slot_always::<flatbuffers::WIPOffset<_>>(Header::VT_COLUMNS, columns);
3217    }
3218    #[inline]
3219    pub fn add_semantic_columns(
3220        &mut self,
3221        semantic_columns: flatbuffers::WIPOffset<
3222            flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Column<'b>>>,
3223        >,
3224    ) {
3225        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3226            Header::VT_SEMANTIC_COLUMNS,
3227            semantic_columns,
3228        );
3229    }
3230    #[inline]
3231    pub fn add_features_count(&mut self, features_count: u64) {
3232        self.fbb_
3233            .push_slot::<u64>(Header::VT_FEATURES_COUNT, features_count, 0);
3234    }
3235    #[inline]
3236    pub fn add_index_node_size(&mut self, index_node_size: u16) {
3237        self.fbb_
3238            .push_slot::<u16>(Header::VT_INDEX_NODE_SIZE, index_node_size, 16);
3239    }
3240    #[inline]
3241    pub fn add_attribute_index(
3242        &mut self,
3243        attribute_index: flatbuffers::WIPOffset<flatbuffers::Vector<'b, AttributeIndex>>,
3244    ) {
3245        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3246            Header::VT_ATTRIBUTE_INDEX,
3247            attribute_index,
3248        );
3249    }
3250    #[inline]
3251    pub fn add_geographical_extent(&mut self, geographical_extent: &GeographicalExtent) {
3252        self.fbb_.push_slot_always::<&GeographicalExtent>(
3253            Header::VT_GEOGRAPHICAL_EXTENT,
3254            geographical_extent,
3255        );
3256    }
3257    #[inline]
3258    pub fn add_reference_system(
3259        &mut self,
3260        reference_system: flatbuffers::WIPOffset<ReferenceSystem<'b>>,
3261    ) {
3262        self.fbb_
3263            .push_slot_always::<flatbuffers::WIPOffset<ReferenceSystem>>(
3264                Header::VT_REFERENCE_SYSTEM,
3265                reference_system,
3266            );
3267    }
3268    #[inline]
3269    pub fn add_identifier(&mut self, identifier: flatbuffers::WIPOffset<&'b str>) {
3270        self.fbb_
3271            .push_slot_always::<flatbuffers::WIPOffset<_>>(Header::VT_IDENTIFIER, identifier);
3272    }
3273    #[inline]
3274    pub fn add_reference_date(&mut self, reference_date: flatbuffers::WIPOffset<&'b str>) {
3275        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3276            Header::VT_REFERENCE_DATE,
3277            reference_date,
3278        );
3279    }
3280    #[inline]
3281    pub fn add_title(&mut self, title: flatbuffers::WIPOffset<&'b str>) {
3282        self.fbb_
3283            .push_slot_always::<flatbuffers::WIPOffset<_>>(Header::VT_TITLE, title);
3284    }
3285    #[inline]
3286    pub fn add_templates(
3287        &mut self,
3288        templates: flatbuffers::WIPOffset<
3289            flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Geometry<'b>>>,
3290        >,
3291    ) {
3292        self.fbb_
3293            .push_slot_always::<flatbuffers::WIPOffset<_>>(Header::VT_TEMPLATES, templates);
3294    }
3295    #[inline]
3296    pub fn add_templates_vertices(
3297        &mut self,
3298        templates_vertices: flatbuffers::WIPOffset<flatbuffers::Vector<'b, DoubleVertex>>,
3299    ) {
3300        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3301            Header::VT_TEMPLATES_VERTICES,
3302            templates_vertices,
3303        );
3304    }
3305    #[inline]
3306    pub fn add_extensions(
3307        &mut self,
3308        extensions: flatbuffers::WIPOffset<
3309            flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Extension<'b>>>,
3310        >,
3311    ) {
3312        self.fbb_
3313            .push_slot_always::<flatbuffers::WIPOffset<_>>(Header::VT_EXTENSIONS, extensions);
3314    }
3315    #[inline]
3316    pub fn add_poc_contact_name(&mut self, poc_contact_name: flatbuffers::WIPOffset<&'b str>) {
3317        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3318            Header::VT_POC_CONTACT_NAME,
3319            poc_contact_name,
3320        );
3321    }
3322    #[inline]
3323    pub fn add_poc_contact_type(&mut self, poc_contact_type: flatbuffers::WIPOffset<&'b str>) {
3324        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3325            Header::VT_POC_CONTACT_TYPE,
3326            poc_contact_type,
3327        );
3328    }
3329    #[inline]
3330    pub fn add_poc_role(&mut self, poc_role: flatbuffers::WIPOffset<&'b str>) {
3331        self.fbb_
3332            .push_slot_always::<flatbuffers::WIPOffset<_>>(Header::VT_POC_ROLE, poc_role);
3333    }
3334    #[inline]
3335    pub fn add_poc_phone(&mut self, poc_phone: flatbuffers::WIPOffset<&'b str>) {
3336        self.fbb_
3337            .push_slot_always::<flatbuffers::WIPOffset<_>>(Header::VT_POC_PHONE, poc_phone);
3338    }
3339    #[inline]
3340    pub fn add_poc_email(&mut self, poc_email: flatbuffers::WIPOffset<&'b str>) {
3341        self.fbb_
3342            .push_slot_always::<flatbuffers::WIPOffset<_>>(Header::VT_POC_EMAIL, poc_email);
3343    }
3344    #[inline]
3345    pub fn add_poc_website(&mut self, poc_website: flatbuffers::WIPOffset<&'b str>) {
3346        self.fbb_
3347            .push_slot_always::<flatbuffers::WIPOffset<_>>(Header::VT_POC_WEBSITE, poc_website);
3348    }
3349    #[inline]
3350    pub fn add_poc_address_thoroughfare_number(
3351        &mut self,
3352        poc_address_thoroughfare_number: flatbuffers::WIPOffset<&'b str>,
3353    ) {
3354        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3355            Header::VT_POC_ADDRESS_THOROUGHFARE_NUMBER,
3356            poc_address_thoroughfare_number,
3357        );
3358    }
3359    #[inline]
3360    pub fn add_poc_address_thoroughfare_name(
3361        &mut self,
3362        poc_address_thoroughfare_name: flatbuffers::WIPOffset<&'b str>,
3363    ) {
3364        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3365            Header::VT_POC_ADDRESS_THOROUGHFARE_NAME,
3366            poc_address_thoroughfare_name,
3367        );
3368    }
3369    #[inline]
3370    pub fn add_poc_address_locality(
3371        &mut self,
3372        poc_address_locality: flatbuffers::WIPOffset<&'b str>,
3373    ) {
3374        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3375            Header::VT_POC_ADDRESS_LOCALITY,
3376            poc_address_locality,
3377        );
3378    }
3379    #[inline]
3380    pub fn add_poc_address_postcode(
3381        &mut self,
3382        poc_address_postcode: flatbuffers::WIPOffset<&'b str>,
3383    ) {
3384        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3385            Header::VT_POC_ADDRESS_POSTCODE,
3386            poc_address_postcode,
3387        );
3388    }
3389    #[inline]
3390    pub fn add_poc_address_country(
3391        &mut self,
3392        poc_address_country: flatbuffers::WIPOffset<&'b str>,
3393    ) {
3394        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3395            Header::VT_POC_ADDRESS_COUNTRY,
3396            poc_address_country,
3397        );
3398    }
3399    #[inline]
3400    pub fn add_attributes(
3401        &mut self,
3402        attributes: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
3403    ) {
3404        self.fbb_
3405            .push_slot_always::<flatbuffers::WIPOffset<_>>(Header::VT_ATTRIBUTES, attributes);
3406    }
3407    #[inline]
3408    pub fn add_version(&mut self, version: flatbuffers::WIPOffset<&'b str>) {
3409        self.fbb_
3410            .push_slot_always::<flatbuffers::WIPOffset<_>>(Header::VT_VERSION, version);
3411    }
3412    #[inline]
3413    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> HeaderBuilder<'a, 'b, A> {
3414        let start = _fbb.start_table();
3415        HeaderBuilder {
3416            fbb_: _fbb,
3417            start_: start,
3418        }
3419    }
3420    #[inline]
3421    pub fn finish(self) -> flatbuffers::WIPOffset<Header<'a>> {
3422        let o = self.fbb_.end_table(self.start_);
3423        self.fbb_.required(o, Header::VT_VERSION, "version");
3424        flatbuffers::WIPOffset::new(o.value())
3425    }
3426}
3427
3428impl core::fmt::Debug for Header<'_> {
3429    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3430        let mut ds = f.debug_struct("Header");
3431        ds.field("transform", &self.transform());
3432        ds.field("appearance", &self.appearance());
3433        ds.field("columns", &self.columns());
3434        ds.field("semantic_columns", &self.semantic_columns());
3435        ds.field("features_count", &self.features_count());
3436        ds.field("index_node_size", &self.index_node_size());
3437        ds.field("attribute_index", &self.attribute_index());
3438        ds.field("geographical_extent", &self.geographical_extent());
3439        ds.field("reference_system", &self.reference_system());
3440        ds.field("identifier", &self.identifier());
3441        ds.field("reference_date", &self.reference_date());
3442        ds.field("title", &self.title());
3443        ds.field("templates", &self.templates());
3444        ds.field("templates_vertices", &self.templates_vertices());
3445        ds.field("extensions", &self.extensions());
3446        ds.field("poc_contact_name", &self.poc_contact_name());
3447        ds.field("poc_contact_type", &self.poc_contact_type());
3448        ds.field("poc_role", &self.poc_role());
3449        ds.field("poc_phone", &self.poc_phone());
3450        ds.field("poc_email", &self.poc_email());
3451        ds.field("poc_website", &self.poc_website());
3452        ds.field(
3453            "poc_address_thoroughfare_number",
3454            &self.poc_address_thoroughfare_number(),
3455        );
3456        ds.field(
3457            "poc_address_thoroughfare_name",
3458            &self.poc_address_thoroughfare_name(),
3459        );
3460        ds.field("poc_address_locality", &self.poc_address_locality());
3461        ds.field("poc_address_postcode", &self.poc_address_postcode());
3462        ds.field("poc_address_country", &self.poc_address_country());
3463        ds.field("attributes", &self.attributes());
3464        ds.field("version", &self.version());
3465        ds.finish()
3466    }
3467}
3468#[inline]
3469/// Verifies that a buffer of bytes contains a `Header`
3470/// and returns it.
3471/// Note that verification is still experimental and may not
3472/// catch every error, or be maximally performant. For the
3473/// previous, unchecked, behavior use
3474/// `root_as_header_unchecked`.
3475pub fn root_as_header(buf: &[u8]) -> Result<Header<'_>, flatbuffers::InvalidFlatbuffer> {
3476    flatbuffers::root::<Header>(buf)
3477}
3478#[inline]
3479/// Verifies that a buffer of bytes contains a size prefixed
3480/// `Header` and returns it.
3481/// Note that verification is still experimental and may not
3482/// catch every error, or be maximally performant. For the
3483/// previous, unchecked, behavior use
3484/// `size_prefixed_root_as_header_unchecked`.
3485pub fn size_prefixed_root_as_header(
3486    buf: &[u8],
3487) -> Result<Header<'_>, flatbuffers::InvalidFlatbuffer> {
3488    flatbuffers::size_prefixed_root::<Header>(buf)
3489}
3490#[inline]
3491/// Verifies, with the given options, that a buffer of bytes
3492/// contains a `Header` and returns it.
3493/// Note that verification is still experimental and may not
3494/// catch every error, or be maximally performant. For the
3495/// previous, unchecked, behavior use
3496/// `root_as_header_unchecked`.
3497pub fn root_as_header_with_opts<'b, 'o>(
3498    opts: &'o flatbuffers::VerifierOptions,
3499    buf: &'b [u8],
3500) -> Result<Header<'b>, flatbuffers::InvalidFlatbuffer> {
3501    flatbuffers::root_with_opts::<Header<'b>>(opts, buf)
3502}
3503#[inline]
3504/// Verifies, with the given verifier options, that a buffer of
3505/// bytes contains a size prefixed `Header` and returns
3506/// it. Note that verification is still experimental and may not
3507/// catch every error, or be maximally performant. For the
3508/// previous, unchecked, behavior use
3509/// `root_as_header_unchecked`.
3510pub fn size_prefixed_root_as_header_with_opts<'b, 'o>(
3511    opts: &'o flatbuffers::VerifierOptions,
3512    buf: &'b [u8],
3513) -> Result<Header<'b>, flatbuffers::InvalidFlatbuffer> {
3514    flatbuffers::size_prefixed_root_with_opts::<Header<'b>>(opts, buf)
3515}
3516#[inline]
3517/// Assumes, without verification, that a buffer of bytes contains a Header and returns it.
3518/// # Safety
3519/// Callers must trust the given bytes do indeed contain a valid `Header`.
3520pub unsafe fn root_as_header_unchecked(buf: &[u8]) -> Header<'_> {
3521    unsafe { flatbuffers::root_unchecked::<Header>(buf) }
3522}
3523#[inline]
3524/// Assumes, without verification, that a buffer of bytes contains a size prefixed Header and returns it.
3525/// # Safety
3526/// Callers must trust the given bytes do indeed contain a valid size prefixed `Header`.
3527pub unsafe fn size_prefixed_root_as_header_unchecked(buf: &[u8]) -> Header<'_> {
3528    unsafe { flatbuffers::size_prefixed_root_unchecked::<Header>(buf) }
3529}
3530#[inline]
3531pub fn finish_header_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(
3532    fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3533    root: flatbuffers::WIPOffset<Header<'a>>,
3534) {
3535    fbb.finish(root, None);
3536}
3537
3538#[inline]
3539pub fn finish_size_prefixed_header_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(
3540    fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3541    root: flatbuffers::WIPOffset<Header<'a>>,
3542) {
3543    fbb.finish_size_prefixed(root, None);
3544}