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