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