Skip to main content

vortex_flatbuffers/generated/
footer.rs

1// automatically generated by the FlatBuffers compiler, do not modify
2// @generated
3extern crate alloc;
4
5use crate::array::*;
6use crate::layout::*;
7
8#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
9pub const ENUM_MIN_COMPRESSION_SCHEME: u8 = 0;
10#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
11pub const ENUM_MAX_COMPRESSION_SCHEME: u8 = 3;
12#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
13#[allow(non_camel_case_types)]
14pub const ENUM_VALUES_COMPRESSION_SCHEME: [CompressionScheme; 4] = [
15  CompressionScheme::None,
16  CompressionScheme::LZ4,
17  CompressionScheme::ZLib,
18  CompressionScheme::ZStd,
19];
20
21#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
22#[repr(transparent)]
23pub struct CompressionScheme(pub u8);
24#[allow(non_upper_case_globals)]
25impl CompressionScheme {
26  pub const None: Self = Self(0);
27  pub const LZ4: Self = Self(1);
28  pub const ZLib: Self = Self(2);
29  pub const ZStd: Self = Self(3);
30
31  pub const ENUM_MIN: u8 = 0;
32  pub const ENUM_MAX: u8 = 3;
33  pub const ENUM_VALUES: &'static [Self] = &[
34    Self::None,
35    Self::LZ4,
36    Self::ZLib,
37    Self::ZStd,
38  ];
39  /// Returns the variant's name or "" if unknown.
40  pub fn variant_name(self) -> Option<&'static str> {
41    match self {
42      Self::None => Some("None"),
43      Self::LZ4 => Some("LZ4"),
44      Self::ZLib => Some("ZLib"),
45      Self::ZStd => Some("ZStd"),
46      _ => None,
47    }
48  }
49}
50impl ::core::fmt::Debug for CompressionScheme {
51  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
52    if let Some(name) = self.variant_name() {
53      f.write_str(name)
54    } else {
55      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
56    }
57  }
58}
59impl<'a> ::flatbuffers::Follow<'a> for CompressionScheme {
60  type Inner = Self;
61  #[inline]
62  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
63    let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
64    Self(b)
65  }
66}
67
68impl ::flatbuffers::Push for CompressionScheme {
69    type Output = CompressionScheme;
70    #[inline]
71    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
72        unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
73    }
74}
75
76impl ::flatbuffers::EndianScalar for CompressionScheme {
77  type Scalar = u8;
78  #[inline]
79  fn to_little_endian(self) -> u8 {
80    self.0.to_le()
81  }
82  #[inline]
83  #[allow(clippy::wrong_self_convention)]
84  fn from_little_endian(v: u8) -> Self {
85    let b = u8::from_le(v);
86    Self(b)
87  }
88}
89
90impl<'a> ::flatbuffers::Verifiable for CompressionScheme {
91  #[inline]
92  fn run_verifier(
93    v: &mut ::flatbuffers::Verifier, pos: usize
94  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
95    u8::run_verifier(v, pos)
96  }
97}
98
99impl ::flatbuffers::SimpleToVerifyInSlice for CompressionScheme {}
100/// A `SegmentSpec` acts as the locator for a buffer within the file.
101// struct SegmentSpec, aligned to 8
102#[repr(transparent)]
103#[derive(Clone, Copy, PartialEq)]
104pub struct SegmentSpec(pub [u8; 16]);
105impl Default for SegmentSpec { 
106  fn default() -> Self { 
107    Self([0; 16])
108  }
109}
110impl ::core::fmt::Debug for SegmentSpec {
111  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
112    f.debug_struct("SegmentSpec")
113      .field("offset", &self.offset())
114      .field("length", &self.length())
115      .field("alignment_exponent", &self.alignment_exponent())
116      .field("_compression", &self._compression())
117      .field("_encryption", &self._encryption())
118      .finish()
119  }
120}
121
122impl ::flatbuffers::SimpleToVerifyInSlice for SegmentSpec {}
123impl<'a> ::flatbuffers::Follow<'a> for SegmentSpec {
124  type Inner = &'a SegmentSpec;
125  #[inline]
126  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
127    unsafe { <&'a SegmentSpec>::follow(buf, loc) }
128  }
129}
130impl<'a> ::flatbuffers::Follow<'a> for &'a SegmentSpec {
131  type Inner = &'a SegmentSpec;
132  #[inline]
133  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
134    unsafe { ::flatbuffers::follow_cast_ref::<SegmentSpec>(buf, loc) }
135  }
136}
137impl<'b> ::flatbuffers::Push for SegmentSpec {
138    type Output = SegmentSpec;
139    #[inline]
140    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
141        let src = unsafe { ::core::slice::from_raw_parts(self as *const SegmentSpec as *const u8, <Self as ::flatbuffers::Push>::size()) };
142        dst.copy_from_slice(src);
143    }
144    #[inline]
145    fn alignment() -> ::flatbuffers::PushAlignment {
146        ::flatbuffers::PushAlignment::new(8)
147    }
148}
149
150impl<'a> ::flatbuffers::Verifiable for SegmentSpec {
151  #[inline]
152  fn run_verifier(
153    v: &mut ::flatbuffers::Verifier, pos: usize
154  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
155    v.in_buffer::<Self>(pos)
156  }
157}
158
159impl<'a> SegmentSpec {
160  #[allow(clippy::too_many_arguments)]
161  pub fn new(
162    offset: u64,
163    length: u32,
164    alignment_exponent: u8,
165    _compression: u8,
166    _encryption: u16,
167  ) -> Self {
168    let mut s = Self([0; 16]);
169    s.set_offset(offset);
170    s.set_length(length);
171    s.set_alignment_exponent(alignment_exponent);
172    s.set__compression(_compression);
173    s.set__encryption(_encryption);
174    s
175  }
176
177  /// Offset relative to the start of the file.
178  pub fn offset(&self) -> u64 {
179    let mut mem = ::core::mem::MaybeUninit::<<u64 as ::flatbuffers::EndianScalar>::Scalar>::uninit();
180    // Safety:
181    // Created from a valid Table for this object
182    // Which contains a valid value in this slot
183    ::flatbuffers::EndianScalar::from_little_endian(unsafe {
184      ::core::ptr::copy_nonoverlapping(
185        self.0[0..].as_ptr(),
186        mem.as_mut_ptr() as *mut u8,
187        ::core::mem::size_of::<<u64 as ::flatbuffers::EndianScalar>::Scalar>(),
188      );
189      mem.assume_init()
190    })
191  }
192
193  pub fn set_offset(&mut self, x: u64) {
194    let x_le = ::flatbuffers::EndianScalar::to_little_endian(x);
195    // Safety:
196    // Created from a valid Table for this object
197    // Which contains a valid value in this slot
198    unsafe {
199      ::core::ptr::copy_nonoverlapping(
200        &x_le as *const _ as *const u8,
201        self.0[0..].as_mut_ptr(),
202        ::core::mem::size_of::<<u64 as ::flatbuffers::EndianScalar>::Scalar>(),
203      );
204    }
205  }
206
207  /// Length in bytes of the segment.
208  pub fn length(&self) -> u32 {
209    let mut mem = ::core::mem::MaybeUninit::<<u32 as ::flatbuffers::EndianScalar>::Scalar>::uninit();
210    // Safety:
211    // Created from a valid Table for this object
212    // Which contains a valid value in this slot
213    ::flatbuffers::EndianScalar::from_little_endian(unsafe {
214      ::core::ptr::copy_nonoverlapping(
215        self.0[8..].as_ptr(),
216        mem.as_mut_ptr() as *mut u8,
217        ::core::mem::size_of::<<u32 as ::flatbuffers::EndianScalar>::Scalar>(),
218      );
219      mem.assume_init()
220    })
221  }
222
223  pub fn set_length(&mut self, x: u32) {
224    let x_le = ::flatbuffers::EndianScalar::to_little_endian(x);
225    // Safety:
226    // Created from a valid Table for this object
227    // Which contains a valid value in this slot
228    unsafe {
229      ::core::ptr::copy_nonoverlapping(
230        &x_le as *const _ as *const u8,
231        self.0[8..].as_mut_ptr(),
232        ::core::mem::size_of::<<u32 as ::flatbuffers::EndianScalar>::Scalar>(),
233      );
234    }
235  }
236
237  /// Base-2 exponent of the alignment of the segment.
238  pub fn alignment_exponent(&self) -> u8 {
239    let mut mem = ::core::mem::MaybeUninit::<<u8 as ::flatbuffers::EndianScalar>::Scalar>::uninit();
240    // Safety:
241    // Created from a valid Table for this object
242    // Which contains a valid value in this slot
243    ::flatbuffers::EndianScalar::from_little_endian(unsafe {
244      ::core::ptr::copy_nonoverlapping(
245        self.0[12..].as_ptr(),
246        mem.as_mut_ptr() as *mut u8,
247        ::core::mem::size_of::<<u8 as ::flatbuffers::EndianScalar>::Scalar>(),
248      );
249      mem.assume_init()
250    })
251  }
252
253  pub fn set_alignment_exponent(&mut self, x: u8) {
254    let x_le = ::flatbuffers::EndianScalar::to_little_endian(x);
255    // Safety:
256    // Created from a valid Table for this object
257    // Which contains a valid value in this slot
258    unsafe {
259      ::core::ptr::copy_nonoverlapping(
260        &x_le as *const _ as *const u8,
261        self.0[12..].as_mut_ptr(),
262        ::core::mem::size_of::<<u8 as ::flatbuffers::EndianScalar>::Scalar>(),
263      );
264    }
265  }
266
267  pub fn _compression(&self) -> u8 {
268    let mut mem = ::core::mem::MaybeUninit::<<u8 as ::flatbuffers::EndianScalar>::Scalar>::uninit();
269    // Safety:
270    // Created from a valid Table for this object
271    // Which contains a valid value in this slot
272    ::flatbuffers::EndianScalar::from_little_endian(unsafe {
273      ::core::ptr::copy_nonoverlapping(
274        self.0[13..].as_ptr(),
275        mem.as_mut_ptr() as *mut u8,
276        ::core::mem::size_of::<<u8 as ::flatbuffers::EndianScalar>::Scalar>(),
277      );
278      mem.assume_init()
279    })
280  }
281
282  pub fn set__compression(&mut self, x: u8) {
283    let x_le = ::flatbuffers::EndianScalar::to_little_endian(x);
284    // Safety:
285    // Created from a valid Table for this object
286    // Which contains a valid value in this slot
287    unsafe {
288      ::core::ptr::copy_nonoverlapping(
289        &x_le as *const _ as *const u8,
290        self.0[13..].as_mut_ptr(),
291        ::core::mem::size_of::<<u8 as ::flatbuffers::EndianScalar>::Scalar>(),
292      );
293    }
294  }
295
296  pub fn _encryption(&self) -> u16 {
297    let mut mem = ::core::mem::MaybeUninit::<<u16 as ::flatbuffers::EndianScalar>::Scalar>::uninit();
298    // Safety:
299    // Created from a valid Table for this object
300    // Which contains a valid value in this slot
301    ::flatbuffers::EndianScalar::from_little_endian(unsafe {
302      ::core::ptr::copy_nonoverlapping(
303        self.0[14..].as_ptr(),
304        mem.as_mut_ptr() as *mut u8,
305        ::core::mem::size_of::<<u16 as ::flatbuffers::EndianScalar>::Scalar>(),
306      );
307      mem.assume_init()
308    })
309  }
310
311  pub fn set__encryption(&mut self, x: u16) {
312    let x_le = ::flatbuffers::EndianScalar::to_little_endian(x);
313    // Safety:
314    // Created from a valid Table for this object
315    // Which contains a valid value in this slot
316    unsafe {
317      ::core::ptr::copy_nonoverlapping(
318        &x_le as *const _ as *const u8,
319        self.0[14..].as_mut_ptr(),
320        ::core::mem::size_of::<<u16 as ::flatbuffers::EndianScalar>::Scalar>(),
321      );
322    }
323  }
324
325}
326
327pub enum PostscriptOffset {}
328#[derive(Copy, Clone, PartialEq)]
329
330/// The `Postscript` is guaranteed by the file format to never exceed
331/// 65528 bytes (i.e., u16::MAX - 8 bytes) in length, and is immediately
332/// followed by an 8-byte `EndOfFile` struct.
333///
334/// An initial read of a Vortex file defaults to at least 64KB (u16::MAX bytes) and therefore
335/// is guaranteed to cover at least the Postscript.
336///
337/// The reason for a postscript at all is to ensure minimal but all necessary footer information
338/// can be read in two round trips. Since the DType is optional and possibly large, it lives in
339/// its own segment. If the footer were arbitrary size, with a pointer to the DType segment, then
340/// in the worst case we would need one round trip to read the footer length, one to read the full
341/// footer and parse the DType offset, and a third to fetch the DType segment.
342///
343/// The segments pointed to by the postscript have inline compression and encryption specs to avoid
344/// the need to fetch encryption schemes up-front.
345pub struct Postscript<'a> {
346  pub _tab: ::flatbuffers::Table<'a>,
347}
348
349impl<'a> ::flatbuffers::Follow<'a> for Postscript<'a> {
350  type Inner = Postscript<'a>;
351  #[inline]
352  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
353    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
354  }
355}
356
357impl<'a> Postscript<'a> {
358  pub const VT_DTYPE: ::flatbuffers::VOffsetT = 4;
359  pub const VT_LAYOUT: ::flatbuffers::VOffsetT = 6;
360  pub const VT_STATISTICS: ::flatbuffers::VOffsetT = 8;
361  pub const VT_FOOTER: ::flatbuffers::VOffsetT = 10;
362
363  #[inline]
364  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
365    Postscript { _tab: table }
366  }
367  #[allow(unused_mut)]
368  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
369    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
370    args: &'args PostscriptArgs<'args>
371  ) -> ::flatbuffers::WIPOffset<Postscript<'bldr>> {
372    let mut builder = PostscriptBuilder::new(_fbb);
373    if let Some(x) = args.footer { builder.add_footer(x); }
374    if let Some(x) = args.statistics { builder.add_statistics(x); }
375    if let Some(x) = args.layout { builder.add_layout(x); }
376    if let Some(x) = args.dtype { builder.add_dtype(x); }
377    builder.finish()
378  }
379
380
381  /// Segment containing the root `DType` flatbuffer.
382  #[inline]
383  pub fn dtype(&self) -> Option<PostscriptSegment<'a>> {
384    // Safety:
385    // Created from valid Table for this object
386    // which contains a valid value in this slot
387    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PostscriptSegment>>(Postscript::VT_DTYPE, None)}
388  }
389  /// Segment containing the root `Layout` flatbuffer (required).
390  #[inline]
391  pub fn layout(&self) -> Option<PostscriptSegment<'a>> {
392    // Safety:
393    // Created from valid Table for this object
394    // which contains a valid value in this slot
395    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PostscriptSegment>>(Postscript::VT_LAYOUT, None)}
396  }
397  /// Segment containing the file-level `Statistics` flatbuffer.
398  #[inline]
399  pub fn statistics(&self) -> Option<PostscriptSegment<'a>> {
400    // Safety:
401    // Created from valid Table for this object
402    // which contains a valid value in this slot
403    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PostscriptSegment>>(Postscript::VT_STATISTICS, None)}
404  }
405  /// Segment containing the 'Footer' flatbuffer (required)
406  #[inline]
407  pub fn footer(&self) -> Option<PostscriptSegment<'a>> {
408    // Safety:
409    // Created from valid Table for this object
410    // which contains a valid value in this slot
411    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PostscriptSegment>>(Postscript::VT_FOOTER, None)}
412  }
413}
414
415impl ::flatbuffers::Verifiable for Postscript<'_> {
416  #[inline]
417  fn run_verifier(
418    v: &mut ::flatbuffers::Verifier, pos: usize
419  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
420    v.visit_table(pos)?
421     .visit_field::<::flatbuffers::ForwardsUOffset<PostscriptSegment>>("dtype", Self::VT_DTYPE, false)?
422     .visit_field::<::flatbuffers::ForwardsUOffset<PostscriptSegment>>("layout", Self::VT_LAYOUT, false)?
423     .visit_field::<::flatbuffers::ForwardsUOffset<PostscriptSegment>>("statistics", Self::VT_STATISTICS, false)?
424     .visit_field::<::flatbuffers::ForwardsUOffset<PostscriptSegment>>("footer", Self::VT_FOOTER, false)?
425     .finish();
426    Ok(())
427  }
428}
429pub struct PostscriptArgs<'a> {
430    pub dtype: Option<::flatbuffers::WIPOffset<PostscriptSegment<'a>>>,
431    pub layout: Option<::flatbuffers::WIPOffset<PostscriptSegment<'a>>>,
432    pub statistics: Option<::flatbuffers::WIPOffset<PostscriptSegment<'a>>>,
433    pub footer: Option<::flatbuffers::WIPOffset<PostscriptSegment<'a>>>,
434}
435impl<'a> Default for PostscriptArgs<'a> {
436  #[inline]
437  fn default() -> Self {
438    PostscriptArgs {
439      dtype: None,
440      layout: None,
441      statistics: None,
442      footer: None,
443    }
444  }
445}
446
447pub struct PostscriptBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
448  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
449  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
450}
451impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PostscriptBuilder<'a, 'b, A> {
452  #[inline]
453  pub fn add_dtype(&mut self, dtype: ::flatbuffers::WIPOffset<PostscriptSegment<'b >>) {
454    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PostscriptSegment>>(Postscript::VT_DTYPE, dtype);
455  }
456  #[inline]
457  pub fn add_layout(&mut self, layout: ::flatbuffers::WIPOffset<PostscriptSegment<'b >>) {
458    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PostscriptSegment>>(Postscript::VT_LAYOUT, layout);
459  }
460  #[inline]
461  pub fn add_statistics(&mut self, statistics: ::flatbuffers::WIPOffset<PostscriptSegment<'b >>) {
462    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PostscriptSegment>>(Postscript::VT_STATISTICS, statistics);
463  }
464  #[inline]
465  pub fn add_footer(&mut self, footer: ::flatbuffers::WIPOffset<PostscriptSegment<'b >>) {
466    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PostscriptSegment>>(Postscript::VT_FOOTER, footer);
467  }
468  #[inline]
469  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PostscriptBuilder<'a, 'b, A> {
470    let start = _fbb.start_table();
471    PostscriptBuilder {
472      fbb_: _fbb,
473      start_: start,
474    }
475  }
476  #[inline]
477  pub fn finish(self) -> ::flatbuffers::WIPOffset<Postscript<'a>> {
478    let o = self.fbb_.end_table(self.start_);
479    ::flatbuffers::WIPOffset::new(o.value())
480  }
481}
482
483impl ::core::fmt::Debug for Postscript<'_> {
484  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
485    let mut ds = f.debug_struct("Postscript");
486      ds.field("dtype", &self.dtype());
487      ds.field("layout", &self.layout());
488      ds.field("statistics", &self.statistics());
489      ds.field("footer", &self.footer());
490      ds.finish()
491  }
492}
493pub enum PostscriptSegmentOffset {}
494#[derive(Copy, Clone, PartialEq)]
495
496/// A `PostscriptSegment` describes the location of a segment in the file without referencing any
497/// specification objects. That is, encryption and compression are defined inline.
498pub struct PostscriptSegment<'a> {
499  pub _tab: ::flatbuffers::Table<'a>,
500}
501
502impl<'a> ::flatbuffers::Follow<'a> for PostscriptSegment<'a> {
503  type Inner = PostscriptSegment<'a>;
504  #[inline]
505  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
506    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
507  }
508}
509
510impl<'a> PostscriptSegment<'a> {
511  pub const VT_OFFSET: ::flatbuffers::VOffsetT = 4;
512  pub const VT_LENGTH: ::flatbuffers::VOffsetT = 6;
513  pub const VT_ALIGNMENT_EXPONENT: ::flatbuffers::VOffsetT = 8;
514  pub const VT__COMPRESSION: ::flatbuffers::VOffsetT = 10;
515  pub const VT__ENCRYPTION: ::flatbuffers::VOffsetT = 12;
516
517  #[inline]
518  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
519    PostscriptSegment { _tab: table }
520  }
521  #[allow(unused_mut)]
522  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
523    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
524    args: &'args PostscriptSegmentArgs<'args>
525  ) -> ::flatbuffers::WIPOffset<PostscriptSegment<'bldr>> {
526    let mut builder = PostscriptSegmentBuilder::new(_fbb);
527    builder.add_offset(args.offset);
528    if let Some(x) = args._encryption { builder.add__encryption(x); }
529    if let Some(x) = args._compression { builder.add__compression(x); }
530    builder.add_length(args.length);
531    builder.add_alignment_exponent(args.alignment_exponent);
532    builder.finish()
533  }
534
535
536  #[inline]
537  pub fn offset(&self) -> u64 {
538    // Safety:
539    // Created from valid Table for this object
540    // which contains a valid value in this slot
541    unsafe { self._tab.get::<u64>(PostscriptSegment::VT_OFFSET, Some(0)).unwrap()}
542  }
543  #[inline]
544  pub fn length(&self) -> u32 {
545    // Safety:
546    // Created from valid Table for this object
547    // which contains a valid value in this slot
548    unsafe { self._tab.get::<u32>(PostscriptSegment::VT_LENGTH, Some(0)).unwrap()}
549  }
550  #[inline]
551  pub fn alignment_exponent(&self) -> u8 {
552    // Safety:
553    // Created from valid Table for this object
554    // which contains a valid value in this slot
555    unsafe { self._tab.get::<u8>(PostscriptSegment::VT_ALIGNMENT_EXPONENT, Some(0)).unwrap()}
556  }
557  #[inline]
558  pub fn _compression(&self) -> Option<CompressionSpec<'a>> {
559    // Safety:
560    // Created from valid Table for this object
561    // which contains a valid value in this slot
562    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<CompressionSpec>>(PostscriptSegment::VT__COMPRESSION, None)}
563  }
564  #[inline]
565  pub fn _encryption(&self) -> Option<EncryptionSpec<'a>> {
566    // Safety:
567    // Created from valid Table for this object
568    // which contains a valid value in this slot
569    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<EncryptionSpec>>(PostscriptSegment::VT__ENCRYPTION, None)}
570  }
571}
572
573impl ::flatbuffers::Verifiable for PostscriptSegment<'_> {
574  #[inline]
575  fn run_verifier(
576    v: &mut ::flatbuffers::Verifier, pos: usize
577  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
578    v.visit_table(pos)?
579     .visit_field::<u64>("offset", Self::VT_OFFSET, false)?
580     .visit_field::<u32>("length", Self::VT_LENGTH, false)?
581     .visit_field::<u8>("alignment_exponent", Self::VT_ALIGNMENT_EXPONENT, false)?
582     .visit_field::<::flatbuffers::ForwardsUOffset<CompressionSpec>>("_compression", Self::VT__COMPRESSION, false)?
583     .visit_field::<::flatbuffers::ForwardsUOffset<EncryptionSpec>>("_encryption", Self::VT__ENCRYPTION, false)?
584     .finish();
585    Ok(())
586  }
587}
588pub struct PostscriptSegmentArgs<'a> {
589    pub offset: u64,
590    pub length: u32,
591    pub alignment_exponent: u8,
592    pub _compression: Option<::flatbuffers::WIPOffset<CompressionSpec<'a>>>,
593    pub _encryption: Option<::flatbuffers::WIPOffset<EncryptionSpec<'a>>>,
594}
595impl<'a> Default for PostscriptSegmentArgs<'a> {
596  #[inline]
597  fn default() -> Self {
598    PostscriptSegmentArgs {
599      offset: 0,
600      length: 0,
601      alignment_exponent: 0,
602      _compression: None,
603      _encryption: None,
604    }
605  }
606}
607
608pub struct PostscriptSegmentBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
609  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
610  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
611}
612impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PostscriptSegmentBuilder<'a, 'b, A> {
613  #[inline]
614  pub fn add_offset(&mut self, offset: u64) {
615    self.fbb_.push_slot::<u64>(PostscriptSegment::VT_OFFSET, offset, 0);
616  }
617  #[inline]
618  pub fn add_length(&mut self, length: u32) {
619    self.fbb_.push_slot::<u32>(PostscriptSegment::VT_LENGTH, length, 0);
620  }
621  #[inline]
622  pub fn add_alignment_exponent(&mut self, alignment_exponent: u8) {
623    self.fbb_.push_slot::<u8>(PostscriptSegment::VT_ALIGNMENT_EXPONENT, alignment_exponent, 0);
624  }
625  #[inline]
626  pub fn add__compression(&mut self, _compression: ::flatbuffers::WIPOffset<CompressionSpec<'b >>) {
627    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<CompressionSpec>>(PostscriptSegment::VT__COMPRESSION, _compression);
628  }
629  #[inline]
630  pub fn add__encryption(&mut self, _encryption: ::flatbuffers::WIPOffset<EncryptionSpec<'b >>) {
631    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<EncryptionSpec>>(PostscriptSegment::VT__ENCRYPTION, _encryption);
632  }
633  #[inline]
634  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PostscriptSegmentBuilder<'a, 'b, A> {
635    let start = _fbb.start_table();
636    PostscriptSegmentBuilder {
637      fbb_: _fbb,
638      start_: start,
639    }
640  }
641  #[inline]
642  pub fn finish(self) -> ::flatbuffers::WIPOffset<PostscriptSegment<'a>> {
643    let o = self.fbb_.end_table(self.start_);
644    ::flatbuffers::WIPOffset::new(o.value())
645  }
646}
647
648impl ::core::fmt::Debug for PostscriptSegment<'_> {
649  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
650    let mut ds = f.debug_struct("PostscriptSegment");
651      ds.field("offset", &self.offset());
652      ds.field("length", &self.length());
653      ds.field("alignment_exponent", &self.alignment_exponent());
654      ds.field("_compression", &self._compression());
655      ds.field("_encryption", &self._encryption());
656      ds.finish()
657  }
658}
659pub enum FileStatisticsOffset {}
660#[derive(Copy, Clone, PartialEq)]
661
662/// The `FileStatistics` object contains file-level statistics for the Vortex file.
663pub struct FileStatistics<'a> {
664  pub _tab: ::flatbuffers::Table<'a>,
665}
666
667impl<'a> ::flatbuffers::Follow<'a> for FileStatistics<'a> {
668  type Inner = FileStatistics<'a>;
669  #[inline]
670  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
671    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
672  }
673}
674
675impl<'a> FileStatistics<'a> {
676  pub const VT_FIELD_STATS: ::flatbuffers::VOffsetT = 4;
677
678  #[inline]
679  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
680    FileStatistics { _tab: table }
681  }
682  #[allow(unused_mut)]
683  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
684    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
685    args: &'args FileStatisticsArgs<'args>
686  ) -> ::flatbuffers::WIPOffset<FileStatistics<'bldr>> {
687    let mut builder = FileStatisticsBuilder::new(_fbb);
688    if let Some(x) = args.field_stats { builder.add_field_stats(x); }
689    builder.finish()
690  }
691
692
693  /// Statistics for each field in the root schema. If the root schema is not a struct, there will
694  /// be a single entry in this array.
695  #[inline]
696  pub fn field_stats(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<ArrayStats<'a>>>> {
697    // Safety:
698    // Created from valid Table for this object
699    // which contains a valid value in this slot
700    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<ArrayStats>>>>(FileStatistics::VT_FIELD_STATS, None)}
701  }
702}
703
704impl ::flatbuffers::Verifiable for FileStatistics<'_> {
705  #[inline]
706  fn run_verifier(
707    v: &mut ::flatbuffers::Verifier, pos: usize
708  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
709    v.visit_table(pos)?
710     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<ArrayStats>>>>("field_stats", Self::VT_FIELD_STATS, false)?
711     .finish();
712    Ok(())
713  }
714}
715pub struct FileStatisticsArgs<'a> {
716    pub field_stats: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<ArrayStats<'a>>>>>,
717}
718impl<'a> Default for FileStatisticsArgs<'a> {
719  #[inline]
720  fn default() -> Self {
721    FileStatisticsArgs {
722      field_stats: None,
723    }
724  }
725}
726
727pub struct FileStatisticsBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
728  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
729  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
730}
731impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> FileStatisticsBuilder<'a, 'b, A> {
732  #[inline]
733  pub fn add_field_stats(&mut self, field_stats: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<ArrayStats<'b >>>>) {
734    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(FileStatistics::VT_FIELD_STATS, field_stats);
735  }
736  #[inline]
737  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> FileStatisticsBuilder<'a, 'b, A> {
738    let start = _fbb.start_table();
739    FileStatisticsBuilder {
740      fbb_: _fbb,
741      start_: start,
742    }
743  }
744  #[inline]
745  pub fn finish(self) -> ::flatbuffers::WIPOffset<FileStatistics<'a>> {
746    let o = self.fbb_.end_table(self.start_);
747    ::flatbuffers::WIPOffset::new(o.value())
748  }
749}
750
751impl ::core::fmt::Debug for FileStatistics<'_> {
752  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
753    let mut ds = f.debug_struct("FileStatistics");
754      ds.field("field_stats", &self.field_stats());
755      ds.finish()
756  }
757}
758pub enum FooterOffset {}
759#[derive(Copy, Clone, PartialEq)]
760
761/// The `Registry` object stores dictionary-encoded configuration for segments,
762/// compression schemes, encryption schemes, etc.
763pub struct Footer<'a> {
764  pub _tab: ::flatbuffers::Table<'a>,
765}
766
767impl<'a> ::flatbuffers::Follow<'a> for Footer<'a> {
768  type Inner = Footer<'a>;
769  #[inline]
770  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
771    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
772  }
773}
774
775impl<'a> Footer<'a> {
776  pub const VT_ARRAY_SPECS: ::flatbuffers::VOffsetT = 4;
777  pub const VT_LAYOUT_SPECS: ::flatbuffers::VOffsetT = 6;
778  pub const VT_SEGMENT_SPECS: ::flatbuffers::VOffsetT = 8;
779  pub const VT_COMPRESSION_SPECS: ::flatbuffers::VOffsetT = 10;
780  pub const VT_ENCRYPTION_SPECS: ::flatbuffers::VOffsetT = 12;
781
782  #[inline]
783  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
784    Footer { _tab: table }
785  }
786  #[allow(unused_mut)]
787  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
788    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
789    args: &'args FooterArgs<'args>
790  ) -> ::flatbuffers::WIPOffset<Footer<'bldr>> {
791    let mut builder = FooterBuilder::new(_fbb);
792    if let Some(x) = args.encryption_specs { builder.add_encryption_specs(x); }
793    if let Some(x) = args.compression_specs { builder.add_compression_specs(x); }
794    if let Some(x) = args.segment_specs { builder.add_segment_specs(x); }
795    if let Some(x) = args.layout_specs { builder.add_layout_specs(x); }
796    if let Some(x) = args.array_specs { builder.add_array_specs(x); }
797    builder.finish()
798  }
799
800
801  #[inline]
802  pub fn array_specs(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<ArraySpec<'a>>>> {
803    // Safety:
804    // Created from valid Table for this object
805    // which contains a valid value in this slot
806    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<ArraySpec>>>>(Footer::VT_ARRAY_SPECS, None)}
807  }
808  #[inline]
809  pub fn layout_specs(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<LayoutSpec<'a>>>> {
810    // Safety:
811    // Created from valid Table for this object
812    // which contains a valid value in this slot
813    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<LayoutSpec>>>>(Footer::VT_LAYOUT_SPECS, None)}
814  }
815  #[inline]
816  pub fn segment_specs(&self) -> Option<::flatbuffers::Vector<'a, SegmentSpec>> {
817    // Safety:
818    // Created from valid Table for this object
819    // which contains a valid value in this slot
820    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, SegmentSpec>>>(Footer::VT_SEGMENT_SPECS, None)}
821  }
822  #[inline]
823  pub fn compression_specs(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<CompressionSpec<'a>>>> {
824    // Safety:
825    // Created from valid Table for this object
826    // which contains a valid value in this slot
827    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<CompressionSpec>>>>(Footer::VT_COMPRESSION_SPECS, None)}
828  }
829  #[inline]
830  pub fn encryption_specs(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EncryptionSpec<'a>>>> {
831    // Safety:
832    // Created from valid Table for this object
833    // which contains a valid value in this slot
834    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EncryptionSpec>>>>(Footer::VT_ENCRYPTION_SPECS, None)}
835  }
836}
837
838impl ::flatbuffers::Verifiable for Footer<'_> {
839  #[inline]
840  fn run_verifier(
841    v: &mut ::flatbuffers::Verifier, pos: usize
842  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
843    v.visit_table(pos)?
844     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<ArraySpec>>>>("array_specs", Self::VT_ARRAY_SPECS, false)?
845     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<LayoutSpec>>>>("layout_specs", Self::VT_LAYOUT_SPECS, false)?
846     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, SegmentSpec>>>("segment_specs", Self::VT_SEGMENT_SPECS, false)?
847     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<CompressionSpec>>>>("compression_specs", Self::VT_COMPRESSION_SPECS, false)?
848     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<EncryptionSpec>>>>("encryption_specs", Self::VT_ENCRYPTION_SPECS, false)?
849     .finish();
850    Ok(())
851  }
852}
853pub struct FooterArgs<'a> {
854    pub array_specs: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<ArraySpec<'a>>>>>,
855    pub layout_specs: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<LayoutSpec<'a>>>>>,
856    pub segment_specs: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, SegmentSpec>>>,
857    pub compression_specs: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<CompressionSpec<'a>>>>>,
858    pub encryption_specs: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EncryptionSpec<'a>>>>>,
859}
860impl<'a> Default for FooterArgs<'a> {
861  #[inline]
862  fn default() -> Self {
863    FooterArgs {
864      array_specs: None,
865      layout_specs: None,
866      segment_specs: None,
867      compression_specs: None,
868      encryption_specs: None,
869    }
870  }
871}
872
873pub struct FooterBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
874  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
875  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
876}
877impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> FooterBuilder<'a, 'b, A> {
878  #[inline]
879  pub fn add_array_specs(&mut self, array_specs: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<ArraySpec<'b >>>>) {
880    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Footer::VT_ARRAY_SPECS, array_specs);
881  }
882  #[inline]
883  pub fn add_layout_specs(&mut self, layout_specs: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<LayoutSpec<'b >>>>) {
884    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Footer::VT_LAYOUT_SPECS, layout_specs);
885  }
886  #[inline]
887  pub fn add_segment_specs(&mut self, segment_specs: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , SegmentSpec>>) {
888    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Footer::VT_SEGMENT_SPECS, segment_specs);
889  }
890  #[inline]
891  pub fn add_compression_specs(&mut self, compression_specs: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<CompressionSpec<'b >>>>) {
892    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Footer::VT_COMPRESSION_SPECS, compression_specs);
893  }
894  #[inline]
895  pub fn add_encryption_specs(&mut self, encryption_specs: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<EncryptionSpec<'b >>>>) {
896    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Footer::VT_ENCRYPTION_SPECS, encryption_specs);
897  }
898  #[inline]
899  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> FooterBuilder<'a, 'b, A> {
900    let start = _fbb.start_table();
901    FooterBuilder {
902      fbb_: _fbb,
903      start_: start,
904    }
905  }
906  #[inline]
907  pub fn finish(self) -> ::flatbuffers::WIPOffset<Footer<'a>> {
908    let o = self.fbb_.end_table(self.start_);
909    ::flatbuffers::WIPOffset::new(o.value())
910  }
911}
912
913impl ::core::fmt::Debug for Footer<'_> {
914  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
915    let mut ds = f.debug_struct("Footer");
916      ds.field("array_specs", &self.array_specs());
917      ds.field("layout_specs", &self.layout_specs());
918      ds.field("segment_specs", &self.segment_specs());
919      ds.field("compression_specs", &self.compression_specs());
920      ds.field("encryption_specs", &self.encryption_specs());
921      ds.finish()
922  }
923}
924pub enum ArraySpecOffset {}
925#[derive(Copy, Clone, PartialEq)]
926
927/// An `ArraySpec` describes the type of a particular array.
928///
929/// These are identified by a globally unique string identifier, and looked up in the Vortex registry
930/// at read-time.
931pub struct ArraySpec<'a> {
932  pub _tab: ::flatbuffers::Table<'a>,
933}
934
935impl<'a> ::flatbuffers::Follow<'a> for ArraySpec<'a> {
936  type Inner = ArraySpec<'a>;
937  #[inline]
938  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
939    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
940  }
941}
942
943impl<'a> ArraySpec<'a> {
944  pub const VT_ID: ::flatbuffers::VOffsetT = 4;
945
946  #[inline]
947  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
948    ArraySpec { _tab: table }
949  }
950  #[allow(unused_mut)]
951  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
952    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
953    args: &'args ArraySpecArgs<'args>
954  ) -> ::flatbuffers::WIPOffset<ArraySpec<'bldr>> {
955    let mut builder = ArraySpecBuilder::new(_fbb);
956    if let Some(x) = args.id { builder.add_id(x); }
957    builder.finish()
958  }
959
960
961  #[inline]
962  pub fn id(&self) -> &'a str {
963    // Safety:
964    // Created from valid Table for this object
965    // which contains a valid value in this slot
966    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(ArraySpec::VT_ID, None).unwrap()}
967  }
968}
969
970impl ::flatbuffers::Verifiable for ArraySpec<'_> {
971  #[inline]
972  fn run_verifier(
973    v: &mut ::flatbuffers::Verifier, pos: usize
974  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
975    v.visit_table(pos)?
976     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("id", Self::VT_ID, true)?
977     .finish();
978    Ok(())
979  }
980}
981pub struct ArraySpecArgs<'a> {
982    pub id: Option<::flatbuffers::WIPOffset<&'a str>>,
983}
984impl<'a> Default for ArraySpecArgs<'a> {
985  #[inline]
986  fn default() -> Self {
987    ArraySpecArgs {
988      id: None, // required field
989    }
990  }
991}
992
993pub struct ArraySpecBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
994  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
995  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
996}
997impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> ArraySpecBuilder<'a, 'b, A> {
998  #[inline]
999  pub fn add_id(&mut self, id: ::flatbuffers::WIPOffset<&'b  str>) {
1000    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(ArraySpec::VT_ID, id);
1001  }
1002  #[inline]
1003  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> ArraySpecBuilder<'a, 'b, A> {
1004    let start = _fbb.start_table();
1005    ArraySpecBuilder {
1006      fbb_: _fbb,
1007      start_: start,
1008    }
1009  }
1010  #[inline]
1011  pub fn finish(self) -> ::flatbuffers::WIPOffset<ArraySpec<'a>> {
1012    let o = self.fbb_.end_table(self.start_);
1013    self.fbb_.required(o, ArraySpec::VT_ID,"id");
1014    ::flatbuffers::WIPOffset::new(o.value())
1015  }
1016}
1017
1018impl ::core::fmt::Debug for ArraySpec<'_> {
1019  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1020    let mut ds = f.debug_struct("ArraySpec");
1021      ds.field("id", &self.id());
1022      ds.finish()
1023  }
1024}
1025pub enum LayoutSpecOffset {}
1026#[derive(Copy, Clone, PartialEq)]
1027
1028/// A `LayoutSpec` describes the type of a particular layout.
1029///
1030/// These are identified by a globally unique string identifier, and looked up in the Vortex registry
1031/// at read-time.
1032pub struct LayoutSpec<'a> {
1033  pub _tab: ::flatbuffers::Table<'a>,
1034}
1035
1036impl<'a> ::flatbuffers::Follow<'a> for LayoutSpec<'a> {
1037  type Inner = LayoutSpec<'a>;
1038  #[inline]
1039  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1040    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
1041  }
1042}
1043
1044impl<'a> LayoutSpec<'a> {
1045  pub const VT_ID: ::flatbuffers::VOffsetT = 4;
1046
1047  #[inline]
1048  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
1049    LayoutSpec { _tab: table }
1050  }
1051  #[allow(unused_mut)]
1052  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
1053    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
1054    args: &'args LayoutSpecArgs<'args>
1055  ) -> ::flatbuffers::WIPOffset<LayoutSpec<'bldr>> {
1056    let mut builder = LayoutSpecBuilder::new(_fbb);
1057    if let Some(x) = args.id { builder.add_id(x); }
1058    builder.finish()
1059  }
1060
1061
1062  #[inline]
1063  pub fn id(&self) -> &'a str {
1064    // Safety:
1065    // Created from valid Table for this object
1066    // which contains a valid value in this slot
1067    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(LayoutSpec::VT_ID, None).unwrap()}
1068  }
1069}
1070
1071impl ::flatbuffers::Verifiable for LayoutSpec<'_> {
1072  #[inline]
1073  fn run_verifier(
1074    v: &mut ::flatbuffers::Verifier, pos: usize
1075  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
1076    v.visit_table(pos)?
1077     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("id", Self::VT_ID, true)?
1078     .finish();
1079    Ok(())
1080  }
1081}
1082pub struct LayoutSpecArgs<'a> {
1083    pub id: Option<::flatbuffers::WIPOffset<&'a str>>,
1084}
1085impl<'a> Default for LayoutSpecArgs<'a> {
1086  #[inline]
1087  fn default() -> Self {
1088    LayoutSpecArgs {
1089      id: None, // required field
1090    }
1091  }
1092}
1093
1094pub struct LayoutSpecBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
1095  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
1096  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
1097}
1098impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> LayoutSpecBuilder<'a, 'b, A> {
1099  #[inline]
1100  pub fn add_id(&mut self, id: ::flatbuffers::WIPOffset<&'b  str>) {
1101    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(LayoutSpec::VT_ID, id);
1102  }
1103  #[inline]
1104  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> LayoutSpecBuilder<'a, 'b, A> {
1105    let start = _fbb.start_table();
1106    LayoutSpecBuilder {
1107      fbb_: _fbb,
1108      start_: start,
1109    }
1110  }
1111  #[inline]
1112  pub fn finish(self) -> ::flatbuffers::WIPOffset<LayoutSpec<'a>> {
1113    let o = self.fbb_.end_table(self.start_);
1114    self.fbb_.required(o, LayoutSpec::VT_ID,"id");
1115    ::flatbuffers::WIPOffset::new(o.value())
1116  }
1117}
1118
1119impl ::core::fmt::Debug for LayoutSpec<'_> {
1120  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1121    let mut ds = f.debug_struct("LayoutSpec");
1122      ds.field("id", &self.id());
1123      ds.finish()
1124  }
1125}
1126pub enum CompressionSpecOffset {}
1127#[derive(Copy, Clone, PartialEq)]
1128
1129/// Definition of a compression scheme.
1130pub struct CompressionSpec<'a> {
1131  pub _tab: ::flatbuffers::Table<'a>,
1132}
1133
1134impl<'a> ::flatbuffers::Follow<'a> for CompressionSpec<'a> {
1135  type Inner = CompressionSpec<'a>;
1136  #[inline]
1137  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1138    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
1139  }
1140}
1141
1142impl<'a> CompressionSpec<'a> {
1143  pub const VT_SCHEME: ::flatbuffers::VOffsetT = 4;
1144
1145  #[inline]
1146  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
1147    CompressionSpec { _tab: table }
1148  }
1149  #[allow(unused_mut)]
1150  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
1151    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
1152    args: &'args CompressionSpecArgs
1153  ) -> ::flatbuffers::WIPOffset<CompressionSpec<'bldr>> {
1154    let mut builder = CompressionSpecBuilder::new(_fbb);
1155    builder.add_scheme(args.scheme);
1156    builder.finish()
1157  }
1158
1159
1160  #[inline]
1161  pub fn scheme(&self) -> CompressionScheme {
1162    // Safety:
1163    // Created from valid Table for this object
1164    // which contains a valid value in this slot
1165    unsafe { self._tab.get::<CompressionScheme>(CompressionSpec::VT_SCHEME, Some(CompressionScheme::None)).unwrap()}
1166  }
1167}
1168
1169impl ::flatbuffers::Verifiable for CompressionSpec<'_> {
1170  #[inline]
1171  fn run_verifier(
1172    v: &mut ::flatbuffers::Verifier, pos: usize
1173  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
1174    v.visit_table(pos)?
1175     .visit_field::<CompressionScheme>("scheme", Self::VT_SCHEME, false)?
1176     .finish();
1177    Ok(())
1178  }
1179}
1180pub struct CompressionSpecArgs {
1181    pub scheme: CompressionScheme,
1182}
1183impl<'a> Default for CompressionSpecArgs {
1184  #[inline]
1185  fn default() -> Self {
1186    CompressionSpecArgs {
1187      scheme: CompressionScheme::None,
1188    }
1189  }
1190}
1191
1192pub struct CompressionSpecBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
1193  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
1194  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
1195}
1196impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> CompressionSpecBuilder<'a, 'b, A> {
1197  #[inline]
1198  pub fn add_scheme(&mut self, scheme: CompressionScheme) {
1199    self.fbb_.push_slot::<CompressionScheme>(CompressionSpec::VT_SCHEME, scheme, CompressionScheme::None);
1200  }
1201  #[inline]
1202  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> CompressionSpecBuilder<'a, 'b, A> {
1203    let start = _fbb.start_table();
1204    CompressionSpecBuilder {
1205      fbb_: _fbb,
1206      start_: start,
1207    }
1208  }
1209  #[inline]
1210  pub fn finish(self) -> ::flatbuffers::WIPOffset<CompressionSpec<'a>> {
1211    let o = self.fbb_.end_table(self.start_);
1212    ::flatbuffers::WIPOffset::new(o.value())
1213  }
1214}
1215
1216impl ::core::fmt::Debug for CompressionSpec<'_> {
1217  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1218    let mut ds = f.debug_struct("CompressionSpec");
1219      ds.field("scheme", &self.scheme());
1220      ds.finish()
1221  }
1222}
1223pub enum EncryptionSpecOffset {}
1224#[derive(Copy, Clone, PartialEq)]
1225
1226pub struct EncryptionSpec<'a> {
1227  pub _tab: ::flatbuffers::Table<'a>,
1228}
1229
1230impl<'a> ::flatbuffers::Follow<'a> for EncryptionSpec<'a> {
1231  type Inner = EncryptionSpec<'a>;
1232  #[inline]
1233  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1234    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
1235  }
1236}
1237
1238impl<'a> EncryptionSpec<'a> {
1239
1240  #[inline]
1241  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
1242    EncryptionSpec { _tab: table }
1243  }
1244  #[allow(unused_mut)]
1245  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
1246    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
1247    _args: &'args EncryptionSpecArgs
1248  ) -> ::flatbuffers::WIPOffset<EncryptionSpec<'bldr>> {
1249    let mut builder = EncryptionSpecBuilder::new(_fbb);
1250    builder.finish()
1251  }
1252
1253}
1254
1255impl ::flatbuffers::Verifiable for EncryptionSpec<'_> {
1256  #[inline]
1257  fn run_verifier(
1258    v: &mut ::flatbuffers::Verifier, pos: usize
1259  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
1260    v.visit_table(pos)?
1261     .finish();
1262    Ok(())
1263  }
1264}
1265pub struct EncryptionSpecArgs {
1266}
1267impl<'a> Default for EncryptionSpecArgs {
1268  #[inline]
1269  fn default() -> Self {
1270    EncryptionSpecArgs {
1271    }
1272  }
1273}
1274
1275pub struct EncryptionSpecBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
1276  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
1277  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
1278}
1279impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EncryptionSpecBuilder<'a, 'b, A> {
1280  #[inline]
1281  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EncryptionSpecBuilder<'a, 'b, A> {
1282    let start = _fbb.start_table();
1283    EncryptionSpecBuilder {
1284      fbb_: _fbb,
1285      start_: start,
1286    }
1287  }
1288  #[inline]
1289  pub fn finish(self) -> ::flatbuffers::WIPOffset<EncryptionSpec<'a>> {
1290    let o = self.fbb_.end_table(self.start_);
1291    ::flatbuffers::WIPOffset::new(o.value())
1292  }
1293}
1294
1295impl ::core::fmt::Debug for EncryptionSpec<'_> {
1296  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1297    let mut ds = f.debug_struct("EncryptionSpec");
1298      ds.finish()
1299  }
1300}
1301#[inline]
1302/// Verifies that a buffer of bytes contains a `Postscript`
1303/// and returns it.
1304/// Note that verification is still experimental and may not
1305/// catch every error, or be maximally performant. For the
1306/// previous, unchecked, behavior use
1307/// `root_as_postscript_unchecked`.
1308pub fn root_as_postscript(buf: &[u8]) -> Result<Postscript<'_>, ::flatbuffers::InvalidFlatbuffer> {
1309  ::flatbuffers::root::<Postscript>(buf)
1310}
1311#[inline]
1312/// Verifies that a buffer of bytes contains a size prefixed
1313/// `Postscript` and returns it.
1314/// Note that verification is still experimental and may not
1315/// catch every error, or be maximally performant. For the
1316/// previous, unchecked, behavior use
1317/// `size_prefixed_root_as_postscript_unchecked`.
1318pub fn size_prefixed_root_as_postscript(buf: &[u8]) -> Result<Postscript<'_>, ::flatbuffers::InvalidFlatbuffer> {
1319  ::flatbuffers::size_prefixed_root::<Postscript>(buf)
1320}
1321#[inline]
1322/// Verifies, with the given options, that a buffer of bytes
1323/// contains a `Postscript` and returns it.
1324/// Note that verification is still experimental and may not
1325/// catch every error, or be maximally performant. For the
1326/// previous, unchecked, behavior use
1327/// `root_as_postscript_unchecked`.
1328pub fn root_as_postscript_with_opts<'b, 'o>(
1329  opts: &'o ::flatbuffers::VerifierOptions,
1330  buf: &'b [u8],
1331) -> Result<Postscript<'b>, ::flatbuffers::InvalidFlatbuffer> {
1332  ::flatbuffers::root_with_opts::<Postscript<'b>>(opts, buf)
1333}
1334#[inline]
1335/// Verifies, with the given verifier options, that a buffer of
1336/// bytes contains a size prefixed `Postscript` and returns
1337/// it. Note that verification is still experimental and may not
1338/// catch every error, or be maximally performant. For the
1339/// previous, unchecked, behavior use
1340/// `root_as_postscript_unchecked`.
1341pub fn size_prefixed_root_as_postscript_with_opts<'b, 'o>(
1342  opts: &'o ::flatbuffers::VerifierOptions,
1343  buf: &'b [u8],
1344) -> Result<Postscript<'b>, ::flatbuffers::InvalidFlatbuffer> {
1345  ::flatbuffers::size_prefixed_root_with_opts::<Postscript<'b>>(opts, buf)
1346}
1347#[inline]
1348/// Assumes, without verification, that a buffer of bytes contains a Postscript and returns it.
1349/// # Safety
1350/// Callers must trust the given bytes do indeed contain a valid `Postscript`.
1351pub unsafe fn root_as_postscript_unchecked(buf: &[u8]) -> Postscript<'_> {
1352  unsafe { ::flatbuffers::root_unchecked::<Postscript>(buf) }
1353}
1354#[inline]
1355/// Assumes, without verification, that a buffer of bytes contains a size prefixed Postscript and returns it.
1356/// # Safety
1357/// Callers must trust the given bytes do indeed contain a valid size prefixed `Postscript`.
1358pub unsafe fn size_prefixed_root_as_postscript_unchecked(buf: &[u8]) -> Postscript<'_> {
1359  unsafe { ::flatbuffers::size_prefixed_root_unchecked::<Postscript>(buf) }
1360}
1361#[inline]
1362pub fn finish_postscript_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>(
1363    fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
1364    root: ::flatbuffers::WIPOffset<Postscript<'a>>) {
1365  fbb.finish(root, None);
1366}
1367
1368#[inline]
1369pub fn finish_size_prefixed_postscript_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>(fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, root: ::flatbuffers::WIPOffset<Postscript<'a>>) {
1370  fbb.finish_size_prefixed(root, None);
1371}