Skip to main content

arrow_ipc/gen/
Schema.rs

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