arrow_ipc/gen/
Schema.rs

1// Licensed to the Apache Software Foundation (ASF) under one
2// or more contributor license agreements.  See the NOTICE file
3// distributed with this work for additional information
4// regarding copyright ownership.  The ASF licenses this file
5// to you under the Apache License, Version 2.0 (the
6// "License"); you may not use this file except in compliance
7// with the License.  You may obtain a copy of the License at
8//
9//   http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied.  See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
18#![allow(dead_code)]
19#![allow(unused_imports)]
20
21use flatbuffers::EndianScalar;
22use std::{cmp::Ordering, mem};
23// automatically generated by the FlatBuffers compiler, do not modify
24
25// @generated
26
27#[deprecated(
28    since = "2.0.0",
29    note = "Use associated constants instead. This will no longer be generated in 2021."
30)]
31pub const ENUM_MIN_METADATA_VERSION: i16 = 0;
32#[deprecated(
33    since = "2.0.0",
34    note = "Use associated constants instead. This will no longer be generated in 2021."
35)]
36pub const ENUM_MAX_METADATA_VERSION: i16 = 4;
37#[deprecated(
38    since = "2.0.0",
39    note = "Use associated constants instead. This will no longer be generated in 2021."
40)]
41#[allow(non_camel_case_types)]
42pub const ENUM_VALUES_METADATA_VERSION: [MetadataVersion; 5] = [
43    MetadataVersion::V1,
44    MetadataVersion::V2,
45    MetadataVersion::V3,
46    MetadataVersion::V4,
47    MetadataVersion::V5,
48];
49
50#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
51#[repr(transparent)]
52pub struct MetadataVersion(pub i16);
53#[allow(non_upper_case_globals)]
54impl MetadataVersion {
55    /// 0.1.0 (October 2016).
56    pub const V1: Self = Self(0);
57    /// 0.2.0 (February 2017). Non-backwards compatible with V1.
58    pub const V2: Self = Self(1);
59    /// 0.3.0 -> 0.7.1 (May - December 2017). Non-backwards compatible with V2.
60    pub const V3: Self = Self(2);
61    /// >= 0.8.0 (December 2017). Non-backwards compatible with V3.
62    pub const V4: Self = Self(3);
63    /// >= 1.0.0 (July 2020). Backwards compatible with V4 (V5 readers can read V4
64    /// metadata and IPC messages). Implementations are recommended to provide a
65    /// V4 compatibility mode with V5 format changes disabled.
66    ///
67    /// Incompatible changes between V4 and V5:
68    /// - Union buffer layout has changed. In V5, Unions don't have a validity
69    ///   bitmap buffer.
70    pub const V5: Self = Self(4);
71
72    pub const ENUM_MIN: i16 = 0;
73    pub const ENUM_MAX: i16 = 4;
74    pub const ENUM_VALUES: &'static [Self] = &[Self::V1, Self::V2, Self::V3, Self::V4, Self::V5];
75    /// Returns the variant's name or "" if unknown.
76    pub fn variant_name(self) -> Option<&'static str> {
77        match self {
78            Self::V1 => Some("V1"),
79            Self::V2 => Some("V2"),
80            Self::V3 => Some("V3"),
81            Self::V4 => Some("V4"),
82            Self::V5 => Some("V5"),
83            _ => None,
84        }
85    }
86}
87impl core::fmt::Debug for MetadataVersion {
88    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
89        if let Some(name) = self.variant_name() {
90            f.write_str(name)
91        } else {
92            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
93        }
94    }
95}
96impl<'a> flatbuffers::Follow<'a> for MetadataVersion {
97    type Inner = Self;
98    #[inline]
99    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
100        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
101        Self(b)
102    }
103}
104
105impl flatbuffers::Push for MetadataVersion {
106    type Output = MetadataVersion;
107    #[inline]
108    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
109        unsafe {
110            flatbuffers::emplace_scalar::<i16>(dst, self.0);
111        }
112    }
113}
114
115impl flatbuffers::EndianScalar for MetadataVersion {
116    type Scalar = i16;
117    #[inline]
118    fn to_little_endian(self) -> i16 {
119        self.0.to_le()
120    }
121    #[inline]
122    #[allow(clippy::wrong_self_convention)]
123    fn from_little_endian(v: i16) -> Self {
124        let b = i16::from_le(v);
125        Self(b)
126    }
127}
128
129impl<'a> flatbuffers::Verifiable for MetadataVersion {
130    #[inline]
131    fn run_verifier(
132        v: &mut flatbuffers::Verifier,
133        pos: usize,
134    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
135        use flatbuffers::Verifiable;
136        i16::run_verifier(v, pos)
137    }
138}
139
140impl flatbuffers::SimpleToVerifyInSlice for MetadataVersion {}
141#[deprecated(
142    since = "2.0.0",
143    note = "Use associated constants instead. This will no longer be generated in 2021."
144)]
145pub const ENUM_MIN_FEATURE: i64 = 0;
146#[deprecated(
147    since = "2.0.0",
148    note = "Use associated constants instead. This will no longer be generated in 2021."
149)]
150pub const ENUM_MAX_FEATURE: i64 = 2;
151#[deprecated(
152    since = "2.0.0",
153    note = "Use associated constants instead. This will no longer be generated in 2021."
154)]
155#[allow(non_camel_case_types)]
156pub const ENUM_VALUES_FEATURE: [Feature; 3] = [
157    Feature::UNUSED,
158    Feature::DICTIONARY_REPLACEMENT,
159    Feature::COMPRESSED_BODY,
160];
161
162/// Represents Arrow Features that might not have full support
163/// within implementations. This is intended to be used in
164/// two scenarios:
165///  1.  A mechanism for readers of Arrow Streams
166///      and files to understand that the stream or file makes
167///      use of a feature that isn't supported or unknown to
168///      the implementation (and therefore can meet the Arrow
169///      forward compatibility guarantees).
170///  2.  A means of negotiating between a client and server
171///      what features a stream is allowed to use. The enums
172///      values here are intented to represent higher level
173///      features, additional details maybe negotiated
174///      with key-value pairs specific to the protocol.
175///
176/// Enums added to this list should be assigned power-of-two values
177/// to facilitate exchanging and comparing bitmaps for supported
178/// features.
179#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
180#[repr(transparent)]
181pub struct Feature(pub i64);
182#[allow(non_upper_case_globals)]
183impl Feature {
184    /// Needed to make flatbuffers happy.
185    pub const UNUSED: Self = Self(0);
186    /// The stream makes use of multiple full dictionaries with the
187    /// same ID and assumes clients implement dictionary replacement
188    /// correctly.
189    pub const DICTIONARY_REPLACEMENT: Self = Self(1);
190    /// The stream makes use of compressed bodies as described
191    /// in Message.fbs.
192    pub const COMPRESSED_BODY: Self = Self(2);
193
194    pub const ENUM_MIN: i64 = 0;
195    pub const ENUM_MAX: i64 = 2;
196    pub const ENUM_VALUES: &'static [Self] = &[
197        Self::UNUSED,
198        Self::DICTIONARY_REPLACEMENT,
199        Self::COMPRESSED_BODY,
200    ];
201    /// Returns the variant's name or "" if unknown.
202    pub fn variant_name(self) -> Option<&'static str> {
203        match self {
204            Self::UNUSED => Some("UNUSED"),
205            Self::DICTIONARY_REPLACEMENT => Some("DICTIONARY_REPLACEMENT"),
206            Self::COMPRESSED_BODY => Some("COMPRESSED_BODY"),
207            _ => None,
208        }
209    }
210}
211impl core::fmt::Debug for Feature {
212    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
213        if let Some(name) = self.variant_name() {
214            f.write_str(name)
215        } else {
216            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
217        }
218    }
219}
220impl<'a> flatbuffers::Follow<'a> for Feature {
221    type Inner = Self;
222    #[inline]
223    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
224        let b = unsafe { flatbuffers::read_scalar_at::<i64>(buf, loc) };
225        Self(b)
226    }
227}
228
229impl flatbuffers::Push for Feature {
230    type Output = Feature;
231    #[inline]
232    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
233        unsafe {
234            flatbuffers::emplace_scalar::<i64>(dst, self.0);
235        }
236    }
237}
238
239impl flatbuffers::EndianScalar for Feature {
240    type Scalar = i64;
241    #[inline]
242    fn to_little_endian(self) -> i64 {
243        self.0.to_le()
244    }
245    #[inline]
246    #[allow(clippy::wrong_self_convention)]
247    fn from_little_endian(v: i64) -> Self {
248        let b = i64::from_le(v);
249        Self(b)
250    }
251}
252
253impl<'a> flatbuffers::Verifiable for Feature {
254    #[inline]
255    fn run_verifier(
256        v: &mut flatbuffers::Verifier,
257        pos: usize,
258    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
259        use flatbuffers::Verifiable;
260        i64::run_verifier(v, pos)
261    }
262}
263
264impl flatbuffers::SimpleToVerifyInSlice for Feature {}
265#[deprecated(
266    since = "2.0.0",
267    note = "Use associated constants instead. This will no longer be generated in 2021."
268)]
269pub const ENUM_MIN_UNION_MODE: i16 = 0;
270#[deprecated(
271    since = "2.0.0",
272    note = "Use associated constants instead. This will no longer be generated in 2021."
273)]
274pub const ENUM_MAX_UNION_MODE: i16 = 1;
275#[deprecated(
276    since = "2.0.0",
277    note = "Use associated constants instead. This will no longer be generated in 2021."
278)]
279#[allow(non_camel_case_types)]
280pub const ENUM_VALUES_UNION_MODE: [UnionMode; 2] = [UnionMode::Sparse, UnionMode::Dense];
281
282#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
283#[repr(transparent)]
284pub struct UnionMode(pub i16);
285#[allow(non_upper_case_globals)]
286impl UnionMode {
287    pub const Sparse: Self = Self(0);
288    pub const Dense: Self = Self(1);
289
290    pub const ENUM_MIN: i16 = 0;
291    pub const ENUM_MAX: i16 = 1;
292    pub const ENUM_VALUES: &'static [Self] = &[Self::Sparse, Self::Dense];
293    /// Returns the variant's name or "" if unknown.
294    pub fn variant_name(self) -> Option<&'static str> {
295        match self {
296            Self::Sparse => Some("Sparse"),
297            Self::Dense => Some("Dense"),
298            _ => None,
299        }
300    }
301}
302impl core::fmt::Debug for UnionMode {
303    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
304        if let Some(name) = self.variant_name() {
305            f.write_str(name)
306        } else {
307            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
308        }
309    }
310}
311impl<'a> flatbuffers::Follow<'a> for UnionMode {
312    type Inner = Self;
313    #[inline]
314    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
315        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
316        Self(b)
317    }
318}
319
320impl flatbuffers::Push for UnionMode {
321    type Output = UnionMode;
322    #[inline]
323    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
324        unsafe {
325            flatbuffers::emplace_scalar::<i16>(dst, self.0);
326        }
327    }
328}
329
330impl flatbuffers::EndianScalar for UnionMode {
331    type Scalar = i16;
332    #[inline]
333    fn to_little_endian(self) -> i16 {
334        self.0.to_le()
335    }
336    #[inline]
337    #[allow(clippy::wrong_self_convention)]
338    fn from_little_endian(v: i16) -> Self {
339        let b = i16::from_le(v);
340        Self(b)
341    }
342}
343
344impl<'a> flatbuffers::Verifiable for UnionMode {
345    #[inline]
346    fn run_verifier(
347        v: &mut flatbuffers::Verifier,
348        pos: usize,
349    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
350        use flatbuffers::Verifiable;
351        i16::run_verifier(v, pos)
352    }
353}
354
355impl flatbuffers::SimpleToVerifyInSlice for UnionMode {}
356#[deprecated(
357    since = "2.0.0",
358    note = "Use associated constants instead. This will no longer be generated in 2021."
359)]
360pub const ENUM_MIN_PRECISION: i16 = 0;
361#[deprecated(
362    since = "2.0.0",
363    note = "Use associated constants instead. This will no longer be generated in 2021."
364)]
365pub const ENUM_MAX_PRECISION: i16 = 2;
366#[deprecated(
367    since = "2.0.0",
368    note = "Use associated constants instead. This will no longer be generated in 2021."
369)]
370#[allow(non_camel_case_types)]
371pub const ENUM_VALUES_PRECISION: [Precision; 3] =
372    [Precision::HALF, Precision::SINGLE, Precision::DOUBLE];
373
374#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
375#[repr(transparent)]
376pub struct Precision(pub i16);
377#[allow(non_upper_case_globals)]
378impl Precision {
379    pub const HALF: Self = Self(0);
380    pub const SINGLE: Self = Self(1);
381    pub const DOUBLE: Self = Self(2);
382
383    pub const ENUM_MIN: i16 = 0;
384    pub const ENUM_MAX: i16 = 2;
385    pub const ENUM_VALUES: &'static [Self] = &[Self::HALF, Self::SINGLE, Self::DOUBLE];
386    /// Returns the variant's name or "" if unknown.
387    pub fn variant_name(self) -> Option<&'static str> {
388        match self {
389            Self::HALF => Some("HALF"),
390            Self::SINGLE => Some("SINGLE"),
391            Self::DOUBLE => Some("DOUBLE"),
392            _ => None,
393        }
394    }
395}
396impl core::fmt::Debug for Precision {
397    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
398        if let Some(name) = self.variant_name() {
399            f.write_str(name)
400        } else {
401            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
402        }
403    }
404}
405impl<'a> flatbuffers::Follow<'a> for Precision {
406    type Inner = Self;
407    #[inline]
408    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
409        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
410        Self(b)
411    }
412}
413
414impl flatbuffers::Push for Precision {
415    type Output = Precision;
416    #[inline]
417    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
418        unsafe {
419            flatbuffers::emplace_scalar::<i16>(dst, self.0);
420        }
421    }
422}
423
424impl flatbuffers::EndianScalar for Precision {
425    type Scalar = i16;
426    #[inline]
427    fn to_little_endian(self) -> i16 {
428        self.0.to_le()
429    }
430    #[inline]
431    #[allow(clippy::wrong_self_convention)]
432    fn from_little_endian(v: i16) -> Self {
433        let b = i16::from_le(v);
434        Self(b)
435    }
436}
437
438impl<'a> flatbuffers::Verifiable for Precision {
439    #[inline]
440    fn run_verifier(
441        v: &mut flatbuffers::Verifier,
442        pos: usize,
443    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
444        use flatbuffers::Verifiable;
445        i16::run_verifier(v, pos)
446    }
447}
448
449impl flatbuffers::SimpleToVerifyInSlice for Precision {}
450#[deprecated(
451    since = "2.0.0",
452    note = "Use associated constants instead. This will no longer be generated in 2021."
453)]
454pub const ENUM_MIN_DATE_UNIT: i16 = 0;
455#[deprecated(
456    since = "2.0.0",
457    note = "Use associated constants instead. This will no longer be generated in 2021."
458)]
459pub const ENUM_MAX_DATE_UNIT: i16 = 1;
460#[deprecated(
461    since = "2.0.0",
462    note = "Use associated constants instead. This will no longer be generated in 2021."
463)]
464#[allow(non_camel_case_types)]
465pub const ENUM_VALUES_DATE_UNIT: [DateUnit; 2] = [DateUnit::DAY, DateUnit::MILLISECOND];
466
467#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
468#[repr(transparent)]
469pub struct DateUnit(pub i16);
470#[allow(non_upper_case_globals)]
471impl DateUnit {
472    pub const DAY: Self = Self(0);
473    pub const MILLISECOND: Self = Self(1);
474
475    pub const ENUM_MIN: i16 = 0;
476    pub const ENUM_MAX: i16 = 1;
477    pub const ENUM_VALUES: &'static [Self] = &[Self::DAY, Self::MILLISECOND];
478    /// Returns the variant's name or "" if unknown.
479    pub fn variant_name(self) -> Option<&'static str> {
480        match self {
481            Self::DAY => Some("DAY"),
482            Self::MILLISECOND => Some("MILLISECOND"),
483            _ => None,
484        }
485    }
486}
487impl core::fmt::Debug for DateUnit {
488    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
489        if let Some(name) = self.variant_name() {
490            f.write_str(name)
491        } else {
492            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
493        }
494    }
495}
496impl<'a> flatbuffers::Follow<'a> for DateUnit {
497    type Inner = Self;
498    #[inline]
499    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
500        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
501        Self(b)
502    }
503}
504
505impl flatbuffers::Push for DateUnit {
506    type Output = DateUnit;
507    #[inline]
508    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
509        unsafe {
510            flatbuffers::emplace_scalar::<i16>(dst, self.0);
511        }
512    }
513}
514
515impl flatbuffers::EndianScalar for DateUnit {
516    type Scalar = i16;
517    #[inline]
518    fn to_little_endian(self) -> i16 {
519        self.0.to_le()
520    }
521    #[inline]
522    #[allow(clippy::wrong_self_convention)]
523    fn from_little_endian(v: i16) -> Self {
524        let b = i16::from_le(v);
525        Self(b)
526    }
527}
528
529impl<'a> flatbuffers::Verifiable for DateUnit {
530    #[inline]
531    fn run_verifier(
532        v: &mut flatbuffers::Verifier,
533        pos: usize,
534    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
535        use flatbuffers::Verifiable;
536        i16::run_verifier(v, pos)
537    }
538}
539
540impl flatbuffers::SimpleToVerifyInSlice for DateUnit {}
541#[deprecated(
542    since = "2.0.0",
543    note = "Use associated constants instead. This will no longer be generated in 2021."
544)]
545pub const ENUM_MIN_TIME_UNIT: i16 = 0;
546#[deprecated(
547    since = "2.0.0",
548    note = "Use associated constants instead. This will no longer be generated in 2021."
549)]
550pub const ENUM_MAX_TIME_UNIT: i16 = 3;
551#[deprecated(
552    since = "2.0.0",
553    note = "Use associated constants instead. This will no longer be generated in 2021."
554)]
555#[allow(non_camel_case_types)]
556pub const ENUM_VALUES_TIME_UNIT: [TimeUnit; 4] = [
557    TimeUnit::SECOND,
558    TimeUnit::MILLISECOND,
559    TimeUnit::MICROSECOND,
560    TimeUnit::NANOSECOND,
561];
562
563#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
564#[repr(transparent)]
565pub struct TimeUnit(pub i16);
566#[allow(non_upper_case_globals)]
567impl TimeUnit {
568    pub const SECOND: Self = Self(0);
569    pub const MILLISECOND: Self = Self(1);
570    pub const MICROSECOND: Self = Self(2);
571    pub const NANOSECOND: Self = Self(3);
572
573    pub const ENUM_MIN: i16 = 0;
574    pub const ENUM_MAX: i16 = 3;
575    pub const ENUM_VALUES: &'static [Self] = &[
576        Self::SECOND,
577        Self::MILLISECOND,
578        Self::MICROSECOND,
579        Self::NANOSECOND,
580    ];
581    /// Returns the variant's name or "" if unknown.
582    pub fn variant_name(self) -> Option<&'static str> {
583        match self {
584            Self::SECOND => Some("SECOND"),
585            Self::MILLISECOND => Some("MILLISECOND"),
586            Self::MICROSECOND => Some("MICROSECOND"),
587            Self::NANOSECOND => Some("NANOSECOND"),
588            _ => None,
589        }
590    }
591}
592impl core::fmt::Debug for TimeUnit {
593    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
594        if let Some(name) = self.variant_name() {
595            f.write_str(name)
596        } else {
597            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
598        }
599    }
600}
601impl<'a> flatbuffers::Follow<'a> for TimeUnit {
602    type Inner = Self;
603    #[inline]
604    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
605        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
606        Self(b)
607    }
608}
609
610impl flatbuffers::Push for TimeUnit {
611    type Output = TimeUnit;
612    #[inline]
613    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
614        unsafe {
615            flatbuffers::emplace_scalar::<i16>(dst, self.0);
616        }
617    }
618}
619
620impl flatbuffers::EndianScalar for TimeUnit {
621    type Scalar = i16;
622    #[inline]
623    fn to_little_endian(self) -> i16 {
624        self.0.to_le()
625    }
626    #[inline]
627    #[allow(clippy::wrong_self_convention)]
628    fn from_little_endian(v: i16) -> Self {
629        let b = i16::from_le(v);
630        Self(b)
631    }
632}
633
634impl<'a> flatbuffers::Verifiable for TimeUnit {
635    #[inline]
636    fn run_verifier(
637        v: &mut flatbuffers::Verifier,
638        pos: usize,
639    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
640        use flatbuffers::Verifiable;
641        i16::run_verifier(v, pos)
642    }
643}
644
645impl flatbuffers::SimpleToVerifyInSlice for TimeUnit {}
646#[deprecated(
647    since = "2.0.0",
648    note = "Use associated constants instead. This will no longer be generated in 2021."
649)]
650pub const ENUM_MIN_INTERVAL_UNIT: i16 = 0;
651#[deprecated(
652    since = "2.0.0",
653    note = "Use associated constants instead. This will no longer be generated in 2021."
654)]
655pub const ENUM_MAX_INTERVAL_UNIT: i16 = 2;
656#[deprecated(
657    since = "2.0.0",
658    note = "Use associated constants instead. This will no longer be generated in 2021."
659)]
660#[allow(non_camel_case_types)]
661pub const ENUM_VALUES_INTERVAL_UNIT: [IntervalUnit; 3] = [
662    IntervalUnit::YEAR_MONTH,
663    IntervalUnit::DAY_TIME,
664    IntervalUnit::MONTH_DAY_NANO,
665];
666
667#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
668#[repr(transparent)]
669pub struct IntervalUnit(pub i16);
670#[allow(non_upper_case_globals)]
671impl IntervalUnit {
672    pub const YEAR_MONTH: Self = Self(0);
673    pub const DAY_TIME: Self = Self(1);
674    pub const MONTH_DAY_NANO: Self = Self(2);
675
676    pub const ENUM_MIN: i16 = 0;
677    pub const ENUM_MAX: i16 = 2;
678    pub const ENUM_VALUES: &'static [Self] =
679        &[Self::YEAR_MONTH, Self::DAY_TIME, Self::MONTH_DAY_NANO];
680    /// Returns the variant's name or "" if unknown.
681    pub fn variant_name(self) -> Option<&'static str> {
682        match self {
683            Self::YEAR_MONTH => Some("YEAR_MONTH"),
684            Self::DAY_TIME => Some("DAY_TIME"),
685            Self::MONTH_DAY_NANO => Some("MONTH_DAY_NANO"),
686            _ => None,
687        }
688    }
689}
690impl core::fmt::Debug for IntervalUnit {
691    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
692        if let Some(name) = self.variant_name() {
693            f.write_str(name)
694        } else {
695            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
696        }
697    }
698}
699impl<'a> flatbuffers::Follow<'a> for IntervalUnit {
700    type Inner = Self;
701    #[inline]
702    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
703        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
704        Self(b)
705    }
706}
707
708impl flatbuffers::Push for IntervalUnit {
709    type Output = IntervalUnit;
710    #[inline]
711    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
712        unsafe {
713            flatbuffers::emplace_scalar::<i16>(dst, self.0);
714        }
715    }
716}
717
718impl flatbuffers::EndianScalar for IntervalUnit {
719    type Scalar = i16;
720    #[inline]
721    fn to_little_endian(self) -> i16 {
722        self.0.to_le()
723    }
724    #[inline]
725    #[allow(clippy::wrong_self_convention)]
726    fn from_little_endian(v: i16) -> Self {
727        let b = i16::from_le(v);
728        Self(b)
729    }
730}
731
732impl<'a> flatbuffers::Verifiable for IntervalUnit {
733    #[inline]
734    fn run_verifier(
735        v: &mut flatbuffers::Verifier,
736        pos: usize,
737    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
738        use flatbuffers::Verifiable;
739        i16::run_verifier(v, pos)
740    }
741}
742
743impl flatbuffers::SimpleToVerifyInSlice for IntervalUnit {}
744#[deprecated(
745    since = "2.0.0",
746    note = "Use associated constants instead. This will no longer be generated in 2021."
747)]
748pub const ENUM_MIN_TYPE: u8 = 0;
749#[deprecated(
750    since = "2.0.0",
751    note = "Use associated constants instead. This will no longer be generated in 2021."
752)]
753pub const ENUM_MAX_TYPE: u8 = 26;
754#[deprecated(
755    since = "2.0.0",
756    note = "Use associated constants instead. This will no longer be generated in 2021."
757)]
758#[allow(non_camel_case_types)]
759pub const ENUM_VALUES_TYPE: [Type; 27] = [
760    Type::NONE,
761    Type::Null,
762    Type::Int,
763    Type::FloatingPoint,
764    Type::Binary,
765    Type::Utf8,
766    Type::Bool,
767    Type::Decimal,
768    Type::Date,
769    Type::Time,
770    Type::Timestamp,
771    Type::Interval,
772    Type::List,
773    Type::Struct_,
774    Type::Union,
775    Type::FixedSizeBinary,
776    Type::FixedSizeList,
777    Type::Map,
778    Type::Duration,
779    Type::LargeBinary,
780    Type::LargeUtf8,
781    Type::LargeList,
782    Type::RunEndEncoded,
783    Type::BinaryView,
784    Type::Utf8View,
785    Type::ListView,
786    Type::LargeListView,
787];
788
789/// ----------------------------------------------------------------------
790/// Top-level Type value, enabling extensible type-specific metadata. We can
791/// add new logical types to Type without breaking backwards compatibility
792#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
793#[repr(transparent)]
794pub struct Type(pub u8);
795#[allow(non_upper_case_globals)]
796impl Type {
797    pub const NONE: Self = Self(0);
798    pub const Null: Self = Self(1);
799    pub const Int: Self = Self(2);
800    pub const FloatingPoint: Self = Self(3);
801    pub const Binary: Self = Self(4);
802    pub const Utf8: Self = Self(5);
803    pub const Bool: Self = Self(6);
804    pub const Decimal: Self = Self(7);
805    pub const Date: Self = Self(8);
806    pub const Time: Self = Self(9);
807    pub const Timestamp: Self = Self(10);
808    pub const Interval: Self = Self(11);
809    pub const List: Self = Self(12);
810    pub const Struct_: Self = Self(13);
811    pub const Union: Self = Self(14);
812    pub const FixedSizeBinary: Self = Self(15);
813    pub const FixedSizeList: Self = Self(16);
814    pub const Map: Self = Self(17);
815    pub const Duration: Self = Self(18);
816    pub const LargeBinary: Self = Self(19);
817    pub const LargeUtf8: Self = Self(20);
818    pub const LargeList: Self = Self(21);
819    pub const RunEndEncoded: Self = Self(22);
820    pub const BinaryView: Self = Self(23);
821    pub const Utf8View: Self = Self(24);
822    pub const ListView: Self = Self(25);
823    pub const LargeListView: Self = Self(26);
824
825    pub const ENUM_MIN: u8 = 0;
826    pub const ENUM_MAX: u8 = 26;
827    pub const ENUM_VALUES: &'static [Self] = &[
828        Self::NONE,
829        Self::Null,
830        Self::Int,
831        Self::FloatingPoint,
832        Self::Binary,
833        Self::Utf8,
834        Self::Bool,
835        Self::Decimal,
836        Self::Date,
837        Self::Time,
838        Self::Timestamp,
839        Self::Interval,
840        Self::List,
841        Self::Struct_,
842        Self::Union,
843        Self::FixedSizeBinary,
844        Self::FixedSizeList,
845        Self::Map,
846        Self::Duration,
847        Self::LargeBinary,
848        Self::LargeUtf8,
849        Self::LargeList,
850        Self::RunEndEncoded,
851        Self::BinaryView,
852        Self::Utf8View,
853        Self::ListView,
854        Self::LargeListView,
855    ];
856    /// Returns the variant's name or "" if unknown.
857    pub fn variant_name(self) -> Option<&'static str> {
858        match self {
859            Self::NONE => Some("NONE"),
860            Self::Null => Some("Null"),
861            Self::Int => Some("Int"),
862            Self::FloatingPoint => Some("FloatingPoint"),
863            Self::Binary => Some("Binary"),
864            Self::Utf8 => Some("Utf8"),
865            Self::Bool => Some("Bool"),
866            Self::Decimal => Some("Decimal"),
867            Self::Date => Some("Date"),
868            Self::Time => Some("Time"),
869            Self::Timestamp => Some("Timestamp"),
870            Self::Interval => Some("Interval"),
871            Self::List => Some("List"),
872            Self::Struct_ => Some("Struct_"),
873            Self::Union => Some("Union"),
874            Self::FixedSizeBinary => Some("FixedSizeBinary"),
875            Self::FixedSizeList => Some("FixedSizeList"),
876            Self::Map => Some("Map"),
877            Self::Duration => Some("Duration"),
878            Self::LargeBinary => Some("LargeBinary"),
879            Self::LargeUtf8 => Some("LargeUtf8"),
880            Self::LargeList => Some("LargeList"),
881            Self::RunEndEncoded => Some("RunEndEncoded"),
882            Self::BinaryView => Some("BinaryView"),
883            Self::Utf8View => Some("Utf8View"),
884            Self::ListView => Some("ListView"),
885            Self::LargeListView => Some("LargeListView"),
886            _ => None,
887        }
888    }
889}
890impl core::fmt::Debug for Type {
891    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
892        if let Some(name) = self.variant_name() {
893            f.write_str(name)
894        } else {
895            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
896        }
897    }
898}
899impl<'a> flatbuffers::Follow<'a> for Type {
900    type Inner = Self;
901    #[inline]
902    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
903        let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
904        Self(b)
905    }
906}
907
908impl flatbuffers::Push for Type {
909    type Output = Type;
910    #[inline]
911    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
912        unsafe {
913            flatbuffers::emplace_scalar::<u8>(dst, self.0);
914        }
915    }
916}
917
918impl flatbuffers::EndianScalar for Type {
919    type Scalar = u8;
920    #[inline]
921    fn to_little_endian(self) -> u8 {
922        self.0.to_le()
923    }
924    #[inline]
925    #[allow(clippy::wrong_self_convention)]
926    fn from_little_endian(v: u8) -> Self {
927        let b = u8::from_le(v);
928        Self(b)
929    }
930}
931
932impl<'a> flatbuffers::Verifiable for Type {
933    #[inline]
934    fn run_verifier(
935        v: &mut flatbuffers::Verifier,
936        pos: usize,
937    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
938        use flatbuffers::Verifiable;
939        u8::run_verifier(v, pos)
940    }
941}
942
943impl flatbuffers::SimpleToVerifyInSlice for Type {}
944pub struct TypeUnionTableOffset {}
945
946#[deprecated(
947    since = "2.0.0",
948    note = "Use associated constants instead. This will no longer be generated in 2021."
949)]
950pub const ENUM_MIN_DICTIONARY_KIND: i16 = 0;
951#[deprecated(
952    since = "2.0.0",
953    note = "Use associated constants instead. This will no longer be generated in 2021."
954)]
955pub const ENUM_MAX_DICTIONARY_KIND: i16 = 0;
956#[deprecated(
957    since = "2.0.0",
958    note = "Use associated constants instead. This will no longer be generated in 2021."
959)]
960#[allow(non_camel_case_types)]
961pub const ENUM_VALUES_DICTIONARY_KIND: [DictionaryKind; 1] = [DictionaryKind::DenseArray];
962
963/// ----------------------------------------------------------------------
964/// Dictionary encoding metadata
965/// Maintained for forwards compatibility, in the future
966/// Dictionaries might be explicit maps between integers and values
967/// allowing for non-contiguous index values
968#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
969#[repr(transparent)]
970pub struct DictionaryKind(pub i16);
971#[allow(non_upper_case_globals)]
972impl DictionaryKind {
973    pub const DenseArray: Self = Self(0);
974
975    pub const ENUM_MIN: i16 = 0;
976    pub const ENUM_MAX: i16 = 0;
977    pub const ENUM_VALUES: &'static [Self] = &[Self::DenseArray];
978    /// Returns the variant's name or "" if unknown.
979    pub fn variant_name(self) -> Option<&'static str> {
980        match self {
981            Self::DenseArray => Some("DenseArray"),
982            _ => None,
983        }
984    }
985}
986impl core::fmt::Debug for DictionaryKind {
987    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
988        if let Some(name) = self.variant_name() {
989            f.write_str(name)
990        } else {
991            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
992        }
993    }
994}
995impl<'a> flatbuffers::Follow<'a> for DictionaryKind {
996    type Inner = Self;
997    #[inline]
998    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
999        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
1000        Self(b)
1001    }
1002}
1003
1004impl flatbuffers::Push for DictionaryKind {
1005    type Output = DictionaryKind;
1006    #[inline]
1007    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1008        unsafe {
1009            flatbuffers::emplace_scalar::<i16>(dst, self.0);
1010        }
1011    }
1012}
1013
1014impl flatbuffers::EndianScalar for DictionaryKind {
1015    type Scalar = i16;
1016    #[inline]
1017    fn to_little_endian(self) -> i16 {
1018        self.0.to_le()
1019    }
1020    #[inline]
1021    #[allow(clippy::wrong_self_convention)]
1022    fn from_little_endian(v: i16) -> Self {
1023        let b = i16::from_le(v);
1024        Self(b)
1025    }
1026}
1027
1028impl<'a> flatbuffers::Verifiable for DictionaryKind {
1029    #[inline]
1030    fn run_verifier(
1031        v: &mut flatbuffers::Verifier,
1032        pos: usize,
1033    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1034        use flatbuffers::Verifiable;
1035        i16::run_verifier(v, pos)
1036    }
1037}
1038
1039impl flatbuffers::SimpleToVerifyInSlice for DictionaryKind {}
1040#[deprecated(
1041    since = "2.0.0",
1042    note = "Use associated constants instead. This will no longer be generated in 2021."
1043)]
1044pub const ENUM_MIN_ENDIANNESS: i16 = 0;
1045#[deprecated(
1046    since = "2.0.0",
1047    note = "Use associated constants instead. This will no longer be generated in 2021."
1048)]
1049pub const ENUM_MAX_ENDIANNESS: i16 = 1;
1050#[deprecated(
1051    since = "2.0.0",
1052    note = "Use associated constants instead. This will no longer be generated in 2021."
1053)]
1054#[allow(non_camel_case_types)]
1055pub const ENUM_VALUES_ENDIANNESS: [Endianness; 2] = [Endianness::Little, Endianness::Big];
1056
1057/// ----------------------------------------------------------------------
1058/// Endianness of the platform producing the data
1059#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1060#[repr(transparent)]
1061pub struct Endianness(pub i16);
1062#[allow(non_upper_case_globals)]
1063impl Endianness {
1064    pub const Little: Self = Self(0);
1065    pub const Big: Self = Self(1);
1066
1067    pub const ENUM_MIN: i16 = 0;
1068    pub const ENUM_MAX: i16 = 1;
1069    pub const ENUM_VALUES: &'static [Self] = &[Self::Little, Self::Big];
1070    /// Returns the variant's name or "" if unknown.
1071    pub fn variant_name(self) -> Option<&'static str> {
1072        match self {
1073            Self::Little => Some("Little"),
1074            Self::Big => Some("Big"),
1075            _ => None,
1076        }
1077    }
1078}
1079impl core::fmt::Debug for Endianness {
1080    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1081        if let Some(name) = self.variant_name() {
1082            f.write_str(name)
1083        } else {
1084            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
1085        }
1086    }
1087}
1088impl<'a> flatbuffers::Follow<'a> for Endianness {
1089    type Inner = Self;
1090    #[inline]
1091    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1092        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
1093        Self(b)
1094    }
1095}
1096
1097impl flatbuffers::Push for Endianness {
1098    type Output = Endianness;
1099    #[inline]
1100    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1101        unsafe {
1102            flatbuffers::emplace_scalar::<i16>(dst, self.0);
1103        }
1104    }
1105}
1106
1107impl flatbuffers::EndianScalar for Endianness {
1108    type Scalar = i16;
1109    #[inline]
1110    fn to_little_endian(self) -> i16 {
1111        self.0.to_le()
1112    }
1113    #[inline]
1114    #[allow(clippy::wrong_self_convention)]
1115    fn from_little_endian(v: i16) -> Self {
1116        let b = i16::from_le(v);
1117        Self(b)
1118    }
1119}
1120
1121impl<'a> flatbuffers::Verifiable for Endianness {
1122    #[inline]
1123    fn run_verifier(
1124        v: &mut flatbuffers::Verifier,
1125        pos: usize,
1126    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1127        use flatbuffers::Verifiable;
1128        i16::run_verifier(v, pos)
1129    }
1130}
1131
1132impl flatbuffers::SimpleToVerifyInSlice for Endianness {}
1133/// ----------------------------------------------------------------------
1134/// A Buffer represents a single contiguous memory segment
1135// struct Buffer, aligned to 8
1136#[repr(transparent)]
1137#[derive(Clone, Copy, PartialEq)]
1138pub struct Buffer(pub [u8; 16]);
1139impl Default for Buffer {
1140    fn default() -> Self {
1141        Self([0; 16])
1142    }
1143}
1144impl core::fmt::Debug for Buffer {
1145    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1146        f.debug_struct("Buffer")
1147            .field("offset", &self.offset())
1148            .field("length", &self.length())
1149            .finish()
1150    }
1151}
1152
1153impl flatbuffers::SimpleToVerifyInSlice for Buffer {}
1154impl<'a> flatbuffers::Follow<'a> for Buffer {
1155    type Inner = &'a Buffer;
1156    #[inline]
1157    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1158        unsafe { <&'a Buffer>::follow(buf, loc) }
1159    }
1160}
1161impl<'a> flatbuffers::Follow<'a> for &'a Buffer {
1162    type Inner = &'a Buffer;
1163    #[inline]
1164    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1165        unsafe { flatbuffers::follow_cast_ref::<Buffer>(buf, loc) }
1166    }
1167}
1168impl<'b> flatbuffers::Push for Buffer {
1169    type Output = Buffer;
1170    #[inline]
1171    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1172        let src = unsafe {
1173            ::core::slice::from_raw_parts(
1174                self as *const Buffer as *const u8,
1175                <Self as flatbuffers::Push>::size(),
1176            )
1177        };
1178        dst.copy_from_slice(src);
1179    }
1180    #[inline]
1181    fn alignment() -> flatbuffers::PushAlignment {
1182        flatbuffers::PushAlignment::new(8)
1183    }
1184}
1185
1186impl<'a> flatbuffers::Verifiable for Buffer {
1187    #[inline]
1188    fn run_verifier(
1189        v: &mut flatbuffers::Verifier,
1190        pos: usize,
1191    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1192        use flatbuffers::Verifiable;
1193        v.in_buffer::<Self>(pos)
1194    }
1195}
1196
1197impl<'a> Buffer {
1198    #[allow(clippy::too_many_arguments)]
1199    pub fn new(offset: i64, length: i64) -> Self {
1200        let mut s = Self([0; 16]);
1201        s.set_offset(offset);
1202        s.set_length(length);
1203        s
1204    }
1205
1206    /// The relative offset into the shared memory page where the bytes for this
1207    /// buffer starts
1208    pub fn offset(&self) -> i64 {
1209        let mut mem = core::mem::MaybeUninit::<<i64 as EndianScalar>::Scalar>::uninit();
1210        // Safety:
1211        // Created from a valid Table for this object
1212        // Which contains a valid value in this slot
1213        EndianScalar::from_little_endian(unsafe {
1214            core::ptr::copy_nonoverlapping(
1215                self.0[0..].as_ptr(),
1216                mem.as_mut_ptr() as *mut u8,
1217                core::mem::size_of::<<i64 as EndianScalar>::Scalar>(),
1218            );
1219            mem.assume_init()
1220        })
1221    }
1222
1223    pub fn set_offset(&mut self, x: i64) {
1224        let x_le = x.to_little_endian();
1225        // Safety:
1226        // Created from a valid Table for this object
1227        // Which contains a valid value in this slot
1228        unsafe {
1229            core::ptr::copy_nonoverlapping(
1230                &x_le as *const _ as *const u8,
1231                self.0[0..].as_mut_ptr(),
1232                core::mem::size_of::<<i64 as EndianScalar>::Scalar>(),
1233            );
1234        }
1235    }
1236
1237    /// The absolute length (in bytes) of the memory buffer. The memory is found
1238    /// from offset (inclusive) to offset + length (non-inclusive). When building
1239    /// messages using the encapsulated IPC message, padding bytes may be written
1240    /// after a buffer, but such padding bytes do not need to be accounted for in
1241    /// the size here.
1242    pub fn length(&self) -> i64 {
1243        let mut mem = core::mem::MaybeUninit::<<i64 as EndianScalar>::Scalar>::uninit();
1244        // Safety:
1245        // Created from a valid Table for this object
1246        // Which contains a valid value in this slot
1247        EndianScalar::from_little_endian(unsafe {
1248            core::ptr::copy_nonoverlapping(
1249                self.0[8..].as_ptr(),
1250                mem.as_mut_ptr() as *mut u8,
1251                core::mem::size_of::<<i64 as EndianScalar>::Scalar>(),
1252            );
1253            mem.assume_init()
1254        })
1255    }
1256
1257    pub fn set_length(&mut self, x: i64) {
1258        let x_le = x.to_little_endian();
1259        // Safety:
1260        // Created from a valid Table for this object
1261        // Which contains a valid value in this slot
1262        unsafe {
1263            core::ptr::copy_nonoverlapping(
1264                &x_le as *const _ as *const u8,
1265                self.0[8..].as_mut_ptr(),
1266                core::mem::size_of::<<i64 as EndianScalar>::Scalar>(),
1267            );
1268        }
1269    }
1270}
1271
1272pub enum NullOffset {}
1273#[derive(Copy, Clone, PartialEq)]
1274
1275/// These are stored in the flatbuffer in the Type union below
1276pub struct Null<'a> {
1277    pub _tab: flatbuffers::Table<'a>,
1278}
1279
1280impl<'a> flatbuffers::Follow<'a> for Null<'a> {
1281    type Inner = Null<'a>;
1282    #[inline]
1283    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1284        Self {
1285            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
1286        }
1287    }
1288}
1289
1290impl<'a> Null<'a> {
1291    #[inline]
1292    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1293        Null { _tab: table }
1294    }
1295    #[allow(unused_mut)]
1296    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1297        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1298        _args: &'args NullArgs,
1299    ) -> flatbuffers::WIPOffset<Null<'bldr>> {
1300        let mut builder = NullBuilder::new(_fbb);
1301        builder.finish()
1302    }
1303}
1304
1305impl flatbuffers::Verifiable for Null<'_> {
1306    #[inline]
1307    fn run_verifier(
1308        v: &mut flatbuffers::Verifier,
1309        pos: usize,
1310    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1311        use flatbuffers::Verifiable;
1312        v.visit_table(pos)?.finish();
1313        Ok(())
1314    }
1315}
1316pub struct NullArgs {}
1317impl<'a> Default for NullArgs {
1318    #[inline]
1319    fn default() -> Self {
1320        NullArgs {}
1321    }
1322}
1323
1324pub struct NullBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1325    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1326    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1327}
1328impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> NullBuilder<'a, 'b, A> {
1329    #[inline]
1330    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> NullBuilder<'a, 'b, A> {
1331        let start = _fbb.start_table();
1332        NullBuilder {
1333            fbb_: _fbb,
1334            start_: start,
1335        }
1336    }
1337    #[inline]
1338    pub fn finish(self) -> flatbuffers::WIPOffset<Null<'a>> {
1339        let o = self.fbb_.end_table(self.start_);
1340        flatbuffers::WIPOffset::new(o.value())
1341    }
1342}
1343
1344impl core::fmt::Debug for Null<'_> {
1345    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1346        let mut ds = f.debug_struct("Null");
1347        ds.finish()
1348    }
1349}
1350pub enum Struct_Offset {}
1351#[derive(Copy, Clone, PartialEq)]
1352
1353/// A Struct_ in the flatbuffer metadata is the same as an Arrow Struct
1354/// (according to the physical memory layout). We used Struct_ here as
1355/// Struct is a reserved word in Flatbuffers
1356pub struct Struct_<'a> {
1357    pub _tab: flatbuffers::Table<'a>,
1358}
1359
1360impl<'a> flatbuffers::Follow<'a> for Struct_<'a> {
1361    type Inner = Struct_<'a>;
1362    #[inline]
1363    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1364        Self {
1365            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
1366        }
1367    }
1368}
1369
1370impl<'a> Struct_<'a> {
1371    #[inline]
1372    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1373        Struct_ { _tab: table }
1374    }
1375    #[allow(unused_mut)]
1376    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1377        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1378        _args: &'args Struct_Args,
1379    ) -> flatbuffers::WIPOffset<Struct_<'bldr>> {
1380        let mut builder = Struct_Builder::new(_fbb);
1381        builder.finish()
1382    }
1383}
1384
1385impl flatbuffers::Verifiable for Struct_<'_> {
1386    #[inline]
1387    fn run_verifier(
1388        v: &mut flatbuffers::Verifier,
1389        pos: usize,
1390    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1391        use flatbuffers::Verifiable;
1392        v.visit_table(pos)?.finish();
1393        Ok(())
1394    }
1395}
1396pub struct Struct_Args {}
1397impl<'a> Default for Struct_Args {
1398    #[inline]
1399    fn default() -> Self {
1400        Struct_Args {}
1401    }
1402}
1403
1404pub struct Struct_Builder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1405    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1406    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1407}
1408impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> Struct_Builder<'a, 'b, A> {
1409    #[inline]
1410    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> Struct_Builder<'a, 'b, A> {
1411        let start = _fbb.start_table();
1412        Struct_Builder {
1413            fbb_: _fbb,
1414            start_: start,
1415        }
1416    }
1417    #[inline]
1418    pub fn finish(self) -> flatbuffers::WIPOffset<Struct_<'a>> {
1419        let o = self.fbb_.end_table(self.start_);
1420        flatbuffers::WIPOffset::new(o.value())
1421    }
1422}
1423
1424impl core::fmt::Debug for Struct_<'_> {
1425    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1426        let mut ds = f.debug_struct("Struct_");
1427        ds.finish()
1428    }
1429}
1430pub enum ListOffset {}
1431#[derive(Copy, Clone, PartialEq)]
1432
1433pub struct List<'a> {
1434    pub _tab: flatbuffers::Table<'a>,
1435}
1436
1437impl<'a> flatbuffers::Follow<'a> for List<'a> {
1438    type Inner = List<'a>;
1439    #[inline]
1440    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1441        Self {
1442            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
1443        }
1444    }
1445}
1446
1447impl<'a> List<'a> {
1448    #[inline]
1449    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1450        List { _tab: table }
1451    }
1452    #[allow(unused_mut)]
1453    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1454        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1455        _args: &'args ListArgs,
1456    ) -> flatbuffers::WIPOffset<List<'bldr>> {
1457        let mut builder = ListBuilder::new(_fbb);
1458        builder.finish()
1459    }
1460}
1461
1462impl flatbuffers::Verifiable for List<'_> {
1463    #[inline]
1464    fn run_verifier(
1465        v: &mut flatbuffers::Verifier,
1466        pos: usize,
1467    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1468        use flatbuffers::Verifiable;
1469        v.visit_table(pos)?.finish();
1470        Ok(())
1471    }
1472}
1473pub struct ListArgs {}
1474impl<'a> Default for ListArgs {
1475    #[inline]
1476    fn default() -> Self {
1477        ListArgs {}
1478    }
1479}
1480
1481pub struct ListBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1482    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1483    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1484}
1485impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ListBuilder<'a, 'b, A> {
1486    #[inline]
1487    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ListBuilder<'a, 'b, A> {
1488        let start = _fbb.start_table();
1489        ListBuilder {
1490            fbb_: _fbb,
1491            start_: start,
1492        }
1493    }
1494    #[inline]
1495    pub fn finish(self) -> flatbuffers::WIPOffset<List<'a>> {
1496        let o = self.fbb_.end_table(self.start_);
1497        flatbuffers::WIPOffset::new(o.value())
1498    }
1499}
1500
1501impl core::fmt::Debug for List<'_> {
1502    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1503        let mut ds = f.debug_struct("List");
1504        ds.finish()
1505    }
1506}
1507pub enum LargeListOffset {}
1508#[derive(Copy, Clone, PartialEq)]
1509
1510/// Same as List, but with 64-bit offsets, allowing to represent
1511/// extremely large data values.
1512pub struct LargeList<'a> {
1513    pub _tab: flatbuffers::Table<'a>,
1514}
1515
1516impl<'a> flatbuffers::Follow<'a> for LargeList<'a> {
1517    type Inner = LargeList<'a>;
1518    #[inline]
1519    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1520        Self {
1521            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
1522        }
1523    }
1524}
1525
1526impl<'a> LargeList<'a> {
1527    #[inline]
1528    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1529        LargeList { _tab: table }
1530    }
1531    #[allow(unused_mut)]
1532    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1533        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1534        _args: &'args LargeListArgs,
1535    ) -> flatbuffers::WIPOffset<LargeList<'bldr>> {
1536        let mut builder = LargeListBuilder::new(_fbb);
1537        builder.finish()
1538    }
1539}
1540
1541impl flatbuffers::Verifiable for LargeList<'_> {
1542    #[inline]
1543    fn run_verifier(
1544        v: &mut flatbuffers::Verifier,
1545        pos: usize,
1546    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1547        use flatbuffers::Verifiable;
1548        v.visit_table(pos)?.finish();
1549        Ok(())
1550    }
1551}
1552pub struct LargeListArgs {}
1553impl<'a> Default for LargeListArgs {
1554    #[inline]
1555    fn default() -> Self {
1556        LargeListArgs {}
1557    }
1558}
1559
1560pub struct LargeListBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1561    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1562    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1563}
1564impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> LargeListBuilder<'a, 'b, A> {
1565    #[inline]
1566    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> LargeListBuilder<'a, 'b, A> {
1567        let start = _fbb.start_table();
1568        LargeListBuilder {
1569            fbb_: _fbb,
1570            start_: start,
1571        }
1572    }
1573    #[inline]
1574    pub fn finish(self) -> flatbuffers::WIPOffset<LargeList<'a>> {
1575        let o = self.fbb_.end_table(self.start_);
1576        flatbuffers::WIPOffset::new(o.value())
1577    }
1578}
1579
1580impl core::fmt::Debug for LargeList<'_> {
1581    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1582        let mut ds = f.debug_struct("LargeList");
1583        ds.finish()
1584    }
1585}
1586pub enum ListViewOffset {}
1587#[derive(Copy, Clone, PartialEq)]
1588
1589/// Represents the same logical types that List can, but contains offsets and
1590/// sizes allowing for writes in any order and sharing of child values among
1591/// list values.
1592pub struct ListView<'a> {
1593    pub _tab: flatbuffers::Table<'a>,
1594}
1595
1596impl<'a> flatbuffers::Follow<'a> for ListView<'a> {
1597    type Inner = ListView<'a>;
1598    #[inline]
1599    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1600        Self {
1601            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
1602        }
1603    }
1604}
1605
1606impl<'a> ListView<'a> {
1607    #[inline]
1608    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1609        ListView { _tab: table }
1610    }
1611    #[allow(unused_mut)]
1612    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1613        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1614        _args: &'args ListViewArgs,
1615    ) -> flatbuffers::WIPOffset<ListView<'bldr>> {
1616        let mut builder = ListViewBuilder::new(_fbb);
1617        builder.finish()
1618    }
1619}
1620
1621impl flatbuffers::Verifiable for ListView<'_> {
1622    #[inline]
1623    fn run_verifier(
1624        v: &mut flatbuffers::Verifier,
1625        pos: usize,
1626    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1627        use flatbuffers::Verifiable;
1628        v.visit_table(pos)?.finish();
1629        Ok(())
1630    }
1631}
1632pub struct ListViewArgs {}
1633impl<'a> Default for ListViewArgs {
1634    #[inline]
1635    fn default() -> Self {
1636        ListViewArgs {}
1637    }
1638}
1639
1640pub struct ListViewBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1641    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1642    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1643}
1644impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ListViewBuilder<'a, 'b, A> {
1645    #[inline]
1646    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ListViewBuilder<'a, 'b, A> {
1647        let start = _fbb.start_table();
1648        ListViewBuilder {
1649            fbb_: _fbb,
1650            start_: start,
1651        }
1652    }
1653    #[inline]
1654    pub fn finish(self) -> flatbuffers::WIPOffset<ListView<'a>> {
1655        let o = self.fbb_.end_table(self.start_);
1656        flatbuffers::WIPOffset::new(o.value())
1657    }
1658}
1659
1660impl core::fmt::Debug for ListView<'_> {
1661    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1662        let mut ds = f.debug_struct("ListView");
1663        ds.finish()
1664    }
1665}
1666pub enum LargeListViewOffset {}
1667#[derive(Copy, Clone, PartialEq)]
1668
1669/// Same as ListView, but with 64-bit offsets and sizes, allowing to represent
1670/// extremely large data values.
1671pub struct LargeListView<'a> {
1672    pub _tab: flatbuffers::Table<'a>,
1673}
1674
1675impl<'a> flatbuffers::Follow<'a> for LargeListView<'a> {
1676    type Inner = LargeListView<'a>;
1677    #[inline]
1678    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1679        Self {
1680            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
1681        }
1682    }
1683}
1684
1685impl<'a> LargeListView<'a> {
1686    #[inline]
1687    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1688        LargeListView { _tab: table }
1689    }
1690    #[allow(unused_mut)]
1691    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1692        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1693        _args: &'args LargeListViewArgs,
1694    ) -> flatbuffers::WIPOffset<LargeListView<'bldr>> {
1695        let mut builder = LargeListViewBuilder::new(_fbb);
1696        builder.finish()
1697    }
1698}
1699
1700impl flatbuffers::Verifiable for LargeListView<'_> {
1701    #[inline]
1702    fn run_verifier(
1703        v: &mut flatbuffers::Verifier,
1704        pos: usize,
1705    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1706        use flatbuffers::Verifiable;
1707        v.visit_table(pos)?.finish();
1708        Ok(())
1709    }
1710}
1711pub struct LargeListViewArgs {}
1712impl<'a> Default for LargeListViewArgs {
1713    #[inline]
1714    fn default() -> Self {
1715        LargeListViewArgs {}
1716    }
1717}
1718
1719pub struct LargeListViewBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1720    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1721    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1722}
1723impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> LargeListViewBuilder<'a, 'b, A> {
1724    #[inline]
1725    pub fn new(
1726        _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1727    ) -> LargeListViewBuilder<'a, 'b, A> {
1728        let start = _fbb.start_table();
1729        LargeListViewBuilder {
1730            fbb_: _fbb,
1731            start_: start,
1732        }
1733    }
1734    #[inline]
1735    pub fn finish(self) -> flatbuffers::WIPOffset<LargeListView<'a>> {
1736        let o = self.fbb_.end_table(self.start_);
1737        flatbuffers::WIPOffset::new(o.value())
1738    }
1739}
1740
1741impl core::fmt::Debug for LargeListView<'_> {
1742    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1743        let mut ds = f.debug_struct("LargeListView");
1744        ds.finish()
1745    }
1746}
1747pub enum FixedSizeListOffset {}
1748#[derive(Copy, Clone, PartialEq)]
1749
1750pub struct FixedSizeList<'a> {
1751    pub _tab: flatbuffers::Table<'a>,
1752}
1753
1754impl<'a> flatbuffers::Follow<'a> for FixedSizeList<'a> {
1755    type Inner = FixedSizeList<'a>;
1756    #[inline]
1757    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1758        Self {
1759            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
1760        }
1761    }
1762}
1763
1764impl<'a> FixedSizeList<'a> {
1765    pub const VT_LISTSIZE: flatbuffers::VOffsetT = 4;
1766
1767    #[inline]
1768    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1769        FixedSizeList { _tab: table }
1770    }
1771    #[allow(unused_mut)]
1772    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1773        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1774        args: &'args FixedSizeListArgs,
1775    ) -> flatbuffers::WIPOffset<FixedSizeList<'bldr>> {
1776        let mut builder = FixedSizeListBuilder::new(_fbb);
1777        builder.add_listSize(args.listSize);
1778        builder.finish()
1779    }
1780
1781    /// Number of list items per value
1782    #[inline]
1783    pub fn listSize(&self) -> i32 {
1784        // Safety:
1785        // Created from valid Table for this object
1786        // which contains a valid value in this slot
1787        unsafe {
1788            self._tab
1789                .get::<i32>(FixedSizeList::VT_LISTSIZE, Some(0))
1790                .unwrap()
1791        }
1792    }
1793}
1794
1795impl flatbuffers::Verifiable for FixedSizeList<'_> {
1796    #[inline]
1797    fn run_verifier(
1798        v: &mut flatbuffers::Verifier,
1799        pos: usize,
1800    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1801        use flatbuffers::Verifiable;
1802        v.visit_table(pos)?
1803            .visit_field::<i32>("listSize", Self::VT_LISTSIZE, false)?
1804            .finish();
1805        Ok(())
1806    }
1807}
1808pub struct FixedSizeListArgs {
1809    pub listSize: i32,
1810}
1811impl<'a> Default for FixedSizeListArgs {
1812    #[inline]
1813    fn default() -> Self {
1814        FixedSizeListArgs { listSize: 0 }
1815    }
1816}
1817
1818pub struct FixedSizeListBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1819    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1820    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1821}
1822impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FixedSizeListBuilder<'a, 'b, A> {
1823    #[inline]
1824    pub fn add_listSize(&mut self, listSize: i32) {
1825        self.fbb_
1826            .push_slot::<i32>(FixedSizeList::VT_LISTSIZE, listSize, 0);
1827    }
1828    #[inline]
1829    pub fn new(
1830        _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1831    ) -> FixedSizeListBuilder<'a, 'b, A> {
1832        let start = _fbb.start_table();
1833        FixedSizeListBuilder {
1834            fbb_: _fbb,
1835            start_: start,
1836        }
1837    }
1838    #[inline]
1839    pub fn finish(self) -> flatbuffers::WIPOffset<FixedSizeList<'a>> {
1840        let o = self.fbb_.end_table(self.start_);
1841        flatbuffers::WIPOffset::new(o.value())
1842    }
1843}
1844
1845impl core::fmt::Debug for FixedSizeList<'_> {
1846    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1847        let mut ds = f.debug_struct("FixedSizeList");
1848        ds.field("listSize", &self.listSize());
1849        ds.finish()
1850    }
1851}
1852pub enum MapOffset {}
1853#[derive(Copy, Clone, PartialEq)]
1854
1855/// A Map is a logical nested type that is represented as
1856///
1857/// List<entries: Struct<key: K, value: V>>
1858///
1859/// In this layout, the keys and values are each respectively contiguous. We do
1860/// not constrain the key and value types, so the application is responsible
1861/// for ensuring that the keys are hashable and unique. Whether the keys are sorted
1862/// may be set in the metadata for this field.
1863///
1864/// In a field with Map type, the field has a child Struct field, which then
1865/// has two children: key type and the second the value type. The names of the
1866/// child fields may be respectively "entries", "key", and "value", but this is
1867/// not enforced.
1868///
1869/// Map
1870/// ```text
1871///   - child[0] entries: Struct
1872///     - child[0] key: K
1873///     - child[1] value: V
1874/// ```
1875/// Neither the "entries" field nor the "key" field may be nullable.
1876///
1877/// The metadata is structured so that Arrow systems without special handling
1878/// for Map can make Map an alias for List. The "layout" attribute for the Map
1879/// field must have the same contents as a List.
1880pub struct Map<'a> {
1881    pub _tab: flatbuffers::Table<'a>,
1882}
1883
1884impl<'a> flatbuffers::Follow<'a> for Map<'a> {
1885    type Inner = Map<'a>;
1886    #[inline]
1887    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1888        Self {
1889            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
1890        }
1891    }
1892}
1893
1894impl<'a> Map<'a> {
1895    pub const VT_KEYSSORTED: flatbuffers::VOffsetT = 4;
1896
1897    #[inline]
1898    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1899        Map { _tab: table }
1900    }
1901    #[allow(unused_mut)]
1902    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1903        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1904        args: &'args MapArgs,
1905    ) -> flatbuffers::WIPOffset<Map<'bldr>> {
1906        let mut builder = MapBuilder::new(_fbb);
1907        builder.add_keysSorted(args.keysSorted);
1908        builder.finish()
1909    }
1910
1911    /// Set to true if the keys within each value are sorted
1912    #[inline]
1913    pub fn keysSorted(&self) -> bool {
1914        // Safety:
1915        // Created from valid Table for this object
1916        // which contains a valid value in this slot
1917        unsafe {
1918            self._tab
1919                .get::<bool>(Map::VT_KEYSSORTED, Some(false))
1920                .unwrap()
1921        }
1922    }
1923}
1924
1925impl flatbuffers::Verifiable for Map<'_> {
1926    #[inline]
1927    fn run_verifier(
1928        v: &mut flatbuffers::Verifier,
1929        pos: usize,
1930    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1931        use flatbuffers::Verifiable;
1932        v.visit_table(pos)?
1933            .visit_field::<bool>("keysSorted", Self::VT_KEYSSORTED, false)?
1934            .finish();
1935        Ok(())
1936    }
1937}
1938pub struct MapArgs {
1939    pub keysSorted: bool,
1940}
1941impl<'a> Default for MapArgs {
1942    #[inline]
1943    fn default() -> Self {
1944        MapArgs { keysSorted: false }
1945    }
1946}
1947
1948pub struct MapBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1949    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1950    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1951}
1952impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MapBuilder<'a, 'b, A> {
1953    #[inline]
1954    pub fn add_keysSorted(&mut self, keysSorted: bool) {
1955        self.fbb_
1956            .push_slot::<bool>(Map::VT_KEYSSORTED, keysSorted, false);
1957    }
1958    #[inline]
1959    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MapBuilder<'a, 'b, A> {
1960        let start = _fbb.start_table();
1961        MapBuilder {
1962            fbb_: _fbb,
1963            start_: start,
1964        }
1965    }
1966    #[inline]
1967    pub fn finish(self) -> flatbuffers::WIPOffset<Map<'a>> {
1968        let o = self.fbb_.end_table(self.start_);
1969        flatbuffers::WIPOffset::new(o.value())
1970    }
1971}
1972
1973impl core::fmt::Debug for Map<'_> {
1974    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1975        let mut ds = f.debug_struct("Map");
1976        ds.field("keysSorted", &self.keysSorted());
1977        ds.finish()
1978    }
1979}
1980pub enum UnionOffset {}
1981#[derive(Copy, Clone, PartialEq)]
1982
1983/// A union is a complex type with children in Field
1984/// By default ids in the type vector refer to the offsets in the children
1985/// optionally typeIds provides an indirection between the child offset and the type id
1986/// for each child `typeIds[offset]` is the id used in the type vector
1987pub struct Union<'a> {
1988    pub _tab: flatbuffers::Table<'a>,
1989}
1990
1991impl<'a> flatbuffers::Follow<'a> for Union<'a> {
1992    type Inner = Union<'a>;
1993    #[inline]
1994    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1995        Self {
1996            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
1997        }
1998    }
1999}
2000
2001impl<'a> Union<'a> {
2002    pub const VT_MODE: flatbuffers::VOffsetT = 4;
2003    pub const VT_TYPEIDS: flatbuffers::VOffsetT = 6;
2004
2005    #[inline]
2006    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2007        Union { _tab: table }
2008    }
2009    #[allow(unused_mut)]
2010    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2011        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2012        args: &'args UnionArgs<'args>,
2013    ) -> flatbuffers::WIPOffset<Union<'bldr>> {
2014        let mut builder = UnionBuilder::new(_fbb);
2015        if let Some(x) = args.typeIds {
2016            builder.add_typeIds(x);
2017        }
2018        builder.add_mode(args.mode);
2019        builder.finish()
2020    }
2021
2022    #[inline]
2023    pub fn mode(&self) -> UnionMode {
2024        // Safety:
2025        // Created from valid Table for this object
2026        // which contains a valid value in this slot
2027        unsafe {
2028            self._tab
2029                .get::<UnionMode>(Union::VT_MODE, Some(UnionMode::Sparse))
2030                .unwrap()
2031        }
2032    }
2033    #[inline]
2034    pub fn typeIds(&self) -> Option<flatbuffers::Vector<'a, i32>> {
2035        // Safety:
2036        // Created from valid Table for this object
2037        // which contains a valid value in this slot
2038        unsafe {
2039            self._tab
2040                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i32>>>(
2041                    Union::VT_TYPEIDS,
2042                    None,
2043                )
2044        }
2045    }
2046}
2047
2048impl flatbuffers::Verifiable for Union<'_> {
2049    #[inline]
2050    fn run_verifier(
2051        v: &mut flatbuffers::Verifier,
2052        pos: usize,
2053    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2054        use flatbuffers::Verifiable;
2055        v.visit_table(pos)?
2056            .visit_field::<UnionMode>("mode", Self::VT_MODE, false)?
2057            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>(
2058                "typeIds",
2059                Self::VT_TYPEIDS,
2060                false,
2061            )?
2062            .finish();
2063        Ok(())
2064    }
2065}
2066pub struct UnionArgs<'a> {
2067    pub mode: UnionMode,
2068    pub typeIds: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
2069}
2070impl<'a> Default for UnionArgs<'a> {
2071    #[inline]
2072    fn default() -> Self {
2073        UnionArgs {
2074            mode: UnionMode::Sparse,
2075            typeIds: None,
2076        }
2077    }
2078}
2079
2080pub struct UnionBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2081    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2082    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2083}
2084impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UnionBuilder<'a, 'b, A> {
2085    #[inline]
2086    pub fn add_mode(&mut self, mode: UnionMode) {
2087        self.fbb_
2088            .push_slot::<UnionMode>(Union::VT_MODE, mode, UnionMode::Sparse);
2089    }
2090    #[inline]
2091    pub fn add_typeIds(&mut self, typeIds: flatbuffers::WIPOffset<flatbuffers::Vector<'b, i32>>) {
2092        self.fbb_
2093            .push_slot_always::<flatbuffers::WIPOffset<_>>(Union::VT_TYPEIDS, typeIds);
2094    }
2095    #[inline]
2096    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> UnionBuilder<'a, 'b, A> {
2097        let start = _fbb.start_table();
2098        UnionBuilder {
2099            fbb_: _fbb,
2100            start_: start,
2101        }
2102    }
2103    #[inline]
2104    pub fn finish(self) -> flatbuffers::WIPOffset<Union<'a>> {
2105        let o = self.fbb_.end_table(self.start_);
2106        flatbuffers::WIPOffset::new(o.value())
2107    }
2108}
2109
2110impl core::fmt::Debug for Union<'_> {
2111    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2112        let mut ds = f.debug_struct("Union");
2113        ds.field("mode", &self.mode());
2114        ds.field("typeIds", &self.typeIds());
2115        ds.finish()
2116    }
2117}
2118pub enum IntOffset {}
2119#[derive(Copy, Clone, PartialEq)]
2120
2121pub struct Int<'a> {
2122    pub _tab: flatbuffers::Table<'a>,
2123}
2124
2125impl<'a> flatbuffers::Follow<'a> for Int<'a> {
2126    type Inner = Int<'a>;
2127    #[inline]
2128    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2129        Self {
2130            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
2131        }
2132    }
2133}
2134
2135impl<'a> Int<'a> {
2136    pub const VT_BITWIDTH: flatbuffers::VOffsetT = 4;
2137    pub const VT_IS_SIGNED: flatbuffers::VOffsetT = 6;
2138
2139    #[inline]
2140    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2141        Int { _tab: table }
2142    }
2143    #[allow(unused_mut)]
2144    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2145        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2146        args: &'args IntArgs,
2147    ) -> flatbuffers::WIPOffset<Int<'bldr>> {
2148        let mut builder = IntBuilder::new(_fbb);
2149        builder.add_bitWidth(args.bitWidth);
2150        builder.add_is_signed(args.is_signed);
2151        builder.finish()
2152    }
2153
2154    #[inline]
2155    pub fn bitWidth(&self) -> i32 {
2156        // Safety:
2157        // Created from valid Table for this object
2158        // which contains a valid value in this slot
2159        unsafe { self._tab.get::<i32>(Int::VT_BITWIDTH, Some(0)).unwrap() }
2160    }
2161    #[inline]
2162    pub fn is_signed(&self) -> bool {
2163        // Safety:
2164        // Created from valid Table for this object
2165        // which contains a valid value in this slot
2166        unsafe {
2167            self._tab
2168                .get::<bool>(Int::VT_IS_SIGNED, Some(false))
2169                .unwrap()
2170        }
2171    }
2172}
2173
2174impl flatbuffers::Verifiable for Int<'_> {
2175    #[inline]
2176    fn run_verifier(
2177        v: &mut flatbuffers::Verifier,
2178        pos: usize,
2179    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2180        use flatbuffers::Verifiable;
2181        v.visit_table(pos)?
2182            .visit_field::<i32>("bitWidth", Self::VT_BITWIDTH, false)?
2183            .visit_field::<bool>("is_signed", Self::VT_IS_SIGNED, false)?
2184            .finish();
2185        Ok(())
2186    }
2187}
2188pub struct IntArgs {
2189    pub bitWidth: i32,
2190    pub is_signed: bool,
2191}
2192impl<'a> Default for IntArgs {
2193    #[inline]
2194    fn default() -> Self {
2195        IntArgs {
2196            bitWidth: 0,
2197            is_signed: false,
2198        }
2199    }
2200}
2201
2202pub struct IntBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2203    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2204    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2205}
2206impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> IntBuilder<'a, 'b, A> {
2207    #[inline]
2208    pub fn add_bitWidth(&mut self, bitWidth: i32) {
2209        self.fbb_.push_slot::<i32>(Int::VT_BITWIDTH, bitWidth, 0);
2210    }
2211    #[inline]
2212    pub fn add_is_signed(&mut self, is_signed: bool) {
2213        self.fbb_
2214            .push_slot::<bool>(Int::VT_IS_SIGNED, is_signed, false);
2215    }
2216    #[inline]
2217    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> IntBuilder<'a, 'b, A> {
2218        let start = _fbb.start_table();
2219        IntBuilder {
2220            fbb_: _fbb,
2221            start_: start,
2222        }
2223    }
2224    #[inline]
2225    pub fn finish(self) -> flatbuffers::WIPOffset<Int<'a>> {
2226        let o = self.fbb_.end_table(self.start_);
2227        flatbuffers::WIPOffset::new(o.value())
2228    }
2229}
2230
2231impl core::fmt::Debug for Int<'_> {
2232    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2233        let mut ds = f.debug_struct("Int");
2234        ds.field("bitWidth", &self.bitWidth());
2235        ds.field("is_signed", &self.is_signed());
2236        ds.finish()
2237    }
2238}
2239pub enum FloatingPointOffset {}
2240#[derive(Copy, Clone, PartialEq)]
2241
2242pub struct FloatingPoint<'a> {
2243    pub _tab: flatbuffers::Table<'a>,
2244}
2245
2246impl<'a> flatbuffers::Follow<'a> for FloatingPoint<'a> {
2247    type Inner = FloatingPoint<'a>;
2248    #[inline]
2249    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2250        Self {
2251            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
2252        }
2253    }
2254}
2255
2256impl<'a> FloatingPoint<'a> {
2257    pub const VT_PRECISION: flatbuffers::VOffsetT = 4;
2258
2259    #[inline]
2260    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2261        FloatingPoint { _tab: table }
2262    }
2263    #[allow(unused_mut)]
2264    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2265        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2266        args: &'args FloatingPointArgs,
2267    ) -> flatbuffers::WIPOffset<FloatingPoint<'bldr>> {
2268        let mut builder = FloatingPointBuilder::new(_fbb);
2269        builder.add_precision(args.precision);
2270        builder.finish()
2271    }
2272
2273    #[inline]
2274    pub fn precision(&self) -> Precision {
2275        // Safety:
2276        // Created from valid Table for this object
2277        // which contains a valid value in this slot
2278        unsafe {
2279            self._tab
2280                .get::<Precision>(FloatingPoint::VT_PRECISION, Some(Precision::HALF))
2281                .unwrap()
2282        }
2283    }
2284}
2285
2286impl flatbuffers::Verifiable for FloatingPoint<'_> {
2287    #[inline]
2288    fn run_verifier(
2289        v: &mut flatbuffers::Verifier,
2290        pos: usize,
2291    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2292        use flatbuffers::Verifiable;
2293        v.visit_table(pos)?
2294            .visit_field::<Precision>("precision", Self::VT_PRECISION, false)?
2295            .finish();
2296        Ok(())
2297    }
2298}
2299pub struct FloatingPointArgs {
2300    pub precision: Precision,
2301}
2302impl<'a> Default for FloatingPointArgs {
2303    #[inline]
2304    fn default() -> Self {
2305        FloatingPointArgs {
2306            precision: Precision::HALF,
2307        }
2308    }
2309}
2310
2311pub struct FloatingPointBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2312    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2313    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2314}
2315impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FloatingPointBuilder<'a, 'b, A> {
2316    #[inline]
2317    pub fn add_precision(&mut self, precision: Precision) {
2318        self.fbb_
2319            .push_slot::<Precision>(FloatingPoint::VT_PRECISION, precision, Precision::HALF);
2320    }
2321    #[inline]
2322    pub fn new(
2323        _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2324    ) -> FloatingPointBuilder<'a, 'b, A> {
2325        let start = _fbb.start_table();
2326        FloatingPointBuilder {
2327            fbb_: _fbb,
2328            start_: start,
2329        }
2330    }
2331    #[inline]
2332    pub fn finish(self) -> flatbuffers::WIPOffset<FloatingPoint<'a>> {
2333        let o = self.fbb_.end_table(self.start_);
2334        flatbuffers::WIPOffset::new(o.value())
2335    }
2336}
2337
2338impl core::fmt::Debug for FloatingPoint<'_> {
2339    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2340        let mut ds = f.debug_struct("FloatingPoint");
2341        ds.field("precision", &self.precision());
2342        ds.finish()
2343    }
2344}
2345pub enum Utf8Offset {}
2346#[derive(Copy, Clone, PartialEq)]
2347
2348/// Unicode with UTF-8 encoding
2349pub struct Utf8<'a> {
2350    pub _tab: flatbuffers::Table<'a>,
2351}
2352
2353impl<'a> flatbuffers::Follow<'a> for Utf8<'a> {
2354    type Inner = Utf8<'a>;
2355    #[inline]
2356    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2357        Self {
2358            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
2359        }
2360    }
2361}
2362
2363impl<'a> Utf8<'a> {
2364    #[inline]
2365    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2366        Utf8 { _tab: table }
2367    }
2368    #[allow(unused_mut)]
2369    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2370        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2371        _args: &'args Utf8Args,
2372    ) -> flatbuffers::WIPOffset<Utf8<'bldr>> {
2373        let mut builder = Utf8Builder::new(_fbb);
2374        builder.finish()
2375    }
2376}
2377
2378impl flatbuffers::Verifiable for Utf8<'_> {
2379    #[inline]
2380    fn run_verifier(
2381        v: &mut flatbuffers::Verifier,
2382        pos: usize,
2383    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2384        use flatbuffers::Verifiable;
2385        v.visit_table(pos)?.finish();
2386        Ok(())
2387    }
2388}
2389pub struct Utf8Args {}
2390impl<'a> Default for Utf8Args {
2391    #[inline]
2392    fn default() -> Self {
2393        Utf8Args {}
2394    }
2395}
2396
2397pub struct Utf8Builder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2398    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2399    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2400}
2401impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> Utf8Builder<'a, 'b, A> {
2402    #[inline]
2403    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> Utf8Builder<'a, 'b, A> {
2404        let start = _fbb.start_table();
2405        Utf8Builder {
2406            fbb_: _fbb,
2407            start_: start,
2408        }
2409    }
2410    #[inline]
2411    pub fn finish(self) -> flatbuffers::WIPOffset<Utf8<'a>> {
2412        let o = self.fbb_.end_table(self.start_);
2413        flatbuffers::WIPOffset::new(o.value())
2414    }
2415}
2416
2417impl core::fmt::Debug for Utf8<'_> {
2418    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2419        let mut ds = f.debug_struct("Utf8");
2420        ds.finish()
2421    }
2422}
2423pub enum BinaryOffset {}
2424#[derive(Copy, Clone, PartialEq)]
2425
2426/// Opaque binary data
2427pub struct Binary<'a> {
2428    pub _tab: flatbuffers::Table<'a>,
2429}
2430
2431impl<'a> flatbuffers::Follow<'a> for Binary<'a> {
2432    type Inner = Binary<'a>;
2433    #[inline]
2434    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2435        Self {
2436            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
2437        }
2438    }
2439}
2440
2441impl<'a> Binary<'a> {
2442    #[inline]
2443    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2444        Binary { _tab: table }
2445    }
2446    #[allow(unused_mut)]
2447    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2448        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2449        _args: &'args BinaryArgs,
2450    ) -> flatbuffers::WIPOffset<Binary<'bldr>> {
2451        let mut builder = BinaryBuilder::new(_fbb);
2452        builder.finish()
2453    }
2454}
2455
2456impl flatbuffers::Verifiable for Binary<'_> {
2457    #[inline]
2458    fn run_verifier(
2459        v: &mut flatbuffers::Verifier,
2460        pos: usize,
2461    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2462        use flatbuffers::Verifiable;
2463        v.visit_table(pos)?.finish();
2464        Ok(())
2465    }
2466}
2467pub struct BinaryArgs {}
2468impl<'a> Default for BinaryArgs {
2469    #[inline]
2470    fn default() -> Self {
2471        BinaryArgs {}
2472    }
2473}
2474
2475pub struct BinaryBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2476    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2477    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2478}
2479impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BinaryBuilder<'a, 'b, A> {
2480    #[inline]
2481    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BinaryBuilder<'a, 'b, A> {
2482        let start = _fbb.start_table();
2483        BinaryBuilder {
2484            fbb_: _fbb,
2485            start_: start,
2486        }
2487    }
2488    #[inline]
2489    pub fn finish(self) -> flatbuffers::WIPOffset<Binary<'a>> {
2490        let o = self.fbb_.end_table(self.start_);
2491        flatbuffers::WIPOffset::new(o.value())
2492    }
2493}
2494
2495impl core::fmt::Debug for Binary<'_> {
2496    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2497        let mut ds = f.debug_struct("Binary");
2498        ds.finish()
2499    }
2500}
2501pub enum LargeUtf8Offset {}
2502#[derive(Copy, Clone, PartialEq)]
2503
2504/// Same as Utf8, but with 64-bit offsets, allowing to represent
2505/// extremely large data values.
2506pub struct LargeUtf8<'a> {
2507    pub _tab: flatbuffers::Table<'a>,
2508}
2509
2510impl<'a> flatbuffers::Follow<'a> for LargeUtf8<'a> {
2511    type Inner = LargeUtf8<'a>;
2512    #[inline]
2513    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2514        Self {
2515            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
2516        }
2517    }
2518}
2519
2520impl<'a> LargeUtf8<'a> {
2521    #[inline]
2522    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2523        LargeUtf8 { _tab: table }
2524    }
2525    #[allow(unused_mut)]
2526    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2527        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2528        _args: &'args LargeUtf8Args,
2529    ) -> flatbuffers::WIPOffset<LargeUtf8<'bldr>> {
2530        let mut builder = LargeUtf8Builder::new(_fbb);
2531        builder.finish()
2532    }
2533}
2534
2535impl flatbuffers::Verifiable for LargeUtf8<'_> {
2536    #[inline]
2537    fn run_verifier(
2538        v: &mut flatbuffers::Verifier,
2539        pos: usize,
2540    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2541        use flatbuffers::Verifiable;
2542        v.visit_table(pos)?.finish();
2543        Ok(())
2544    }
2545}
2546pub struct LargeUtf8Args {}
2547impl<'a> Default for LargeUtf8Args {
2548    #[inline]
2549    fn default() -> Self {
2550        LargeUtf8Args {}
2551    }
2552}
2553
2554pub struct LargeUtf8Builder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2555    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2556    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2557}
2558impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> LargeUtf8Builder<'a, 'b, A> {
2559    #[inline]
2560    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> LargeUtf8Builder<'a, 'b, A> {
2561        let start = _fbb.start_table();
2562        LargeUtf8Builder {
2563            fbb_: _fbb,
2564            start_: start,
2565        }
2566    }
2567    #[inline]
2568    pub fn finish(self) -> flatbuffers::WIPOffset<LargeUtf8<'a>> {
2569        let o = self.fbb_.end_table(self.start_);
2570        flatbuffers::WIPOffset::new(o.value())
2571    }
2572}
2573
2574impl core::fmt::Debug for LargeUtf8<'_> {
2575    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2576        let mut ds = f.debug_struct("LargeUtf8");
2577        ds.finish()
2578    }
2579}
2580pub enum LargeBinaryOffset {}
2581#[derive(Copy, Clone, PartialEq)]
2582
2583/// Same as Binary, but with 64-bit offsets, allowing to represent
2584/// extremely large data values.
2585pub struct LargeBinary<'a> {
2586    pub _tab: flatbuffers::Table<'a>,
2587}
2588
2589impl<'a> flatbuffers::Follow<'a> for LargeBinary<'a> {
2590    type Inner = LargeBinary<'a>;
2591    #[inline]
2592    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2593        Self {
2594            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
2595        }
2596    }
2597}
2598
2599impl<'a> LargeBinary<'a> {
2600    #[inline]
2601    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2602        LargeBinary { _tab: table }
2603    }
2604    #[allow(unused_mut)]
2605    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2606        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2607        _args: &'args LargeBinaryArgs,
2608    ) -> flatbuffers::WIPOffset<LargeBinary<'bldr>> {
2609        let mut builder = LargeBinaryBuilder::new(_fbb);
2610        builder.finish()
2611    }
2612}
2613
2614impl flatbuffers::Verifiable for LargeBinary<'_> {
2615    #[inline]
2616    fn run_verifier(
2617        v: &mut flatbuffers::Verifier,
2618        pos: usize,
2619    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2620        use flatbuffers::Verifiable;
2621        v.visit_table(pos)?.finish();
2622        Ok(())
2623    }
2624}
2625pub struct LargeBinaryArgs {}
2626impl<'a> Default for LargeBinaryArgs {
2627    #[inline]
2628    fn default() -> Self {
2629        LargeBinaryArgs {}
2630    }
2631}
2632
2633pub struct LargeBinaryBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2634    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2635    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2636}
2637impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> LargeBinaryBuilder<'a, 'b, A> {
2638    #[inline]
2639    pub fn new(
2640        _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2641    ) -> LargeBinaryBuilder<'a, 'b, A> {
2642        let start = _fbb.start_table();
2643        LargeBinaryBuilder {
2644            fbb_: _fbb,
2645            start_: start,
2646        }
2647    }
2648    #[inline]
2649    pub fn finish(self) -> flatbuffers::WIPOffset<LargeBinary<'a>> {
2650        let o = self.fbb_.end_table(self.start_);
2651        flatbuffers::WIPOffset::new(o.value())
2652    }
2653}
2654
2655impl core::fmt::Debug for LargeBinary<'_> {
2656    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2657        let mut ds = f.debug_struct("LargeBinary");
2658        ds.finish()
2659    }
2660}
2661pub enum Utf8ViewOffset {}
2662#[derive(Copy, Clone, PartialEq)]
2663
2664/// Logically the same as Utf8, but the internal representation uses a view
2665/// struct that contains the string length and either the string's entire data
2666/// inline (for small strings) or an inlined prefix, an index of another buffer,
2667/// and an offset pointing to a slice in that buffer (for non-small strings).
2668///
2669/// Since it uses a variable number of data buffers, each Field with this type
2670/// must have a corresponding entry in `variadicBufferCounts`.
2671pub struct Utf8View<'a> {
2672    pub _tab: flatbuffers::Table<'a>,
2673}
2674
2675impl<'a> flatbuffers::Follow<'a> for Utf8View<'a> {
2676    type Inner = Utf8View<'a>;
2677    #[inline]
2678    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2679        Self {
2680            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
2681        }
2682    }
2683}
2684
2685impl<'a> Utf8View<'a> {
2686    #[inline]
2687    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2688        Utf8View { _tab: table }
2689    }
2690    #[allow(unused_mut)]
2691    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2692        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2693        _args: &'args Utf8ViewArgs,
2694    ) -> flatbuffers::WIPOffset<Utf8View<'bldr>> {
2695        let mut builder = Utf8ViewBuilder::new(_fbb);
2696        builder.finish()
2697    }
2698}
2699
2700impl flatbuffers::Verifiable for Utf8View<'_> {
2701    #[inline]
2702    fn run_verifier(
2703        v: &mut flatbuffers::Verifier,
2704        pos: usize,
2705    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2706        use flatbuffers::Verifiable;
2707        v.visit_table(pos)?.finish();
2708        Ok(())
2709    }
2710}
2711pub struct Utf8ViewArgs {}
2712impl<'a> Default for Utf8ViewArgs {
2713    #[inline]
2714    fn default() -> Self {
2715        Utf8ViewArgs {}
2716    }
2717}
2718
2719pub struct Utf8ViewBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2720    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2721    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2722}
2723impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> Utf8ViewBuilder<'a, 'b, A> {
2724    #[inline]
2725    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> Utf8ViewBuilder<'a, 'b, A> {
2726        let start = _fbb.start_table();
2727        Utf8ViewBuilder {
2728            fbb_: _fbb,
2729            start_: start,
2730        }
2731    }
2732    #[inline]
2733    pub fn finish(self) -> flatbuffers::WIPOffset<Utf8View<'a>> {
2734        let o = self.fbb_.end_table(self.start_);
2735        flatbuffers::WIPOffset::new(o.value())
2736    }
2737}
2738
2739impl core::fmt::Debug for Utf8View<'_> {
2740    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2741        let mut ds = f.debug_struct("Utf8View");
2742        ds.finish()
2743    }
2744}
2745pub enum BinaryViewOffset {}
2746#[derive(Copy, Clone, PartialEq)]
2747
2748/// Logically the same as Binary, but the internal representation uses a view
2749/// struct that contains the string length and either the string's entire data
2750/// inline (for small strings) or an inlined prefix, an index of another buffer,
2751/// and an offset pointing to a slice in that buffer (for non-small strings).
2752///
2753/// Since it uses a variable number of data buffers, each Field with this type
2754/// must have a corresponding entry in `variadicBufferCounts`.
2755pub struct BinaryView<'a> {
2756    pub _tab: flatbuffers::Table<'a>,
2757}
2758
2759impl<'a> flatbuffers::Follow<'a> for BinaryView<'a> {
2760    type Inner = BinaryView<'a>;
2761    #[inline]
2762    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2763        Self {
2764            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
2765        }
2766    }
2767}
2768
2769impl<'a> BinaryView<'a> {
2770    #[inline]
2771    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2772        BinaryView { _tab: table }
2773    }
2774    #[allow(unused_mut)]
2775    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2776        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2777        _args: &'args BinaryViewArgs,
2778    ) -> flatbuffers::WIPOffset<BinaryView<'bldr>> {
2779        let mut builder = BinaryViewBuilder::new(_fbb);
2780        builder.finish()
2781    }
2782}
2783
2784impl flatbuffers::Verifiable for BinaryView<'_> {
2785    #[inline]
2786    fn run_verifier(
2787        v: &mut flatbuffers::Verifier,
2788        pos: usize,
2789    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2790        use flatbuffers::Verifiable;
2791        v.visit_table(pos)?.finish();
2792        Ok(())
2793    }
2794}
2795pub struct BinaryViewArgs {}
2796impl<'a> Default for BinaryViewArgs {
2797    #[inline]
2798    fn default() -> Self {
2799        BinaryViewArgs {}
2800    }
2801}
2802
2803pub struct BinaryViewBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2804    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2805    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2806}
2807impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BinaryViewBuilder<'a, 'b, A> {
2808    #[inline]
2809    pub fn new(
2810        _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2811    ) -> BinaryViewBuilder<'a, 'b, A> {
2812        let start = _fbb.start_table();
2813        BinaryViewBuilder {
2814            fbb_: _fbb,
2815            start_: start,
2816        }
2817    }
2818    #[inline]
2819    pub fn finish(self) -> flatbuffers::WIPOffset<BinaryView<'a>> {
2820        let o = self.fbb_.end_table(self.start_);
2821        flatbuffers::WIPOffset::new(o.value())
2822    }
2823}
2824
2825impl core::fmt::Debug for BinaryView<'_> {
2826    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2827        let mut ds = f.debug_struct("BinaryView");
2828        ds.finish()
2829    }
2830}
2831pub enum FixedSizeBinaryOffset {}
2832#[derive(Copy, Clone, PartialEq)]
2833
2834pub struct FixedSizeBinary<'a> {
2835    pub _tab: flatbuffers::Table<'a>,
2836}
2837
2838impl<'a> flatbuffers::Follow<'a> for FixedSizeBinary<'a> {
2839    type Inner = FixedSizeBinary<'a>;
2840    #[inline]
2841    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2842        Self {
2843            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
2844        }
2845    }
2846}
2847
2848impl<'a> FixedSizeBinary<'a> {
2849    pub const VT_BYTEWIDTH: flatbuffers::VOffsetT = 4;
2850
2851    #[inline]
2852    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2853        FixedSizeBinary { _tab: table }
2854    }
2855    #[allow(unused_mut)]
2856    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2857        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2858        args: &'args FixedSizeBinaryArgs,
2859    ) -> flatbuffers::WIPOffset<FixedSizeBinary<'bldr>> {
2860        let mut builder = FixedSizeBinaryBuilder::new(_fbb);
2861        builder.add_byteWidth(args.byteWidth);
2862        builder.finish()
2863    }
2864
2865    /// Number of bytes per value
2866    #[inline]
2867    pub fn byteWidth(&self) -> i32 {
2868        // Safety:
2869        // Created from valid Table for this object
2870        // which contains a valid value in this slot
2871        unsafe {
2872            self._tab
2873                .get::<i32>(FixedSizeBinary::VT_BYTEWIDTH, Some(0))
2874                .unwrap()
2875        }
2876    }
2877}
2878
2879impl flatbuffers::Verifiable for FixedSizeBinary<'_> {
2880    #[inline]
2881    fn run_verifier(
2882        v: &mut flatbuffers::Verifier,
2883        pos: usize,
2884    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2885        use flatbuffers::Verifiable;
2886        v.visit_table(pos)?
2887            .visit_field::<i32>("byteWidth", Self::VT_BYTEWIDTH, false)?
2888            .finish();
2889        Ok(())
2890    }
2891}
2892pub struct FixedSizeBinaryArgs {
2893    pub byteWidth: i32,
2894}
2895impl<'a> Default for FixedSizeBinaryArgs {
2896    #[inline]
2897    fn default() -> Self {
2898        FixedSizeBinaryArgs { byteWidth: 0 }
2899    }
2900}
2901
2902pub struct FixedSizeBinaryBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2903    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2904    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2905}
2906impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FixedSizeBinaryBuilder<'a, 'b, A> {
2907    #[inline]
2908    pub fn add_byteWidth(&mut self, byteWidth: i32) {
2909        self.fbb_
2910            .push_slot::<i32>(FixedSizeBinary::VT_BYTEWIDTH, byteWidth, 0);
2911    }
2912    #[inline]
2913    pub fn new(
2914        _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2915    ) -> FixedSizeBinaryBuilder<'a, 'b, A> {
2916        let start = _fbb.start_table();
2917        FixedSizeBinaryBuilder {
2918            fbb_: _fbb,
2919            start_: start,
2920        }
2921    }
2922    #[inline]
2923    pub fn finish(self) -> flatbuffers::WIPOffset<FixedSizeBinary<'a>> {
2924        let o = self.fbb_.end_table(self.start_);
2925        flatbuffers::WIPOffset::new(o.value())
2926    }
2927}
2928
2929impl core::fmt::Debug for FixedSizeBinary<'_> {
2930    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2931        let mut ds = f.debug_struct("FixedSizeBinary");
2932        ds.field("byteWidth", &self.byteWidth());
2933        ds.finish()
2934    }
2935}
2936pub enum BoolOffset {}
2937#[derive(Copy, Clone, PartialEq)]
2938
2939pub struct Bool<'a> {
2940    pub _tab: flatbuffers::Table<'a>,
2941}
2942
2943impl<'a> flatbuffers::Follow<'a> for Bool<'a> {
2944    type Inner = Bool<'a>;
2945    #[inline]
2946    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2947        Self {
2948            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
2949        }
2950    }
2951}
2952
2953impl<'a> Bool<'a> {
2954    #[inline]
2955    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2956        Bool { _tab: table }
2957    }
2958    #[allow(unused_mut)]
2959    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2960        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2961        _args: &'args BoolArgs,
2962    ) -> flatbuffers::WIPOffset<Bool<'bldr>> {
2963        let mut builder = BoolBuilder::new(_fbb);
2964        builder.finish()
2965    }
2966}
2967
2968impl flatbuffers::Verifiable for Bool<'_> {
2969    #[inline]
2970    fn run_verifier(
2971        v: &mut flatbuffers::Verifier,
2972        pos: usize,
2973    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2974        use flatbuffers::Verifiable;
2975        v.visit_table(pos)?.finish();
2976        Ok(())
2977    }
2978}
2979pub struct BoolArgs {}
2980impl<'a> Default for BoolArgs {
2981    #[inline]
2982    fn default() -> Self {
2983        BoolArgs {}
2984    }
2985}
2986
2987pub struct BoolBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2988    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2989    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2990}
2991impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BoolBuilder<'a, 'b, A> {
2992    #[inline]
2993    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BoolBuilder<'a, 'b, A> {
2994        let start = _fbb.start_table();
2995        BoolBuilder {
2996            fbb_: _fbb,
2997            start_: start,
2998        }
2999    }
3000    #[inline]
3001    pub fn finish(self) -> flatbuffers::WIPOffset<Bool<'a>> {
3002        let o = self.fbb_.end_table(self.start_);
3003        flatbuffers::WIPOffset::new(o.value())
3004    }
3005}
3006
3007impl core::fmt::Debug for Bool<'_> {
3008    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3009        let mut ds = f.debug_struct("Bool");
3010        ds.finish()
3011    }
3012}
3013pub enum RunEndEncodedOffset {}
3014#[derive(Copy, Clone, PartialEq)]
3015
3016/// Contains two child arrays, run_ends and values.
3017/// The run_ends child array must be a 16/32/64-bit integer array
3018/// which encodes the indices at which the run with the value in
3019/// each corresponding index in the values child array ends.
3020/// Like list/struct types, the value array can be of any type.
3021pub struct RunEndEncoded<'a> {
3022    pub _tab: flatbuffers::Table<'a>,
3023}
3024
3025impl<'a> flatbuffers::Follow<'a> for RunEndEncoded<'a> {
3026    type Inner = RunEndEncoded<'a>;
3027    #[inline]
3028    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3029        Self {
3030            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
3031        }
3032    }
3033}
3034
3035impl<'a> RunEndEncoded<'a> {
3036    #[inline]
3037    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3038        RunEndEncoded { _tab: table }
3039    }
3040    #[allow(unused_mut)]
3041    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3042        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3043        _args: &'args RunEndEncodedArgs,
3044    ) -> flatbuffers::WIPOffset<RunEndEncoded<'bldr>> {
3045        let mut builder = RunEndEncodedBuilder::new(_fbb);
3046        builder.finish()
3047    }
3048}
3049
3050impl flatbuffers::Verifiable for RunEndEncoded<'_> {
3051    #[inline]
3052    fn run_verifier(
3053        v: &mut flatbuffers::Verifier,
3054        pos: usize,
3055    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3056        use flatbuffers::Verifiable;
3057        v.visit_table(pos)?.finish();
3058        Ok(())
3059    }
3060}
3061pub struct RunEndEncodedArgs {}
3062impl<'a> Default for RunEndEncodedArgs {
3063    #[inline]
3064    fn default() -> Self {
3065        RunEndEncodedArgs {}
3066    }
3067}
3068
3069pub struct RunEndEncodedBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3070    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3071    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3072}
3073impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RunEndEncodedBuilder<'a, 'b, A> {
3074    #[inline]
3075    pub fn new(
3076        _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3077    ) -> RunEndEncodedBuilder<'a, 'b, A> {
3078        let start = _fbb.start_table();
3079        RunEndEncodedBuilder {
3080            fbb_: _fbb,
3081            start_: start,
3082        }
3083    }
3084    #[inline]
3085    pub fn finish(self) -> flatbuffers::WIPOffset<RunEndEncoded<'a>> {
3086        let o = self.fbb_.end_table(self.start_);
3087        flatbuffers::WIPOffset::new(o.value())
3088    }
3089}
3090
3091impl core::fmt::Debug for RunEndEncoded<'_> {
3092    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3093        let mut ds = f.debug_struct("RunEndEncoded");
3094        ds.finish()
3095    }
3096}
3097pub enum DecimalOffset {}
3098#[derive(Copy, Clone, PartialEq)]
3099
3100/// Exact decimal value represented as an integer value in two's
3101/// complement. Currently only 128-bit (16-byte) and 256-bit (32-byte) integers
3102/// are used. The representation uses the endianness indicated
3103/// in the Schema.
3104pub struct Decimal<'a> {
3105    pub _tab: flatbuffers::Table<'a>,
3106}
3107
3108impl<'a> flatbuffers::Follow<'a> for Decimal<'a> {
3109    type Inner = Decimal<'a>;
3110    #[inline]
3111    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3112        Self {
3113            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
3114        }
3115    }
3116}
3117
3118impl<'a> Decimal<'a> {
3119    pub const VT_PRECISION: flatbuffers::VOffsetT = 4;
3120    pub const VT_SCALE: flatbuffers::VOffsetT = 6;
3121    pub const VT_BITWIDTH: flatbuffers::VOffsetT = 8;
3122
3123    #[inline]
3124    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3125        Decimal { _tab: table }
3126    }
3127    #[allow(unused_mut)]
3128    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3129        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3130        args: &'args DecimalArgs,
3131    ) -> flatbuffers::WIPOffset<Decimal<'bldr>> {
3132        let mut builder = DecimalBuilder::new(_fbb);
3133        builder.add_bitWidth(args.bitWidth);
3134        builder.add_scale(args.scale);
3135        builder.add_precision(args.precision);
3136        builder.finish()
3137    }
3138
3139    /// Total number of decimal digits
3140    #[inline]
3141    pub fn precision(&self) -> i32 {
3142        // Safety:
3143        // Created from valid Table for this object
3144        // which contains a valid value in this slot
3145        unsafe {
3146            self._tab
3147                .get::<i32>(Decimal::VT_PRECISION, Some(0))
3148                .unwrap()
3149        }
3150    }
3151    /// Number of digits after the decimal point "."
3152    #[inline]
3153    pub fn scale(&self) -> i32 {
3154        // Safety:
3155        // Created from valid Table for this object
3156        // which contains a valid value in this slot
3157        unsafe { self._tab.get::<i32>(Decimal::VT_SCALE, Some(0)).unwrap() }
3158    }
3159    /// Number of bits per value. The only accepted widths are 128 and 256.
3160    /// We use bitWidth for consistency with Int::bitWidth.
3161    #[inline]
3162    pub fn bitWidth(&self) -> i32 {
3163        // Safety:
3164        // Created from valid Table for this object
3165        // which contains a valid value in this slot
3166        unsafe {
3167            self._tab
3168                .get::<i32>(Decimal::VT_BITWIDTH, Some(128))
3169                .unwrap()
3170        }
3171    }
3172}
3173
3174impl flatbuffers::Verifiable for Decimal<'_> {
3175    #[inline]
3176    fn run_verifier(
3177        v: &mut flatbuffers::Verifier,
3178        pos: usize,
3179    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3180        use flatbuffers::Verifiable;
3181        v.visit_table(pos)?
3182            .visit_field::<i32>("precision", Self::VT_PRECISION, false)?
3183            .visit_field::<i32>("scale", Self::VT_SCALE, false)?
3184            .visit_field::<i32>("bitWidth", Self::VT_BITWIDTH, false)?
3185            .finish();
3186        Ok(())
3187    }
3188}
3189pub struct DecimalArgs {
3190    pub precision: i32,
3191    pub scale: i32,
3192    pub bitWidth: i32,
3193}
3194impl<'a> Default for DecimalArgs {
3195    #[inline]
3196    fn default() -> Self {
3197        DecimalArgs {
3198            precision: 0,
3199            scale: 0,
3200            bitWidth: 128,
3201        }
3202    }
3203}
3204
3205pub struct DecimalBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3206    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3207    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3208}
3209impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DecimalBuilder<'a, 'b, A> {
3210    #[inline]
3211    pub fn add_precision(&mut self, precision: i32) {
3212        self.fbb_
3213            .push_slot::<i32>(Decimal::VT_PRECISION, precision, 0);
3214    }
3215    #[inline]
3216    pub fn add_scale(&mut self, scale: i32) {
3217        self.fbb_.push_slot::<i32>(Decimal::VT_SCALE, scale, 0);
3218    }
3219    #[inline]
3220    pub fn add_bitWidth(&mut self, bitWidth: i32) {
3221        self.fbb_
3222            .push_slot::<i32>(Decimal::VT_BITWIDTH, bitWidth, 128);
3223    }
3224    #[inline]
3225    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> DecimalBuilder<'a, 'b, A> {
3226        let start = _fbb.start_table();
3227        DecimalBuilder {
3228            fbb_: _fbb,
3229            start_: start,
3230        }
3231    }
3232    #[inline]
3233    pub fn finish(self) -> flatbuffers::WIPOffset<Decimal<'a>> {
3234        let o = self.fbb_.end_table(self.start_);
3235        flatbuffers::WIPOffset::new(o.value())
3236    }
3237}
3238
3239impl core::fmt::Debug for Decimal<'_> {
3240    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3241        let mut ds = f.debug_struct("Decimal");
3242        ds.field("precision", &self.precision());
3243        ds.field("scale", &self.scale());
3244        ds.field("bitWidth", &self.bitWidth());
3245        ds.finish()
3246    }
3247}
3248pub enum DateOffset {}
3249#[derive(Copy, Clone, PartialEq)]
3250
3251/// Date is either a 32-bit or 64-bit signed integer type representing an
3252/// elapsed time since UNIX epoch (1970-01-01), stored in either of two units:
3253///
3254/// * Milliseconds (64 bits) indicating UNIX time elapsed since the epoch (no
3255///   leap seconds), where the values are evenly divisible by 86400000
3256/// * Days (32 bits) since the UNIX epoch
3257pub struct Date<'a> {
3258    pub _tab: flatbuffers::Table<'a>,
3259}
3260
3261impl<'a> flatbuffers::Follow<'a> for Date<'a> {
3262    type Inner = Date<'a>;
3263    #[inline]
3264    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3265        Self {
3266            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
3267        }
3268    }
3269}
3270
3271impl<'a> Date<'a> {
3272    pub const VT_UNIT: flatbuffers::VOffsetT = 4;
3273
3274    #[inline]
3275    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3276        Date { _tab: table }
3277    }
3278    #[allow(unused_mut)]
3279    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3280        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3281        args: &'args DateArgs,
3282    ) -> flatbuffers::WIPOffset<Date<'bldr>> {
3283        let mut builder = DateBuilder::new(_fbb);
3284        builder.add_unit(args.unit);
3285        builder.finish()
3286    }
3287
3288    #[inline]
3289    pub fn unit(&self) -> DateUnit {
3290        // Safety:
3291        // Created from valid Table for this object
3292        // which contains a valid value in this slot
3293        unsafe {
3294            self._tab
3295                .get::<DateUnit>(Date::VT_UNIT, Some(DateUnit::MILLISECOND))
3296                .unwrap()
3297        }
3298    }
3299}
3300
3301impl flatbuffers::Verifiable for Date<'_> {
3302    #[inline]
3303    fn run_verifier(
3304        v: &mut flatbuffers::Verifier,
3305        pos: usize,
3306    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3307        use flatbuffers::Verifiable;
3308        v.visit_table(pos)?
3309            .visit_field::<DateUnit>("unit", Self::VT_UNIT, false)?
3310            .finish();
3311        Ok(())
3312    }
3313}
3314pub struct DateArgs {
3315    pub unit: DateUnit,
3316}
3317impl<'a> Default for DateArgs {
3318    #[inline]
3319    fn default() -> Self {
3320        DateArgs {
3321            unit: DateUnit::MILLISECOND,
3322        }
3323    }
3324}
3325
3326pub struct DateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3327    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3328    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3329}
3330impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DateBuilder<'a, 'b, A> {
3331    #[inline]
3332    pub fn add_unit(&mut self, unit: DateUnit) {
3333        self.fbb_
3334            .push_slot::<DateUnit>(Date::VT_UNIT, unit, DateUnit::MILLISECOND);
3335    }
3336    #[inline]
3337    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> DateBuilder<'a, 'b, A> {
3338        let start = _fbb.start_table();
3339        DateBuilder {
3340            fbb_: _fbb,
3341            start_: start,
3342        }
3343    }
3344    #[inline]
3345    pub fn finish(self) -> flatbuffers::WIPOffset<Date<'a>> {
3346        let o = self.fbb_.end_table(self.start_);
3347        flatbuffers::WIPOffset::new(o.value())
3348    }
3349}
3350
3351impl core::fmt::Debug for Date<'_> {
3352    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3353        let mut ds = f.debug_struct("Date");
3354        ds.field("unit", &self.unit());
3355        ds.finish()
3356    }
3357}
3358pub enum TimeOffset {}
3359#[derive(Copy, Clone, PartialEq)]
3360
3361/// Time is either a 32-bit or 64-bit signed integer type representing an
3362/// elapsed time since midnight, stored in either of four units: seconds,
3363/// milliseconds, microseconds or nanoseconds.
3364///
3365/// The integer `bitWidth` depends on the `unit` and must be one of the following:
3366/// * SECOND and MILLISECOND: 32 bits
3367/// * MICROSECOND and NANOSECOND: 64 bits
3368///
3369/// The allowed values are between 0 (inclusive) and 86400 (=24*60*60) seconds
3370/// (exclusive), adjusted for the time unit (for example, up to 86400000
3371/// exclusive for the MILLISECOND unit).
3372/// This definition doesn't allow for leap seconds. Time values from
3373/// measurements with leap seconds will need to be corrected when ingesting
3374/// into Arrow (for example by replacing the value 86400 with 86399).
3375pub struct Time<'a> {
3376    pub _tab: flatbuffers::Table<'a>,
3377}
3378
3379impl<'a> flatbuffers::Follow<'a> for Time<'a> {
3380    type Inner = Time<'a>;
3381    #[inline]
3382    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3383        Self {
3384            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
3385        }
3386    }
3387}
3388
3389impl<'a> Time<'a> {
3390    pub const VT_UNIT: flatbuffers::VOffsetT = 4;
3391    pub const VT_BITWIDTH: flatbuffers::VOffsetT = 6;
3392
3393    #[inline]
3394    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3395        Time { _tab: table }
3396    }
3397    #[allow(unused_mut)]
3398    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3399        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3400        args: &'args TimeArgs,
3401    ) -> flatbuffers::WIPOffset<Time<'bldr>> {
3402        let mut builder = TimeBuilder::new(_fbb);
3403        builder.add_bitWidth(args.bitWidth);
3404        builder.add_unit(args.unit);
3405        builder.finish()
3406    }
3407
3408    #[inline]
3409    pub fn unit(&self) -> TimeUnit {
3410        // Safety:
3411        // Created from valid Table for this object
3412        // which contains a valid value in this slot
3413        unsafe {
3414            self._tab
3415                .get::<TimeUnit>(Time::VT_UNIT, Some(TimeUnit::MILLISECOND))
3416                .unwrap()
3417        }
3418    }
3419    #[inline]
3420    pub fn bitWidth(&self) -> i32 {
3421        // Safety:
3422        // Created from valid Table for this object
3423        // which contains a valid value in this slot
3424        unsafe { self._tab.get::<i32>(Time::VT_BITWIDTH, Some(32)).unwrap() }
3425    }
3426}
3427
3428impl flatbuffers::Verifiable for Time<'_> {
3429    #[inline]
3430    fn run_verifier(
3431        v: &mut flatbuffers::Verifier,
3432        pos: usize,
3433    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3434        use flatbuffers::Verifiable;
3435        v.visit_table(pos)?
3436            .visit_field::<TimeUnit>("unit", Self::VT_UNIT, false)?
3437            .visit_field::<i32>("bitWidth", Self::VT_BITWIDTH, false)?
3438            .finish();
3439        Ok(())
3440    }
3441}
3442pub struct TimeArgs {
3443    pub unit: TimeUnit,
3444    pub bitWidth: i32,
3445}
3446impl<'a> Default for TimeArgs {
3447    #[inline]
3448    fn default() -> Self {
3449        TimeArgs {
3450            unit: TimeUnit::MILLISECOND,
3451            bitWidth: 32,
3452        }
3453    }
3454}
3455
3456pub struct TimeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3457    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3458    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3459}
3460impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TimeBuilder<'a, 'b, A> {
3461    #[inline]
3462    pub fn add_unit(&mut self, unit: TimeUnit) {
3463        self.fbb_
3464            .push_slot::<TimeUnit>(Time::VT_UNIT, unit, TimeUnit::MILLISECOND);
3465    }
3466    #[inline]
3467    pub fn add_bitWidth(&mut self, bitWidth: i32) {
3468        self.fbb_.push_slot::<i32>(Time::VT_BITWIDTH, bitWidth, 32);
3469    }
3470    #[inline]
3471    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TimeBuilder<'a, 'b, A> {
3472        let start = _fbb.start_table();
3473        TimeBuilder {
3474            fbb_: _fbb,
3475            start_: start,
3476        }
3477    }
3478    #[inline]
3479    pub fn finish(self) -> flatbuffers::WIPOffset<Time<'a>> {
3480        let o = self.fbb_.end_table(self.start_);
3481        flatbuffers::WIPOffset::new(o.value())
3482    }
3483}
3484
3485impl core::fmt::Debug for Time<'_> {
3486    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3487        let mut ds = f.debug_struct("Time");
3488        ds.field("unit", &self.unit());
3489        ds.field("bitWidth", &self.bitWidth());
3490        ds.finish()
3491    }
3492}
3493pub enum TimestampOffset {}
3494#[derive(Copy, Clone, PartialEq)]
3495
3496/// Timestamp is a 64-bit signed integer representing an elapsed time since a
3497/// fixed epoch, stored in either of four units: seconds, milliseconds,
3498/// microseconds or nanoseconds, and is optionally annotated with a timezone.
3499///
3500/// Timestamp values do not include any leap seconds (in other words, all
3501/// days are considered 86400 seconds long).
3502///
3503/// Timestamps with a non-empty timezone
3504/// ------------------------------------
3505///
3506/// If a Timestamp column has a non-empty timezone value, its epoch is
3507/// 1970-01-01 00:00:00 (January 1st 1970, midnight) in the *UTC* timezone
3508/// (the Unix epoch), regardless of the Timestamp's own timezone.
3509///
3510/// Therefore, timestamp values with a non-empty timezone correspond to
3511/// physical points in time together with some additional information about
3512/// how the data was obtained and/or how to display it (the timezone).
3513///
3514///   For example, the timestamp value 0 with the timezone string "Europe/Paris"
3515///   corresponds to "January 1st 1970, 00h00" in the UTC timezone, but the
3516///   application may prefer to display it as "January 1st 1970, 01h00" in
3517///   the Europe/Paris timezone (which is the same physical point in time).
3518///
3519/// One consequence is that timestamp values with a non-empty timezone
3520/// can be compared and ordered directly, since they all share the same
3521/// well-known point of reference (the Unix epoch).
3522///
3523/// Timestamps with an unset / empty timezone
3524/// -----------------------------------------
3525///
3526/// If a Timestamp column has no timezone value, its epoch is
3527/// 1970-01-01 00:00:00 (January 1st 1970, midnight) in an *unknown* timezone.
3528///
3529/// Therefore, timestamp values without a timezone cannot be meaningfully
3530/// interpreted as physical points in time, but only as calendar / clock
3531/// indications ("wall clock time") in an unspecified timezone.
3532///
3533///   For example, the timestamp value 0 with an empty timezone string
3534///   corresponds to "January 1st 1970, 00h00" in an unknown timezone: there
3535///   is not enough information to interpret it as a well-defined physical
3536///   point in time.
3537///
3538/// One consequence is that timestamp values without a timezone cannot
3539/// be reliably compared or ordered, since they may have different points of
3540/// reference.  In particular, it is *not* possible to interpret an unset
3541/// or empty timezone as the same as "UTC".
3542///
3543/// Conversion between timezones
3544/// ----------------------------
3545///
3546/// If a Timestamp column has a non-empty timezone, changing the timezone
3547/// to a different non-empty value is a metadata-only operation:
3548/// the timestamp values need not change as their point of reference remains
3549/// the same (the Unix epoch).
3550///
3551/// However, if a Timestamp column has no timezone value, changing it to a
3552/// non-empty value requires to think about the desired semantics.
3553/// One possibility is to assume that the original timestamp values are
3554/// relative to the epoch of the timezone being set; timestamp values should
3555/// then adjusted to the Unix epoch (for example, changing the timezone from
3556/// empty to "Europe/Paris" would require converting the timestamp values
3557/// from "Europe/Paris" to "UTC", which seems counter-intuitive but is
3558/// nevertheless correct).
3559///
3560/// Guidelines for encoding data from external libraries
3561/// ----------------------------------------------------
3562///
3563/// Date & time libraries often have multiple different data types for temporal
3564/// data. In order to ease interoperability between different implementations the
3565/// Arrow project has some recommendations for encoding these types into a Timestamp
3566/// column.
3567///
3568/// An "instant" represents a physical point in time that has no relevant timezone
3569/// (for example, astronomical data). To encode an instant, use a Timestamp with
3570/// the timezone string set to "UTC", and make sure the Timestamp values
3571/// are relative to the UTC epoch (January 1st 1970, midnight).
3572///
3573/// A "zoned date-time" represents a physical point in time annotated with an
3574/// informative timezone (for example, the timezone in which the data was
3575/// recorded).  To encode a zoned date-time, use a Timestamp with the timezone
3576/// string set to the name of the timezone, and make sure the Timestamp values
3577/// are relative to the UTC epoch (January 1st 1970, midnight).
3578///
3579///  (There is some ambiguity between an instant and a zoned date-time with the
3580///   UTC timezone.  Both of these are stored the same in Arrow.  Typically,
3581///   this distinction does not matter.  If it does, then an application should
3582///   use custom metadata or an extension type to distinguish between the two cases.)
3583///
3584/// An "offset date-time" represents a physical point in time combined with an
3585/// explicit offset from UTC.  To encode an offset date-time, use a Timestamp
3586/// with the timezone string set to the numeric timezone offset string
3587/// (e.g. "+03:00"), and make sure the Timestamp values are relative to
3588/// the UTC epoch (January 1st 1970, midnight).
3589///
3590/// A "naive date-time" (also called "local date-time" in some libraries)
3591/// represents a wall clock time combined with a calendar date, but with
3592/// no indication of how to map this information to a physical point in time.
3593/// Naive date-times must be handled with care because of this missing
3594/// information, and also because daylight saving time (DST) may make
3595/// some values ambiguous or nonexistent. A naive date-time may be
3596/// stored as a struct with Date and Time fields. However, it may also be
3597/// encoded into a Timestamp column with an empty timezone. The timestamp
3598/// values should be computed "as if" the timezone of the date-time values
3599/// was UTC; for example, the naive date-time "January 1st 1970, 00h00" would
3600/// be encoded as timestamp value 0.
3601pub struct Timestamp<'a> {
3602    pub _tab: flatbuffers::Table<'a>,
3603}
3604
3605impl<'a> flatbuffers::Follow<'a> for Timestamp<'a> {
3606    type Inner = Timestamp<'a>;
3607    #[inline]
3608    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3609        Self {
3610            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
3611        }
3612    }
3613}
3614
3615impl<'a> Timestamp<'a> {
3616    pub const VT_UNIT: flatbuffers::VOffsetT = 4;
3617    pub const VT_TIMEZONE: flatbuffers::VOffsetT = 6;
3618
3619    #[inline]
3620    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3621        Timestamp { _tab: table }
3622    }
3623    #[allow(unused_mut)]
3624    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3625        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3626        args: &'args TimestampArgs<'args>,
3627    ) -> flatbuffers::WIPOffset<Timestamp<'bldr>> {
3628        let mut builder = TimestampBuilder::new(_fbb);
3629        if let Some(x) = args.timezone {
3630            builder.add_timezone(x);
3631        }
3632        builder.add_unit(args.unit);
3633        builder.finish()
3634    }
3635
3636    #[inline]
3637    pub fn unit(&self) -> TimeUnit {
3638        // Safety:
3639        // Created from valid Table for this object
3640        // which contains a valid value in this slot
3641        unsafe {
3642            self._tab
3643                .get::<TimeUnit>(Timestamp::VT_UNIT, Some(TimeUnit::SECOND))
3644                .unwrap()
3645        }
3646    }
3647    /// The timezone is an optional string indicating the name of a timezone,
3648    /// one of:
3649    ///
3650    /// * As used in the Olson timezone database (the "tz database" or
3651    ///   "tzdata"), such as "America/New_York".
3652    /// * An absolute timezone offset of the form "+XX:XX" or "-XX:XX",
3653    ///   such as "+07:30".
3654    ///
3655    /// Whether a timezone string is present indicates different semantics about
3656    /// the data (see above).
3657    #[inline]
3658    pub fn timezone(&self) -> Option<&'a str> {
3659        // Safety:
3660        // Created from valid Table for this object
3661        // which contains a valid value in this slot
3662        unsafe {
3663            self._tab
3664                .get::<flatbuffers::ForwardsUOffset<&str>>(Timestamp::VT_TIMEZONE, None)
3665        }
3666    }
3667}
3668
3669impl flatbuffers::Verifiable for Timestamp<'_> {
3670    #[inline]
3671    fn run_verifier(
3672        v: &mut flatbuffers::Verifier,
3673        pos: usize,
3674    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3675        use flatbuffers::Verifiable;
3676        v.visit_table(pos)?
3677            .visit_field::<TimeUnit>("unit", Self::VT_UNIT, false)?
3678            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3679                "timezone",
3680                Self::VT_TIMEZONE,
3681                false,
3682            )?
3683            .finish();
3684        Ok(())
3685    }
3686}
3687pub struct TimestampArgs<'a> {
3688    pub unit: TimeUnit,
3689    pub timezone: Option<flatbuffers::WIPOffset<&'a str>>,
3690}
3691impl<'a> Default for TimestampArgs<'a> {
3692    #[inline]
3693    fn default() -> Self {
3694        TimestampArgs {
3695            unit: TimeUnit::SECOND,
3696            timezone: None,
3697        }
3698    }
3699}
3700
3701pub struct TimestampBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3702    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3703    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3704}
3705impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TimestampBuilder<'a, 'b, A> {
3706    #[inline]
3707    pub fn add_unit(&mut self, unit: TimeUnit) {
3708        self.fbb_
3709            .push_slot::<TimeUnit>(Timestamp::VT_UNIT, unit, TimeUnit::SECOND);
3710    }
3711    #[inline]
3712    pub fn add_timezone(&mut self, timezone: flatbuffers::WIPOffset<&'b str>) {
3713        self.fbb_
3714            .push_slot_always::<flatbuffers::WIPOffset<_>>(Timestamp::VT_TIMEZONE, timezone);
3715    }
3716    #[inline]
3717    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TimestampBuilder<'a, 'b, A> {
3718        let start = _fbb.start_table();
3719        TimestampBuilder {
3720            fbb_: _fbb,
3721            start_: start,
3722        }
3723    }
3724    #[inline]
3725    pub fn finish(self) -> flatbuffers::WIPOffset<Timestamp<'a>> {
3726        let o = self.fbb_.end_table(self.start_);
3727        flatbuffers::WIPOffset::new(o.value())
3728    }
3729}
3730
3731impl core::fmt::Debug for Timestamp<'_> {
3732    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3733        let mut ds = f.debug_struct("Timestamp");
3734        ds.field("unit", &self.unit());
3735        ds.field("timezone", &self.timezone());
3736        ds.finish()
3737    }
3738}
3739pub enum IntervalOffset {}
3740#[derive(Copy, Clone, PartialEq)]
3741
3742pub struct Interval<'a> {
3743    pub _tab: flatbuffers::Table<'a>,
3744}
3745
3746impl<'a> flatbuffers::Follow<'a> for Interval<'a> {
3747    type Inner = Interval<'a>;
3748    #[inline]
3749    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3750        Self {
3751            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
3752        }
3753    }
3754}
3755
3756impl<'a> Interval<'a> {
3757    pub const VT_UNIT: flatbuffers::VOffsetT = 4;
3758
3759    #[inline]
3760    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3761        Interval { _tab: table }
3762    }
3763    #[allow(unused_mut)]
3764    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3765        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3766        args: &'args IntervalArgs,
3767    ) -> flatbuffers::WIPOffset<Interval<'bldr>> {
3768        let mut builder = IntervalBuilder::new(_fbb);
3769        builder.add_unit(args.unit);
3770        builder.finish()
3771    }
3772
3773    #[inline]
3774    pub fn unit(&self) -> IntervalUnit {
3775        // Safety:
3776        // Created from valid Table for this object
3777        // which contains a valid value in this slot
3778        unsafe {
3779            self._tab
3780                .get::<IntervalUnit>(Interval::VT_UNIT, Some(IntervalUnit::YEAR_MONTH))
3781                .unwrap()
3782        }
3783    }
3784}
3785
3786impl flatbuffers::Verifiable for Interval<'_> {
3787    #[inline]
3788    fn run_verifier(
3789        v: &mut flatbuffers::Verifier,
3790        pos: usize,
3791    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3792        use flatbuffers::Verifiable;
3793        v.visit_table(pos)?
3794            .visit_field::<IntervalUnit>("unit", Self::VT_UNIT, false)?
3795            .finish();
3796        Ok(())
3797    }
3798}
3799pub struct IntervalArgs {
3800    pub unit: IntervalUnit,
3801}
3802impl<'a> Default for IntervalArgs {
3803    #[inline]
3804    fn default() -> Self {
3805        IntervalArgs {
3806            unit: IntervalUnit::YEAR_MONTH,
3807        }
3808    }
3809}
3810
3811pub struct IntervalBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3812    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3813    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3814}
3815impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> IntervalBuilder<'a, 'b, A> {
3816    #[inline]
3817    pub fn add_unit(&mut self, unit: IntervalUnit) {
3818        self.fbb_
3819            .push_slot::<IntervalUnit>(Interval::VT_UNIT, unit, IntervalUnit::YEAR_MONTH);
3820    }
3821    #[inline]
3822    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> IntervalBuilder<'a, 'b, A> {
3823        let start = _fbb.start_table();
3824        IntervalBuilder {
3825            fbb_: _fbb,
3826            start_: start,
3827        }
3828    }
3829    #[inline]
3830    pub fn finish(self) -> flatbuffers::WIPOffset<Interval<'a>> {
3831        let o = self.fbb_.end_table(self.start_);
3832        flatbuffers::WIPOffset::new(o.value())
3833    }
3834}
3835
3836impl core::fmt::Debug for Interval<'_> {
3837    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3838        let mut ds = f.debug_struct("Interval");
3839        ds.field("unit", &self.unit());
3840        ds.finish()
3841    }
3842}
3843pub enum DurationOffset {}
3844#[derive(Copy, Clone, PartialEq)]
3845
3846pub struct Duration<'a> {
3847    pub _tab: flatbuffers::Table<'a>,
3848}
3849
3850impl<'a> flatbuffers::Follow<'a> for Duration<'a> {
3851    type Inner = Duration<'a>;
3852    #[inline]
3853    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3854        Self {
3855            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
3856        }
3857    }
3858}
3859
3860impl<'a> Duration<'a> {
3861    pub const VT_UNIT: flatbuffers::VOffsetT = 4;
3862
3863    #[inline]
3864    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3865        Duration { _tab: table }
3866    }
3867    #[allow(unused_mut)]
3868    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3869        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3870        args: &'args DurationArgs,
3871    ) -> flatbuffers::WIPOffset<Duration<'bldr>> {
3872        let mut builder = DurationBuilder::new(_fbb);
3873        builder.add_unit(args.unit);
3874        builder.finish()
3875    }
3876
3877    #[inline]
3878    pub fn unit(&self) -> TimeUnit {
3879        // Safety:
3880        // Created from valid Table for this object
3881        // which contains a valid value in this slot
3882        unsafe {
3883            self._tab
3884                .get::<TimeUnit>(Duration::VT_UNIT, Some(TimeUnit::MILLISECOND))
3885                .unwrap()
3886        }
3887    }
3888}
3889
3890impl flatbuffers::Verifiable for Duration<'_> {
3891    #[inline]
3892    fn run_verifier(
3893        v: &mut flatbuffers::Verifier,
3894        pos: usize,
3895    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3896        use flatbuffers::Verifiable;
3897        v.visit_table(pos)?
3898            .visit_field::<TimeUnit>("unit", Self::VT_UNIT, false)?
3899            .finish();
3900        Ok(())
3901    }
3902}
3903pub struct DurationArgs {
3904    pub unit: TimeUnit,
3905}
3906impl<'a> Default for DurationArgs {
3907    #[inline]
3908    fn default() -> Self {
3909        DurationArgs {
3910            unit: TimeUnit::MILLISECOND,
3911        }
3912    }
3913}
3914
3915pub struct DurationBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3916    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3917    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3918}
3919impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DurationBuilder<'a, 'b, A> {
3920    #[inline]
3921    pub fn add_unit(&mut self, unit: TimeUnit) {
3922        self.fbb_
3923            .push_slot::<TimeUnit>(Duration::VT_UNIT, unit, TimeUnit::MILLISECOND);
3924    }
3925    #[inline]
3926    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> DurationBuilder<'a, 'b, A> {
3927        let start = _fbb.start_table();
3928        DurationBuilder {
3929            fbb_: _fbb,
3930            start_: start,
3931        }
3932    }
3933    #[inline]
3934    pub fn finish(self) -> flatbuffers::WIPOffset<Duration<'a>> {
3935        let o = self.fbb_.end_table(self.start_);
3936        flatbuffers::WIPOffset::new(o.value())
3937    }
3938}
3939
3940impl core::fmt::Debug for Duration<'_> {
3941    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3942        let mut ds = f.debug_struct("Duration");
3943        ds.field("unit", &self.unit());
3944        ds.finish()
3945    }
3946}
3947pub enum KeyValueOffset {}
3948#[derive(Copy, Clone, PartialEq)]
3949
3950/// ----------------------------------------------------------------------
3951/// user defined key value pairs to add custom metadata to arrow
3952/// key namespacing is the responsibility of the user
3953pub struct KeyValue<'a> {
3954    pub _tab: flatbuffers::Table<'a>,
3955}
3956
3957impl<'a> flatbuffers::Follow<'a> for KeyValue<'a> {
3958    type Inner = KeyValue<'a>;
3959    #[inline]
3960    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3961        Self {
3962            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
3963        }
3964    }
3965}
3966
3967impl<'a> KeyValue<'a> {
3968    pub const VT_KEY: flatbuffers::VOffsetT = 4;
3969    pub const VT_VALUE: flatbuffers::VOffsetT = 6;
3970
3971    #[inline]
3972    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3973        KeyValue { _tab: table }
3974    }
3975    #[allow(unused_mut)]
3976    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3977        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3978        args: &'args KeyValueArgs<'args>,
3979    ) -> flatbuffers::WIPOffset<KeyValue<'bldr>> {
3980        let mut builder = KeyValueBuilder::new(_fbb);
3981        if let Some(x) = args.value {
3982            builder.add_value(x);
3983        }
3984        if let Some(x) = args.key {
3985            builder.add_key(x);
3986        }
3987        builder.finish()
3988    }
3989
3990    #[inline]
3991    pub fn key(&self) -> Option<&'a str> {
3992        // Safety:
3993        // Created from valid Table for this object
3994        // which contains a valid value in this slot
3995        unsafe {
3996            self._tab
3997                .get::<flatbuffers::ForwardsUOffset<&str>>(KeyValue::VT_KEY, None)
3998        }
3999    }
4000    #[inline]
4001    pub fn value(&self) -> Option<&'a str> {
4002        // Safety:
4003        // Created from valid Table for this object
4004        // which contains a valid value in this slot
4005        unsafe {
4006            self._tab
4007                .get::<flatbuffers::ForwardsUOffset<&str>>(KeyValue::VT_VALUE, None)
4008        }
4009    }
4010}
4011
4012impl flatbuffers::Verifiable for KeyValue<'_> {
4013    #[inline]
4014    fn run_verifier(
4015        v: &mut flatbuffers::Verifier,
4016        pos: usize,
4017    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4018        use flatbuffers::Verifiable;
4019        v.visit_table(pos)?
4020            .visit_field::<flatbuffers::ForwardsUOffset<&str>>("key", Self::VT_KEY, false)?
4021            .visit_field::<flatbuffers::ForwardsUOffset<&str>>("value", Self::VT_VALUE, false)?
4022            .finish();
4023        Ok(())
4024    }
4025}
4026pub struct KeyValueArgs<'a> {
4027    pub key: Option<flatbuffers::WIPOffset<&'a str>>,
4028    pub value: Option<flatbuffers::WIPOffset<&'a str>>,
4029}
4030impl<'a> Default for KeyValueArgs<'a> {
4031    #[inline]
4032    fn default() -> Self {
4033        KeyValueArgs {
4034            key: None,
4035            value: None,
4036        }
4037    }
4038}
4039
4040pub struct KeyValueBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4041    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4042    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4043}
4044impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueBuilder<'a, 'b, A> {
4045    #[inline]
4046    pub fn add_key(&mut self, key: flatbuffers::WIPOffset<&'b str>) {
4047        self.fbb_
4048            .push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_KEY, key);
4049    }
4050    #[inline]
4051    pub fn add_value(&mut self, value: flatbuffers::WIPOffset<&'b str>) {
4052        self.fbb_
4053            .push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_VALUE, value);
4054    }
4055    #[inline]
4056    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> KeyValueBuilder<'a, 'b, A> {
4057        let start = _fbb.start_table();
4058        KeyValueBuilder {
4059            fbb_: _fbb,
4060            start_: start,
4061        }
4062    }
4063    #[inline]
4064    pub fn finish(self) -> flatbuffers::WIPOffset<KeyValue<'a>> {
4065        let o = self.fbb_.end_table(self.start_);
4066        flatbuffers::WIPOffset::new(o.value())
4067    }
4068}
4069
4070impl core::fmt::Debug for KeyValue<'_> {
4071    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4072        let mut ds = f.debug_struct("KeyValue");
4073        ds.field("key", &self.key());
4074        ds.field("value", &self.value());
4075        ds.finish()
4076    }
4077}
4078pub enum DictionaryEncodingOffset {}
4079#[derive(Copy, Clone, PartialEq)]
4080
4081pub struct DictionaryEncoding<'a> {
4082    pub _tab: flatbuffers::Table<'a>,
4083}
4084
4085impl<'a> flatbuffers::Follow<'a> for DictionaryEncoding<'a> {
4086    type Inner = DictionaryEncoding<'a>;
4087    #[inline]
4088    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4089        Self {
4090            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
4091        }
4092    }
4093}
4094
4095impl<'a> DictionaryEncoding<'a> {
4096    pub const VT_ID: flatbuffers::VOffsetT = 4;
4097    pub const VT_INDEXTYPE: flatbuffers::VOffsetT = 6;
4098    pub const VT_ISORDERED: flatbuffers::VOffsetT = 8;
4099    pub const VT_DICTIONARYKIND: flatbuffers::VOffsetT = 10;
4100
4101    #[inline]
4102    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4103        DictionaryEncoding { _tab: table }
4104    }
4105    #[allow(unused_mut)]
4106    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4107        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4108        args: &'args DictionaryEncodingArgs<'args>,
4109    ) -> flatbuffers::WIPOffset<DictionaryEncoding<'bldr>> {
4110        let mut builder = DictionaryEncodingBuilder::new(_fbb);
4111        builder.add_id(args.id);
4112        if let Some(x) = args.indexType {
4113            builder.add_indexType(x);
4114        }
4115        builder.add_dictionaryKind(args.dictionaryKind);
4116        builder.add_isOrdered(args.isOrdered);
4117        builder.finish()
4118    }
4119
4120    /// The known dictionary id in the application where this data is used. In
4121    /// the file or streaming formats, the dictionary ids are found in the
4122    /// DictionaryBatch messages
4123    #[inline]
4124    pub fn id(&self) -> i64 {
4125        // Safety:
4126        // Created from valid Table for this object
4127        // which contains a valid value in this slot
4128        unsafe {
4129            self._tab
4130                .get::<i64>(DictionaryEncoding::VT_ID, Some(0))
4131                .unwrap()
4132        }
4133    }
4134    /// The dictionary indices are constrained to be non-negative integers. If
4135    /// this field is null, the indices must be signed int32. To maximize
4136    /// cross-language compatibility and performance, implementations are
4137    /// recommended to prefer signed integer types over unsigned integer types
4138    /// and to avoid uint64 indices unless they are required by an application.
4139    #[inline]
4140    pub fn indexType(&self) -> Option<Int<'a>> {
4141        // Safety:
4142        // Created from valid Table for this object
4143        // which contains a valid value in this slot
4144        unsafe {
4145            self._tab
4146                .get::<flatbuffers::ForwardsUOffset<Int>>(DictionaryEncoding::VT_INDEXTYPE, None)
4147        }
4148    }
4149    /// By default, dictionaries are not ordered, or the order does not have
4150    /// semantic meaning. In some statistical, applications, dictionary-encoding
4151    /// is used to represent ordered categorical data, and we provide a way to
4152    /// preserve that metadata here
4153    #[inline]
4154    pub fn isOrdered(&self) -> bool {
4155        // Safety:
4156        // Created from valid Table for this object
4157        // which contains a valid value in this slot
4158        unsafe {
4159            self._tab
4160                .get::<bool>(DictionaryEncoding::VT_ISORDERED, Some(false))
4161                .unwrap()
4162        }
4163    }
4164    #[inline]
4165    pub fn dictionaryKind(&self) -> DictionaryKind {
4166        // Safety:
4167        // Created from valid Table for this object
4168        // which contains a valid value in this slot
4169        unsafe {
4170            self._tab
4171                .get::<DictionaryKind>(
4172                    DictionaryEncoding::VT_DICTIONARYKIND,
4173                    Some(DictionaryKind::DenseArray),
4174                )
4175                .unwrap()
4176        }
4177    }
4178}
4179
4180impl flatbuffers::Verifiable for DictionaryEncoding<'_> {
4181    #[inline]
4182    fn run_verifier(
4183        v: &mut flatbuffers::Verifier,
4184        pos: usize,
4185    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4186        use flatbuffers::Verifiable;
4187        v.visit_table(pos)?
4188            .visit_field::<i64>("id", Self::VT_ID, false)?
4189            .visit_field::<flatbuffers::ForwardsUOffset<Int>>(
4190                "indexType",
4191                Self::VT_INDEXTYPE,
4192                false,
4193            )?
4194            .visit_field::<bool>("isOrdered", Self::VT_ISORDERED, false)?
4195            .visit_field::<DictionaryKind>("dictionaryKind", Self::VT_DICTIONARYKIND, false)?
4196            .finish();
4197        Ok(())
4198    }
4199}
4200pub struct DictionaryEncodingArgs<'a> {
4201    pub id: i64,
4202    pub indexType: Option<flatbuffers::WIPOffset<Int<'a>>>,
4203    pub isOrdered: bool,
4204    pub dictionaryKind: DictionaryKind,
4205}
4206impl<'a> Default for DictionaryEncodingArgs<'a> {
4207    #[inline]
4208    fn default() -> Self {
4209        DictionaryEncodingArgs {
4210            id: 0,
4211            indexType: None,
4212            isOrdered: false,
4213            dictionaryKind: DictionaryKind::DenseArray,
4214        }
4215    }
4216}
4217
4218pub struct DictionaryEncodingBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4219    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4220    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4221}
4222impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DictionaryEncodingBuilder<'a, 'b, A> {
4223    #[inline]
4224    pub fn add_id(&mut self, id: i64) {
4225        self.fbb_.push_slot::<i64>(DictionaryEncoding::VT_ID, id, 0);
4226    }
4227    #[inline]
4228    pub fn add_indexType(&mut self, indexType: flatbuffers::WIPOffset<Int<'b>>) {
4229        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Int>>(
4230            DictionaryEncoding::VT_INDEXTYPE,
4231            indexType,
4232        );
4233    }
4234    #[inline]
4235    pub fn add_isOrdered(&mut self, isOrdered: bool) {
4236        self.fbb_
4237            .push_slot::<bool>(DictionaryEncoding::VT_ISORDERED, isOrdered, false);
4238    }
4239    #[inline]
4240    pub fn add_dictionaryKind(&mut self, dictionaryKind: DictionaryKind) {
4241        self.fbb_.push_slot::<DictionaryKind>(
4242            DictionaryEncoding::VT_DICTIONARYKIND,
4243            dictionaryKind,
4244            DictionaryKind::DenseArray,
4245        );
4246    }
4247    #[inline]
4248    pub fn new(
4249        _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4250    ) -> DictionaryEncodingBuilder<'a, 'b, A> {
4251        let start = _fbb.start_table();
4252        DictionaryEncodingBuilder {
4253            fbb_: _fbb,
4254            start_: start,
4255        }
4256    }
4257    #[inline]
4258    pub fn finish(self) -> flatbuffers::WIPOffset<DictionaryEncoding<'a>> {
4259        let o = self.fbb_.end_table(self.start_);
4260        flatbuffers::WIPOffset::new(o.value())
4261    }
4262}
4263
4264impl core::fmt::Debug for DictionaryEncoding<'_> {
4265    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4266        let mut ds = f.debug_struct("DictionaryEncoding");
4267        ds.field("id", &self.id());
4268        ds.field("indexType", &self.indexType());
4269        ds.field("isOrdered", &self.isOrdered());
4270        ds.field("dictionaryKind", &self.dictionaryKind());
4271        ds.finish()
4272    }
4273}
4274pub enum FieldOffset {}
4275#[derive(Copy, Clone, PartialEq)]
4276
4277/// ----------------------------------------------------------------------
4278/// A field represents a named column in a record / row batch or child of a
4279/// nested type.
4280pub struct Field<'a> {
4281    pub _tab: flatbuffers::Table<'a>,
4282}
4283
4284impl<'a> flatbuffers::Follow<'a> for Field<'a> {
4285    type Inner = Field<'a>;
4286    #[inline]
4287    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4288        Self {
4289            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
4290        }
4291    }
4292}
4293
4294impl<'a> Field<'a> {
4295    pub const VT_NAME: flatbuffers::VOffsetT = 4;
4296    pub const VT_NULLABLE: flatbuffers::VOffsetT = 6;
4297    pub const VT_TYPE_TYPE: flatbuffers::VOffsetT = 8;
4298    pub const VT_TYPE_: flatbuffers::VOffsetT = 10;
4299    pub const VT_DICTIONARY: flatbuffers::VOffsetT = 12;
4300    pub const VT_CHILDREN: flatbuffers::VOffsetT = 14;
4301    pub const VT_CUSTOM_METADATA: flatbuffers::VOffsetT = 16;
4302
4303    #[inline]
4304    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4305        Field { _tab: table }
4306    }
4307    #[allow(unused_mut)]
4308    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4309        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4310        args: &'args FieldArgs<'args>,
4311    ) -> flatbuffers::WIPOffset<Field<'bldr>> {
4312        let mut builder = FieldBuilder::new(_fbb);
4313        if let Some(x) = args.custom_metadata {
4314            builder.add_custom_metadata(x);
4315        }
4316        if let Some(x) = args.children {
4317            builder.add_children(x);
4318        }
4319        if let Some(x) = args.dictionary {
4320            builder.add_dictionary(x);
4321        }
4322        if let Some(x) = args.type_ {
4323            builder.add_type_(x);
4324        }
4325        if let Some(x) = args.name {
4326            builder.add_name(x);
4327        }
4328        builder.add_type_type(args.type_type);
4329        builder.add_nullable(args.nullable);
4330        builder.finish()
4331    }
4332
4333    /// Name is not required, in i.e. a List
4334    #[inline]
4335    pub fn name(&self) -> Option<&'a str> {
4336        // Safety:
4337        // Created from valid Table for this object
4338        // which contains a valid value in this slot
4339        unsafe {
4340            self._tab
4341                .get::<flatbuffers::ForwardsUOffset<&str>>(Field::VT_NAME, None)
4342        }
4343    }
4344    /// Whether or not this field can contain nulls. Should be true in general.
4345    #[inline]
4346    pub fn nullable(&self) -> bool {
4347        // Safety:
4348        // Created from valid Table for this object
4349        // which contains a valid value in this slot
4350        unsafe {
4351            self._tab
4352                .get::<bool>(Field::VT_NULLABLE, Some(false))
4353                .unwrap()
4354        }
4355    }
4356    #[inline]
4357    pub fn type_type(&self) -> Type {
4358        // Safety:
4359        // Created from valid Table for this object
4360        // which contains a valid value in this slot
4361        unsafe {
4362            self._tab
4363                .get::<Type>(Field::VT_TYPE_TYPE, Some(Type::NONE))
4364                .unwrap()
4365        }
4366    }
4367    /// This is the type of the decoded value if the field is dictionary encoded.
4368    #[inline]
4369    pub fn type_(&self) -> Option<flatbuffers::Table<'a>> {
4370        // Safety:
4371        // Created from valid Table for this object
4372        // which contains a valid value in this slot
4373        unsafe {
4374            self._tab
4375                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(Field::VT_TYPE_, None)
4376        }
4377    }
4378    /// Present only if the field is dictionary encoded.
4379    #[inline]
4380    pub fn dictionary(&self) -> Option<DictionaryEncoding<'a>> {
4381        // Safety:
4382        // Created from valid Table for this object
4383        // which contains a valid value in this slot
4384        unsafe {
4385            self._tab
4386                .get::<flatbuffers::ForwardsUOffset<DictionaryEncoding>>(Field::VT_DICTIONARY, None)
4387        }
4388    }
4389    /// children apply only to nested data types like Struct, List and Union. For
4390    /// primitive types children will have length 0.
4391    #[inline]
4392    pub fn children(
4393        &self,
4394    ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field<'a>>>> {
4395        // Safety:
4396        // Created from valid Table for this object
4397        // which contains a valid value in this slot
4398        unsafe {
4399            self._tab.get::<flatbuffers::ForwardsUOffset<
4400                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field>>,
4401            >>(Field::VT_CHILDREN, None)
4402        }
4403    }
4404    /// User-defined metadata
4405    #[inline]
4406    pub fn custom_metadata(
4407        &self,
4408    ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
4409        // Safety:
4410        // Created from valid Table for this object
4411        // which contains a valid value in this slot
4412        unsafe {
4413            self._tab.get::<flatbuffers::ForwardsUOffset<
4414                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
4415            >>(Field::VT_CUSTOM_METADATA, None)
4416        }
4417    }
4418    #[inline]
4419    #[allow(non_snake_case)]
4420    pub fn type_as_null(&self) -> Option<Null<'a>> {
4421        if self.type_type() == Type::Null {
4422            self.type_().map(|t| {
4423                // Safety:
4424                // Created from a valid Table for this object
4425                // Which contains a valid union in this slot
4426                unsafe { Null::init_from_table(t) }
4427            })
4428        } else {
4429            None
4430        }
4431    }
4432
4433    #[inline]
4434    #[allow(non_snake_case)]
4435    pub fn type_as_int(&self) -> Option<Int<'a>> {
4436        if self.type_type() == Type::Int {
4437            self.type_().map(|t| {
4438                // Safety:
4439                // Created from a valid Table for this object
4440                // Which contains a valid union in this slot
4441                unsafe { Int::init_from_table(t) }
4442            })
4443        } else {
4444            None
4445        }
4446    }
4447
4448    #[inline]
4449    #[allow(non_snake_case)]
4450    pub fn type_as_floating_point(&self) -> Option<FloatingPoint<'a>> {
4451        if self.type_type() == Type::FloatingPoint {
4452            self.type_().map(|t| {
4453                // Safety:
4454                // Created from a valid Table for this object
4455                // Which contains a valid union in this slot
4456                unsafe { FloatingPoint::init_from_table(t) }
4457            })
4458        } else {
4459            None
4460        }
4461    }
4462
4463    #[inline]
4464    #[allow(non_snake_case)]
4465    pub fn type_as_binary(&self) -> Option<Binary<'a>> {
4466        if self.type_type() == Type::Binary {
4467            self.type_().map(|t| {
4468                // Safety:
4469                // Created from a valid Table for this object
4470                // Which contains a valid union in this slot
4471                unsafe { Binary::init_from_table(t) }
4472            })
4473        } else {
4474            None
4475        }
4476    }
4477
4478    #[inline]
4479    #[allow(non_snake_case)]
4480    pub fn type_as_utf_8(&self) -> Option<Utf8<'a>> {
4481        if self.type_type() == Type::Utf8 {
4482            self.type_().map(|t| {
4483                // Safety:
4484                // Created from a valid Table for this object
4485                // Which contains a valid union in this slot
4486                unsafe { Utf8::init_from_table(t) }
4487            })
4488        } else {
4489            None
4490        }
4491    }
4492
4493    #[inline]
4494    #[allow(non_snake_case)]
4495    pub fn type_as_bool(&self) -> Option<Bool<'a>> {
4496        if self.type_type() == Type::Bool {
4497            self.type_().map(|t| {
4498                // Safety:
4499                // Created from a valid Table for this object
4500                // Which contains a valid union in this slot
4501                unsafe { Bool::init_from_table(t) }
4502            })
4503        } else {
4504            None
4505        }
4506    }
4507
4508    #[inline]
4509    #[allow(non_snake_case)]
4510    pub fn type_as_decimal(&self) -> Option<Decimal<'a>> {
4511        if self.type_type() == Type::Decimal {
4512            self.type_().map(|t| {
4513                // Safety:
4514                // Created from a valid Table for this object
4515                // Which contains a valid union in this slot
4516                unsafe { Decimal::init_from_table(t) }
4517            })
4518        } else {
4519            None
4520        }
4521    }
4522
4523    #[inline]
4524    #[allow(non_snake_case)]
4525    pub fn type_as_date(&self) -> Option<Date<'a>> {
4526        if self.type_type() == Type::Date {
4527            self.type_().map(|t| {
4528                // Safety:
4529                // Created from a valid Table for this object
4530                // Which contains a valid union in this slot
4531                unsafe { Date::init_from_table(t) }
4532            })
4533        } else {
4534            None
4535        }
4536    }
4537
4538    #[inline]
4539    #[allow(non_snake_case)]
4540    pub fn type_as_time(&self) -> Option<Time<'a>> {
4541        if self.type_type() == Type::Time {
4542            self.type_().map(|t| {
4543                // Safety:
4544                // Created from a valid Table for this object
4545                // Which contains a valid union in this slot
4546                unsafe { Time::init_from_table(t) }
4547            })
4548        } else {
4549            None
4550        }
4551    }
4552
4553    #[inline]
4554    #[allow(non_snake_case)]
4555    pub fn type_as_timestamp(&self) -> Option<Timestamp<'a>> {
4556        if self.type_type() == Type::Timestamp {
4557            self.type_().map(|t| {
4558                // Safety:
4559                // Created from a valid Table for this object
4560                // Which contains a valid union in this slot
4561                unsafe { Timestamp::init_from_table(t) }
4562            })
4563        } else {
4564            None
4565        }
4566    }
4567
4568    #[inline]
4569    #[allow(non_snake_case)]
4570    pub fn type_as_interval(&self) -> Option<Interval<'a>> {
4571        if self.type_type() == Type::Interval {
4572            self.type_().map(|t| {
4573                // Safety:
4574                // Created from a valid Table for this object
4575                // Which contains a valid union in this slot
4576                unsafe { Interval::init_from_table(t) }
4577            })
4578        } else {
4579            None
4580        }
4581    }
4582
4583    #[inline]
4584    #[allow(non_snake_case)]
4585    pub fn type_as_list(&self) -> Option<List<'a>> {
4586        if self.type_type() == Type::List {
4587            self.type_().map(|t| {
4588                // Safety:
4589                // Created from a valid Table for this object
4590                // Which contains a valid union in this slot
4591                unsafe { List::init_from_table(t) }
4592            })
4593        } else {
4594            None
4595        }
4596    }
4597
4598    #[inline]
4599    #[allow(non_snake_case)]
4600    pub fn type_as_struct_(&self) -> Option<Struct_<'a>> {
4601        if self.type_type() == Type::Struct_ {
4602            self.type_().map(|t| {
4603                // Safety:
4604                // Created from a valid Table for this object
4605                // Which contains a valid union in this slot
4606                unsafe { Struct_::init_from_table(t) }
4607            })
4608        } else {
4609            None
4610        }
4611    }
4612
4613    #[inline]
4614    #[allow(non_snake_case)]
4615    pub fn type_as_union(&self) -> Option<Union<'a>> {
4616        if self.type_type() == Type::Union {
4617            self.type_().map(|t| {
4618                // Safety:
4619                // Created from a valid Table for this object
4620                // Which contains a valid union in this slot
4621                unsafe { Union::init_from_table(t) }
4622            })
4623        } else {
4624            None
4625        }
4626    }
4627
4628    #[inline]
4629    #[allow(non_snake_case)]
4630    pub fn type_as_fixed_size_binary(&self) -> Option<FixedSizeBinary<'a>> {
4631        if self.type_type() == Type::FixedSizeBinary {
4632            self.type_().map(|t| {
4633                // Safety:
4634                // Created from a valid Table for this object
4635                // Which contains a valid union in this slot
4636                unsafe { FixedSizeBinary::init_from_table(t) }
4637            })
4638        } else {
4639            None
4640        }
4641    }
4642
4643    #[inline]
4644    #[allow(non_snake_case)]
4645    pub fn type_as_fixed_size_list(&self) -> Option<FixedSizeList<'a>> {
4646        if self.type_type() == Type::FixedSizeList {
4647            self.type_().map(|t| {
4648                // Safety:
4649                // Created from a valid Table for this object
4650                // Which contains a valid union in this slot
4651                unsafe { FixedSizeList::init_from_table(t) }
4652            })
4653        } else {
4654            None
4655        }
4656    }
4657
4658    #[inline]
4659    #[allow(non_snake_case)]
4660    pub fn type_as_map(&self) -> Option<Map<'a>> {
4661        if self.type_type() == Type::Map {
4662            self.type_().map(|t| {
4663                // Safety:
4664                // Created from a valid Table for this object
4665                // Which contains a valid union in this slot
4666                unsafe { Map::init_from_table(t) }
4667            })
4668        } else {
4669            None
4670        }
4671    }
4672
4673    #[inline]
4674    #[allow(non_snake_case)]
4675    pub fn type_as_duration(&self) -> Option<Duration<'a>> {
4676        if self.type_type() == Type::Duration {
4677            self.type_().map(|t| {
4678                // Safety:
4679                // Created from a valid Table for this object
4680                // Which contains a valid union in this slot
4681                unsafe { Duration::init_from_table(t) }
4682            })
4683        } else {
4684            None
4685        }
4686    }
4687
4688    #[inline]
4689    #[allow(non_snake_case)]
4690    pub fn type_as_large_binary(&self) -> Option<LargeBinary<'a>> {
4691        if self.type_type() == Type::LargeBinary {
4692            self.type_().map(|t| {
4693                // Safety:
4694                // Created from a valid Table for this object
4695                // Which contains a valid union in this slot
4696                unsafe { LargeBinary::init_from_table(t) }
4697            })
4698        } else {
4699            None
4700        }
4701    }
4702
4703    #[inline]
4704    #[allow(non_snake_case)]
4705    pub fn type_as_large_utf_8(&self) -> Option<LargeUtf8<'a>> {
4706        if self.type_type() == Type::LargeUtf8 {
4707            self.type_().map(|t| {
4708                // Safety:
4709                // Created from a valid Table for this object
4710                // Which contains a valid union in this slot
4711                unsafe { LargeUtf8::init_from_table(t) }
4712            })
4713        } else {
4714            None
4715        }
4716    }
4717
4718    #[inline]
4719    #[allow(non_snake_case)]
4720    pub fn type_as_large_list(&self) -> Option<LargeList<'a>> {
4721        if self.type_type() == Type::LargeList {
4722            self.type_().map(|t| {
4723                // Safety:
4724                // Created from a valid Table for this object
4725                // Which contains a valid union in this slot
4726                unsafe { LargeList::init_from_table(t) }
4727            })
4728        } else {
4729            None
4730        }
4731    }
4732
4733    #[inline]
4734    #[allow(non_snake_case)]
4735    pub fn type_as_run_end_encoded(&self) -> Option<RunEndEncoded<'a>> {
4736        if self.type_type() == Type::RunEndEncoded {
4737            self.type_().map(|t| {
4738                // Safety:
4739                // Created from a valid Table for this object
4740                // Which contains a valid union in this slot
4741                unsafe { RunEndEncoded::init_from_table(t) }
4742            })
4743        } else {
4744            None
4745        }
4746    }
4747
4748    #[inline]
4749    #[allow(non_snake_case)]
4750    pub fn type_as_binary_view(&self) -> Option<BinaryView<'a>> {
4751        if self.type_type() == Type::BinaryView {
4752            self.type_().map(|t| {
4753                // Safety:
4754                // Created from a valid Table for this object
4755                // Which contains a valid union in this slot
4756                unsafe { BinaryView::init_from_table(t) }
4757            })
4758        } else {
4759            None
4760        }
4761    }
4762
4763    #[inline]
4764    #[allow(non_snake_case)]
4765    pub fn type_as_utf_8_view(&self) -> Option<Utf8View<'a>> {
4766        if self.type_type() == Type::Utf8View {
4767            self.type_().map(|t| {
4768                // Safety:
4769                // Created from a valid Table for this object
4770                // Which contains a valid union in this slot
4771                unsafe { Utf8View::init_from_table(t) }
4772            })
4773        } else {
4774            None
4775        }
4776    }
4777
4778    #[inline]
4779    #[allow(non_snake_case)]
4780    pub fn type_as_list_view(&self) -> Option<ListView<'a>> {
4781        if self.type_type() == Type::ListView {
4782            self.type_().map(|t| {
4783                // Safety:
4784                // Created from a valid Table for this object
4785                // Which contains a valid union in this slot
4786                unsafe { ListView::init_from_table(t) }
4787            })
4788        } else {
4789            None
4790        }
4791    }
4792
4793    #[inline]
4794    #[allow(non_snake_case)]
4795    pub fn type_as_large_list_view(&self) -> Option<LargeListView<'a>> {
4796        if self.type_type() == Type::LargeListView {
4797            self.type_().map(|t| {
4798                // Safety:
4799                // Created from a valid Table for this object
4800                // Which contains a valid union in this slot
4801                unsafe { LargeListView::init_from_table(t) }
4802            })
4803        } else {
4804            None
4805        }
4806    }
4807}
4808
4809impl flatbuffers::Verifiable for Field<'_> {
4810    #[inline]
4811    fn run_verifier(
4812        v: &mut flatbuffers::Verifier,
4813        pos: usize,
4814    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4815        use flatbuffers::Verifiable;
4816        v.visit_table(pos)?
4817            .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
4818            .visit_field::<bool>("nullable", Self::VT_NULLABLE, false)?
4819            .visit_union::<Type, _>(
4820                "type_type",
4821                Self::VT_TYPE_TYPE,
4822                "type_",
4823                Self::VT_TYPE_,
4824                false,
4825                |key, v, pos| match key {
4826                    Type::Null => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Null>>(
4827                        "Type::Null",
4828                        pos,
4829                    ),
4830                    Type::Int => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Int>>(
4831                        "Type::Int",
4832                        pos,
4833                    ),
4834                    Type::FloatingPoint => v
4835                        .verify_union_variant::<flatbuffers::ForwardsUOffset<FloatingPoint>>(
4836                            "Type::FloatingPoint",
4837                            pos,
4838                        ),
4839                    Type::Binary => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Binary>>(
4840                        "Type::Binary",
4841                        pos,
4842                    ),
4843                    Type::Utf8 => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Utf8>>(
4844                        "Type::Utf8",
4845                        pos,
4846                    ),
4847                    Type::Bool => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Bool>>(
4848                        "Type::Bool",
4849                        pos,
4850                    ),
4851                    Type::Decimal => v
4852                        .verify_union_variant::<flatbuffers::ForwardsUOffset<Decimal>>(
4853                            "Type::Decimal",
4854                            pos,
4855                        ),
4856                    Type::Date => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Date>>(
4857                        "Type::Date",
4858                        pos,
4859                    ),
4860                    Type::Time => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Time>>(
4861                        "Type::Time",
4862                        pos,
4863                    ),
4864                    Type::Timestamp => v
4865                        .verify_union_variant::<flatbuffers::ForwardsUOffset<Timestamp>>(
4866                            "Type::Timestamp",
4867                            pos,
4868                        ),
4869                    Type::Interval => v
4870                        .verify_union_variant::<flatbuffers::ForwardsUOffset<Interval>>(
4871                            "Type::Interval",
4872                            pos,
4873                        ),
4874                    Type::List => v.verify_union_variant::<flatbuffers::ForwardsUOffset<List>>(
4875                        "Type::List",
4876                        pos,
4877                    ),
4878                    Type::Struct_ => v
4879                        .verify_union_variant::<flatbuffers::ForwardsUOffset<Struct_>>(
4880                            "Type::Struct_",
4881                            pos,
4882                        ),
4883                    Type::Union => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Union>>(
4884                        "Type::Union",
4885                        pos,
4886                    ),
4887                    Type::FixedSizeBinary => v
4888                        .verify_union_variant::<flatbuffers::ForwardsUOffset<FixedSizeBinary>>(
4889                            "Type::FixedSizeBinary",
4890                            pos,
4891                        ),
4892                    Type::FixedSizeList => v
4893                        .verify_union_variant::<flatbuffers::ForwardsUOffset<FixedSizeList>>(
4894                            "Type::FixedSizeList",
4895                            pos,
4896                        ),
4897                    Type::Map => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Map>>(
4898                        "Type::Map",
4899                        pos,
4900                    ),
4901                    Type::Duration => v
4902                        .verify_union_variant::<flatbuffers::ForwardsUOffset<Duration>>(
4903                            "Type::Duration",
4904                            pos,
4905                        ),
4906                    Type::LargeBinary => v
4907                        .verify_union_variant::<flatbuffers::ForwardsUOffset<LargeBinary>>(
4908                            "Type::LargeBinary",
4909                            pos,
4910                        ),
4911                    Type::LargeUtf8 => v
4912                        .verify_union_variant::<flatbuffers::ForwardsUOffset<LargeUtf8>>(
4913                            "Type::LargeUtf8",
4914                            pos,
4915                        ),
4916                    Type::LargeList => v
4917                        .verify_union_variant::<flatbuffers::ForwardsUOffset<LargeList>>(
4918                            "Type::LargeList",
4919                            pos,
4920                        ),
4921                    Type::RunEndEncoded => v
4922                        .verify_union_variant::<flatbuffers::ForwardsUOffset<RunEndEncoded>>(
4923                            "Type::RunEndEncoded",
4924                            pos,
4925                        ),
4926                    Type::BinaryView => v
4927                        .verify_union_variant::<flatbuffers::ForwardsUOffset<BinaryView>>(
4928                            "Type::BinaryView",
4929                            pos,
4930                        ),
4931                    Type::Utf8View => v
4932                        .verify_union_variant::<flatbuffers::ForwardsUOffset<Utf8View>>(
4933                            "Type::Utf8View",
4934                            pos,
4935                        ),
4936                    Type::ListView => v
4937                        .verify_union_variant::<flatbuffers::ForwardsUOffset<ListView>>(
4938                            "Type::ListView",
4939                            pos,
4940                        ),
4941                    Type::LargeListView => v
4942                        .verify_union_variant::<flatbuffers::ForwardsUOffset<LargeListView>>(
4943                            "Type::LargeListView",
4944                            pos,
4945                        ),
4946                    _ => Ok(()),
4947                },
4948            )?
4949            .visit_field::<flatbuffers::ForwardsUOffset<DictionaryEncoding>>(
4950                "dictionary",
4951                Self::VT_DICTIONARY,
4952                false,
4953            )?
4954            .visit_field::<flatbuffers::ForwardsUOffset<
4955                flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Field>>,
4956            >>("children", Self::VT_CHILDREN, false)?
4957            .visit_field::<flatbuffers::ForwardsUOffset<
4958                flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>,
4959            >>("custom_metadata", Self::VT_CUSTOM_METADATA, false)?
4960            .finish();
4961        Ok(())
4962    }
4963}
4964pub struct FieldArgs<'a> {
4965    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
4966    pub nullable: bool,
4967    pub type_type: Type,
4968    pub type_: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
4969    pub dictionary: Option<flatbuffers::WIPOffset<DictionaryEncoding<'a>>>,
4970    pub children: Option<
4971        flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field<'a>>>>,
4972    >,
4973    pub custom_metadata: Option<
4974        flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>>,
4975    >,
4976}
4977impl<'a> Default for FieldArgs<'a> {
4978    #[inline]
4979    fn default() -> Self {
4980        FieldArgs {
4981            name: None,
4982            nullable: false,
4983            type_type: Type::NONE,
4984            type_: None,
4985            dictionary: None,
4986            children: None,
4987            custom_metadata: None,
4988        }
4989    }
4990}
4991
4992pub struct FieldBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4993    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4994    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4995}
4996impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FieldBuilder<'a, 'b, A> {
4997    #[inline]
4998    pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
4999        self.fbb_
5000            .push_slot_always::<flatbuffers::WIPOffset<_>>(Field::VT_NAME, name);
5001    }
5002    #[inline]
5003    pub fn add_nullable(&mut self, nullable: bool) {
5004        self.fbb_
5005            .push_slot::<bool>(Field::VT_NULLABLE, nullable, false);
5006    }
5007    #[inline]
5008    pub fn add_type_type(&mut self, type_type: Type) {
5009        self.fbb_
5010            .push_slot::<Type>(Field::VT_TYPE_TYPE, type_type, Type::NONE);
5011    }
5012    #[inline]
5013    pub fn add_type_(&mut self, type_: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
5014        self.fbb_
5015            .push_slot_always::<flatbuffers::WIPOffset<_>>(Field::VT_TYPE_, type_);
5016    }
5017    #[inline]
5018    pub fn add_dictionary(&mut self, dictionary: flatbuffers::WIPOffset<DictionaryEncoding<'b>>) {
5019        self.fbb_
5020            .push_slot_always::<flatbuffers::WIPOffset<DictionaryEncoding>>(
5021                Field::VT_DICTIONARY,
5022                dictionary,
5023            );
5024    }
5025    #[inline]
5026    pub fn add_children(
5027        &mut self,
5028        children: flatbuffers::WIPOffset<
5029            flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Field<'b>>>,
5030        >,
5031    ) {
5032        self.fbb_
5033            .push_slot_always::<flatbuffers::WIPOffset<_>>(Field::VT_CHILDREN, children);
5034    }
5035    #[inline]
5036    pub fn add_custom_metadata(
5037        &mut self,
5038        custom_metadata: flatbuffers::WIPOffset<
5039            flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
5040        >,
5041    ) {
5042        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
5043            Field::VT_CUSTOM_METADATA,
5044            custom_metadata,
5045        );
5046    }
5047    #[inline]
5048    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> FieldBuilder<'a, 'b, A> {
5049        let start = _fbb.start_table();
5050        FieldBuilder {
5051            fbb_: _fbb,
5052            start_: start,
5053        }
5054    }
5055    #[inline]
5056    pub fn finish(self) -> flatbuffers::WIPOffset<Field<'a>> {
5057        let o = self.fbb_.end_table(self.start_);
5058        flatbuffers::WIPOffset::new(o.value())
5059    }
5060}
5061
5062impl core::fmt::Debug for Field<'_> {
5063    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5064        let mut ds = f.debug_struct("Field");
5065        ds.field("name", &self.name());
5066        ds.field("nullable", &self.nullable());
5067        ds.field("type_type", &self.type_type());
5068        match self.type_type() {
5069            Type::Null => {
5070                if let Some(x) = self.type_as_null() {
5071                    ds.field("type_", &x)
5072                } else {
5073                    ds.field(
5074                        "type_",
5075                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5076                    )
5077                }
5078            }
5079            Type::Int => {
5080                if let Some(x) = self.type_as_int() {
5081                    ds.field("type_", &x)
5082                } else {
5083                    ds.field(
5084                        "type_",
5085                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5086                    )
5087                }
5088            }
5089            Type::FloatingPoint => {
5090                if let Some(x) = self.type_as_floating_point() {
5091                    ds.field("type_", &x)
5092                } else {
5093                    ds.field(
5094                        "type_",
5095                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5096                    )
5097                }
5098            }
5099            Type::Binary => {
5100                if let Some(x) = self.type_as_binary() {
5101                    ds.field("type_", &x)
5102                } else {
5103                    ds.field(
5104                        "type_",
5105                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5106                    )
5107                }
5108            }
5109            Type::Utf8 => {
5110                if let Some(x) = self.type_as_utf_8() {
5111                    ds.field("type_", &x)
5112                } else {
5113                    ds.field(
5114                        "type_",
5115                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5116                    )
5117                }
5118            }
5119            Type::Bool => {
5120                if let Some(x) = self.type_as_bool() {
5121                    ds.field("type_", &x)
5122                } else {
5123                    ds.field(
5124                        "type_",
5125                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5126                    )
5127                }
5128            }
5129            Type::Decimal => {
5130                if let Some(x) = self.type_as_decimal() {
5131                    ds.field("type_", &x)
5132                } else {
5133                    ds.field(
5134                        "type_",
5135                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5136                    )
5137                }
5138            }
5139            Type::Date => {
5140                if let Some(x) = self.type_as_date() {
5141                    ds.field("type_", &x)
5142                } else {
5143                    ds.field(
5144                        "type_",
5145                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5146                    )
5147                }
5148            }
5149            Type::Time => {
5150                if let Some(x) = self.type_as_time() {
5151                    ds.field("type_", &x)
5152                } else {
5153                    ds.field(
5154                        "type_",
5155                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5156                    )
5157                }
5158            }
5159            Type::Timestamp => {
5160                if let Some(x) = self.type_as_timestamp() {
5161                    ds.field("type_", &x)
5162                } else {
5163                    ds.field(
5164                        "type_",
5165                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5166                    )
5167                }
5168            }
5169            Type::Interval => {
5170                if let Some(x) = self.type_as_interval() {
5171                    ds.field("type_", &x)
5172                } else {
5173                    ds.field(
5174                        "type_",
5175                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5176                    )
5177                }
5178            }
5179            Type::List => {
5180                if let Some(x) = self.type_as_list() {
5181                    ds.field("type_", &x)
5182                } else {
5183                    ds.field(
5184                        "type_",
5185                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5186                    )
5187                }
5188            }
5189            Type::Struct_ => {
5190                if let Some(x) = self.type_as_struct_() {
5191                    ds.field("type_", &x)
5192                } else {
5193                    ds.field(
5194                        "type_",
5195                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5196                    )
5197                }
5198            }
5199            Type::Union => {
5200                if let Some(x) = self.type_as_union() {
5201                    ds.field("type_", &x)
5202                } else {
5203                    ds.field(
5204                        "type_",
5205                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5206                    )
5207                }
5208            }
5209            Type::FixedSizeBinary => {
5210                if let Some(x) = self.type_as_fixed_size_binary() {
5211                    ds.field("type_", &x)
5212                } else {
5213                    ds.field(
5214                        "type_",
5215                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5216                    )
5217                }
5218            }
5219            Type::FixedSizeList => {
5220                if let Some(x) = self.type_as_fixed_size_list() {
5221                    ds.field("type_", &x)
5222                } else {
5223                    ds.field(
5224                        "type_",
5225                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5226                    )
5227                }
5228            }
5229            Type::Map => {
5230                if let Some(x) = self.type_as_map() {
5231                    ds.field("type_", &x)
5232                } else {
5233                    ds.field(
5234                        "type_",
5235                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5236                    )
5237                }
5238            }
5239            Type::Duration => {
5240                if let Some(x) = self.type_as_duration() {
5241                    ds.field("type_", &x)
5242                } else {
5243                    ds.field(
5244                        "type_",
5245                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5246                    )
5247                }
5248            }
5249            Type::LargeBinary => {
5250                if let Some(x) = self.type_as_large_binary() {
5251                    ds.field("type_", &x)
5252                } else {
5253                    ds.field(
5254                        "type_",
5255                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5256                    )
5257                }
5258            }
5259            Type::LargeUtf8 => {
5260                if let Some(x) = self.type_as_large_utf_8() {
5261                    ds.field("type_", &x)
5262                } else {
5263                    ds.field(
5264                        "type_",
5265                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5266                    )
5267                }
5268            }
5269            Type::LargeList => {
5270                if let Some(x) = self.type_as_large_list() {
5271                    ds.field("type_", &x)
5272                } else {
5273                    ds.field(
5274                        "type_",
5275                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5276                    )
5277                }
5278            }
5279            Type::RunEndEncoded => {
5280                if let Some(x) = self.type_as_run_end_encoded() {
5281                    ds.field("type_", &x)
5282                } else {
5283                    ds.field(
5284                        "type_",
5285                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5286                    )
5287                }
5288            }
5289            Type::BinaryView => {
5290                if let Some(x) = self.type_as_binary_view() {
5291                    ds.field("type_", &x)
5292                } else {
5293                    ds.field(
5294                        "type_",
5295                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5296                    )
5297                }
5298            }
5299            Type::Utf8View => {
5300                if let Some(x) = self.type_as_utf_8_view() {
5301                    ds.field("type_", &x)
5302                } else {
5303                    ds.field(
5304                        "type_",
5305                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5306                    )
5307                }
5308            }
5309            Type::ListView => {
5310                if let Some(x) = self.type_as_list_view() {
5311                    ds.field("type_", &x)
5312                } else {
5313                    ds.field(
5314                        "type_",
5315                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5316                    )
5317                }
5318            }
5319            Type::LargeListView => {
5320                if let Some(x) = self.type_as_large_list_view() {
5321                    ds.field("type_", &x)
5322                } else {
5323                    ds.field(
5324                        "type_",
5325                        &"InvalidFlatbuffer: Union discriminant does not match value.",
5326                    )
5327                }
5328            }
5329            _ => {
5330                let x: Option<()> = None;
5331                ds.field("type_", &x)
5332            }
5333        };
5334        ds.field("dictionary", &self.dictionary());
5335        ds.field("children", &self.children());
5336        ds.field("custom_metadata", &self.custom_metadata());
5337        ds.finish()
5338    }
5339}
5340pub enum SchemaOffset {}
5341#[derive(Copy, Clone, PartialEq)]
5342
5343/// ----------------------------------------------------------------------
5344/// A Schema describes the columns in a row batch
5345pub struct Schema<'a> {
5346    pub _tab: flatbuffers::Table<'a>,
5347}
5348
5349impl<'a> flatbuffers::Follow<'a> for Schema<'a> {
5350    type Inner = Schema<'a>;
5351    #[inline]
5352    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5353        Self {
5354            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
5355        }
5356    }
5357}
5358
5359impl<'a> Schema<'a> {
5360    pub const VT_ENDIANNESS: flatbuffers::VOffsetT = 4;
5361    pub const VT_FIELDS: flatbuffers::VOffsetT = 6;
5362    pub const VT_CUSTOM_METADATA: flatbuffers::VOffsetT = 8;
5363    pub const VT_FEATURES: flatbuffers::VOffsetT = 10;
5364
5365    #[inline]
5366    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5367        Schema { _tab: table }
5368    }
5369    #[allow(unused_mut)]
5370    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5371        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5372        args: &'args SchemaArgs<'args>,
5373    ) -> flatbuffers::WIPOffset<Schema<'bldr>> {
5374        let mut builder = SchemaBuilder::new(_fbb);
5375        if let Some(x) = args.features {
5376            builder.add_features(x);
5377        }
5378        if let Some(x) = args.custom_metadata {
5379            builder.add_custom_metadata(x);
5380        }
5381        if let Some(x) = args.fields {
5382            builder.add_fields(x);
5383        }
5384        builder.add_endianness(args.endianness);
5385        builder.finish()
5386    }
5387
5388    /// endianness of the buffer
5389    /// it is Little Endian by default
5390    /// if endianness doesn't match the underlying system then the vectors need to be converted
5391    #[inline]
5392    pub fn endianness(&self) -> Endianness {
5393        // Safety:
5394        // Created from valid Table for this object
5395        // which contains a valid value in this slot
5396        unsafe {
5397            self._tab
5398                .get::<Endianness>(Schema::VT_ENDIANNESS, Some(Endianness::Little))
5399                .unwrap()
5400        }
5401    }
5402    #[inline]
5403    pub fn fields(
5404        &self,
5405    ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field<'a>>>> {
5406        // Safety:
5407        // Created from valid Table for this object
5408        // which contains a valid value in this slot
5409        unsafe {
5410            self._tab.get::<flatbuffers::ForwardsUOffset<
5411                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field>>,
5412            >>(Schema::VT_FIELDS, None)
5413        }
5414    }
5415    #[inline]
5416    pub fn custom_metadata(
5417        &self,
5418    ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
5419        // Safety:
5420        // Created from valid Table for this object
5421        // which contains a valid value in this slot
5422        unsafe {
5423            self._tab.get::<flatbuffers::ForwardsUOffset<
5424                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>,
5425            >>(Schema::VT_CUSTOM_METADATA, None)
5426        }
5427    }
5428    /// Features used in the stream/file.
5429    #[inline]
5430    pub fn features(&self) -> Option<flatbuffers::Vector<'a, Feature>> {
5431        // Safety:
5432        // Created from valid Table for this object
5433        // which contains a valid value in this slot
5434        unsafe {
5435            self._tab
5436                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, Feature>>>(
5437                    Schema::VT_FEATURES,
5438                    None,
5439                )
5440        }
5441    }
5442}
5443
5444impl flatbuffers::Verifiable for Schema<'_> {
5445    #[inline]
5446    fn run_verifier(
5447        v: &mut flatbuffers::Verifier,
5448        pos: usize,
5449    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5450        use flatbuffers::Verifiable;
5451        v.visit_table(pos)?
5452            .visit_field::<Endianness>("endianness", Self::VT_ENDIANNESS, false)?
5453            .visit_field::<flatbuffers::ForwardsUOffset<
5454                flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Field>>,
5455            >>("fields", Self::VT_FIELDS, false)?
5456            .visit_field::<flatbuffers::ForwardsUOffset<
5457                flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>,
5458            >>("custom_metadata", Self::VT_CUSTOM_METADATA, false)?
5459            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, Feature>>>(
5460                "features",
5461                Self::VT_FEATURES,
5462                false,
5463            )?
5464            .finish();
5465        Ok(())
5466    }
5467}
5468pub struct SchemaArgs<'a> {
5469    pub endianness: Endianness,
5470    pub fields: Option<
5471        flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Field<'a>>>>,
5472    >,
5473    pub custom_metadata: Option<
5474        flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>>,
5475    >,
5476    pub features: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, Feature>>>,
5477}
5478impl<'a> Default for SchemaArgs<'a> {
5479    #[inline]
5480    fn default() -> Self {
5481        SchemaArgs {
5482            endianness: Endianness::Little,
5483            fields: None,
5484            custom_metadata: None,
5485            features: None,
5486        }
5487    }
5488}
5489
5490pub struct SchemaBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5491    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5492    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5493}
5494impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SchemaBuilder<'a, 'b, A> {
5495    #[inline]
5496    pub fn add_endianness(&mut self, endianness: Endianness) {
5497        self.fbb_
5498            .push_slot::<Endianness>(Schema::VT_ENDIANNESS, endianness, Endianness::Little);
5499    }
5500    #[inline]
5501    pub fn add_fields(
5502        &mut self,
5503        fields: flatbuffers::WIPOffset<
5504            flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Field<'b>>>,
5505        >,
5506    ) {
5507        self.fbb_
5508            .push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_FIELDS, fields);
5509    }
5510    #[inline]
5511    pub fn add_custom_metadata(
5512        &mut self,
5513        custom_metadata: flatbuffers::WIPOffset<
5514            flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<KeyValue<'b>>>,
5515        >,
5516    ) {
5517        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
5518            Schema::VT_CUSTOM_METADATA,
5519            custom_metadata,
5520        );
5521    }
5522    #[inline]
5523    pub fn add_features(
5524        &mut self,
5525        features: flatbuffers::WIPOffset<flatbuffers::Vector<'b, Feature>>,
5526    ) {
5527        self.fbb_
5528            .push_slot_always::<flatbuffers::WIPOffset<_>>(Schema::VT_FEATURES, features);
5529    }
5530    #[inline]
5531    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SchemaBuilder<'a, 'b, A> {
5532        let start = _fbb.start_table();
5533        SchemaBuilder {
5534            fbb_: _fbb,
5535            start_: start,
5536        }
5537    }
5538    #[inline]
5539    pub fn finish(self) -> flatbuffers::WIPOffset<Schema<'a>> {
5540        let o = self.fbb_.end_table(self.start_);
5541        flatbuffers::WIPOffset::new(o.value())
5542    }
5543}
5544
5545impl core::fmt::Debug for Schema<'_> {
5546    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5547        let mut ds = f.debug_struct("Schema");
5548        ds.field("endianness", &self.endianness());
5549        ds.field("fields", &self.fields());
5550        ds.field("custom_metadata", &self.custom_metadata());
5551        ds.field("features", &self.features());
5552        ds.finish()
5553    }
5554}
5555#[inline]
5556/// Verifies that a buffer of bytes contains a `Schema`
5557/// and returns it.
5558/// Note that verification is still experimental and may not
5559/// catch every error, or be maximally performant. For the
5560/// previous, unchecked, behavior use
5561/// `root_as_schema_unchecked`.
5562pub fn root_as_schema(buf: &[u8]) -> Result<Schema, flatbuffers::InvalidFlatbuffer> {
5563    flatbuffers::root::<Schema>(buf)
5564}
5565#[inline]
5566/// Verifies that a buffer of bytes contains a size prefixed
5567/// `Schema` and returns it.
5568/// Note that verification is still experimental and may not
5569/// catch every error, or be maximally performant. For the
5570/// previous, unchecked, behavior use
5571/// `size_prefixed_root_as_schema_unchecked`.
5572pub fn size_prefixed_root_as_schema(buf: &[u8]) -> Result<Schema, flatbuffers::InvalidFlatbuffer> {
5573    flatbuffers::size_prefixed_root::<Schema>(buf)
5574}
5575#[inline]
5576/// Verifies, with the given options, that a buffer of bytes
5577/// contains a `Schema` and returns it.
5578/// Note that verification is still experimental and may not
5579/// catch every error, or be maximally performant. For the
5580/// previous, unchecked, behavior use
5581/// `root_as_schema_unchecked`.
5582pub fn root_as_schema_with_opts<'b, 'o>(
5583    opts: &'o flatbuffers::VerifierOptions,
5584    buf: &'b [u8],
5585) -> Result<Schema<'b>, flatbuffers::InvalidFlatbuffer> {
5586    flatbuffers::root_with_opts::<Schema<'b>>(opts, buf)
5587}
5588#[inline]
5589/// Verifies, with the given verifier options, that a buffer of
5590/// bytes contains a size prefixed `Schema` and returns
5591/// it. Note that verification is still experimental and may not
5592/// catch every error, or be maximally performant. For the
5593/// previous, unchecked, behavior use
5594/// `root_as_schema_unchecked`.
5595pub fn size_prefixed_root_as_schema_with_opts<'b, 'o>(
5596    opts: &'o flatbuffers::VerifierOptions,
5597    buf: &'b [u8],
5598) -> Result<Schema<'b>, flatbuffers::InvalidFlatbuffer> {
5599    flatbuffers::size_prefixed_root_with_opts::<Schema<'b>>(opts, buf)
5600}
5601#[inline]
5602/// Assumes, without verification, that a buffer of bytes contains a Schema and returns it.
5603/// # Safety
5604/// Callers must trust the given bytes do indeed contain a valid `Schema`.
5605pub unsafe fn root_as_schema_unchecked(buf: &[u8]) -> Schema {
5606    unsafe { flatbuffers::root_unchecked::<Schema>(buf) }
5607}
5608#[inline]
5609/// Assumes, without verification, that a buffer of bytes contains a size prefixed Schema and returns it.
5610/// # Safety
5611/// Callers must trust the given bytes do indeed contain a valid size prefixed `Schema`.
5612pub unsafe fn size_prefixed_root_as_schema_unchecked(buf: &[u8]) -> Schema {
5613    unsafe { flatbuffers::size_prefixed_root_unchecked::<Schema>(buf) }
5614}
5615#[inline]
5616pub fn finish_schema_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(
5617    fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5618    root: flatbuffers::WIPOffset<Schema<'a>>,
5619) {
5620    fbb.finish(root, None);
5621}
5622
5623#[inline]
5624pub fn finish_size_prefixed_schema_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(
5625    fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5626    root: flatbuffers::WIPOffset<Schema<'a>>,
5627) {
5628    fbb.finish_size_prefixed(root, None);
5629}