Skip to main content

ssab/converter/
ssqb.rs

1// automatically generated by the FlatBuffers compiler, do not modify
2// @generated
3extern crate alloc;
4
5
6#[allow(unused_imports, dead_code)]
7pub mod ss {
8extern crate alloc;
9
10#[allow(unused_imports, dead_code)]
11pub mod format {
12extern crate alloc;
13
14
15#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
16pub const ENUM_MIN_SEQUENCE_TYPE: u8 = 0;
17#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
18pub const ENUM_MAX_SEQUENCE_TYPE: u8 = 2;
19#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
20#[allow(non_camel_case_types)]
21pub const ENUM_VALUES_SEQUENCE_TYPE: [SequenceType; 3] = [
22  SequenceType::Last,
23  SequenceType::Keep,
24  SequenceType::Top,
25];
26
27#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
28#[repr(transparent)]
29pub struct SequenceType(pub u8);
30#[allow(non_upper_case_globals)]
31impl SequenceType {
32  pub const Last: Self = Self(0);
33  pub const Keep: Self = Self(1);
34  pub const Top: Self = Self(2);
35
36  pub const ENUM_MIN: u8 = 0;
37  pub const ENUM_MAX: u8 = 2;
38  pub const ENUM_VALUES: &'static [Self] = &[
39    Self::Last,
40    Self::Keep,
41    Self::Top,
42  ];
43  /// Returns the variant's name or "" if unknown.
44  pub fn variant_name(self) -> Option<&'static str> {
45    match self {
46      Self::Last => Some("Last"),
47      Self::Keep => Some("Keep"),
48      Self::Top => Some("Top"),
49      _ => None,
50    }
51  }
52}
53impl ::core::fmt::Debug for SequenceType {
54  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
55    if let Some(name) = self.variant_name() {
56      f.write_str(name)
57    } else {
58      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
59    }
60  }
61}
62impl<'a> ::flatbuffers::Follow<'a> for SequenceType {
63  type Inner = Self;
64  #[inline]
65  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
66    let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
67    Self(b)
68  }
69}
70
71impl ::flatbuffers::Push for SequenceType {
72    type Output = SequenceType;
73    #[inline]
74    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
75        unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
76    }
77}
78
79impl ::flatbuffers::EndianScalar for SequenceType {
80  type Scalar = u8;
81  #[inline]
82  fn to_little_endian(self) -> u8 {
83    self.0.to_le()
84  }
85  #[inline]
86  #[allow(clippy::wrong_self_convention)]
87  fn from_little_endian(v: u8) -> Self {
88    let b = u8::from_le(v);
89    Self(b)
90  }
91}
92
93impl<'a> ::flatbuffers::Verifiable for SequenceType {
94  #[inline]
95  fn run_verifier(
96    v: &mut ::flatbuffers::Verifier, pos: usize
97  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
98    u8::run_verifier(v, pos)
99  }
100}
101
102impl ::flatbuffers::SimpleToVerifyInSlice for SequenceType {}
103pub enum SequenceItemOffset {}
104#[derive(Copy, Clone, PartialEq)]
105
106pub struct SequenceItem<'a> {
107  pub _tab: ::flatbuffers::Table<'a>,
108}
109
110impl<'a> ::flatbuffers::Follow<'a> for SequenceItem<'a> {
111  type Inner = SequenceItem<'a>;
112  #[inline]
113  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
114    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
115  }
116}
117
118impl<'a> SequenceItem<'a> {
119  pub const VT_REF_ANIME_PACK: ::flatbuffers::VOffsetT = 4;
120  pub const VT_REF_ANIME_PACK_HASH: ::flatbuffers::VOffsetT = 6;
121  pub const VT_REF_ANIME_NAME: ::flatbuffers::VOffsetT = 8;
122  pub const VT_REF_ANIME_NAME_HASH: ::flatbuffers::VOffsetT = 10;
123  pub const VT_REPEAT_COUNT: ::flatbuffers::VOffsetT = 12;
124
125  #[inline]
126  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
127    SequenceItem { _tab: table }
128  }
129  #[allow(unused_mut)]
130  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
131    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
132    args: &'args SequenceItemArgs<'args>
133  ) -> ::flatbuffers::WIPOffset<SequenceItem<'bldr>> {
134    let mut builder = SequenceItemBuilder::new(_fbb);
135    builder.add_repeat_count(args.repeat_count);
136    builder.add_ref_anime_name_hash(args.ref_anime_name_hash);
137    if let Some(x) = args.ref_anime_name { builder.add_ref_anime_name(x); }
138    builder.add_ref_anime_pack_hash(args.ref_anime_pack_hash);
139    if let Some(x) = args.ref_anime_pack { builder.add_ref_anime_pack(x); }
140    builder.finish()
141  }
142
143  pub fn unpack(&self) -> SequenceItemT {
144    let ref_anime_pack = {
145      let x = self.ref_anime_pack();
146      alloc::string::ToString::to_string(x)
147    };
148    let ref_anime_pack_hash = self.ref_anime_pack_hash();
149    let ref_anime_name = {
150      let x = self.ref_anime_name();
151      alloc::string::ToString::to_string(x)
152    };
153    let ref_anime_name_hash = self.ref_anime_name_hash();
154    let repeat_count = self.repeat_count();
155    SequenceItemT {
156      ref_anime_pack,
157      ref_anime_pack_hash,
158      ref_anime_name,
159      ref_anime_name_hash,
160      repeat_count,
161    }
162  }
163
164  #[inline]
165  pub fn ref_anime_pack(&self) -> &'a str {
166    // Safety:
167    // Created from valid Table for this object
168    // which contains a valid value in this slot
169    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(SequenceItem::VT_REF_ANIME_PACK, None).unwrap()}
170  }
171  #[inline]
172  pub fn ref_anime_pack_hash(&self) -> u32 {
173    // Safety:
174    // Created from valid Table for this object
175    // which contains a valid value in this slot
176    unsafe { self._tab.get::<u32>(SequenceItem::VT_REF_ANIME_PACK_HASH, Some(0)).unwrap()}
177  }
178  #[inline]
179  pub fn ref_anime_name(&self) -> &'a str {
180    // Safety:
181    // Created from valid Table for this object
182    // which contains a valid value in this slot
183    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(SequenceItem::VT_REF_ANIME_NAME, None).unwrap()}
184  }
185  #[inline]
186  pub fn ref_anime_name_hash(&self) -> u32 {
187    // Safety:
188    // Created from valid Table for this object
189    // which contains a valid value in this slot
190    unsafe { self._tab.get::<u32>(SequenceItem::VT_REF_ANIME_NAME_HASH, Some(0)).unwrap()}
191  }
192  #[inline]
193  pub fn repeat_count(&self) -> i32 {
194    // Safety:
195    // Created from valid Table for this object
196    // which contains a valid value in this slot
197    unsafe { self._tab.get::<i32>(SequenceItem::VT_REPEAT_COUNT, Some(0)).unwrap()}
198  }
199}
200
201impl ::flatbuffers::Verifiable for SequenceItem<'_> {
202  #[inline]
203  fn run_verifier(
204    v: &mut ::flatbuffers::Verifier, pos: usize
205  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
206    v.visit_table(pos)?
207     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("ref_anime_pack", Self::VT_REF_ANIME_PACK, true)?
208     .visit_field::<u32>("ref_anime_pack_hash", Self::VT_REF_ANIME_PACK_HASH, false)?
209     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("ref_anime_name", Self::VT_REF_ANIME_NAME, true)?
210     .visit_field::<u32>("ref_anime_name_hash", Self::VT_REF_ANIME_NAME_HASH, false)?
211     .visit_field::<i32>("repeat_count", Self::VT_REPEAT_COUNT, false)?
212     .finish();
213    Ok(())
214  }
215}
216pub struct SequenceItemArgs<'a> {
217    pub ref_anime_pack: Option<::flatbuffers::WIPOffset<&'a str>>,
218    pub ref_anime_pack_hash: u32,
219    pub ref_anime_name: Option<::flatbuffers::WIPOffset<&'a str>>,
220    pub ref_anime_name_hash: u32,
221    pub repeat_count: i32,
222}
223impl<'a> Default for SequenceItemArgs<'a> {
224  #[inline]
225  fn default() -> Self {
226    SequenceItemArgs {
227      ref_anime_pack: None, // required field
228      ref_anime_pack_hash: 0,
229      ref_anime_name: None, // required field
230      ref_anime_name_hash: 0,
231      repeat_count: 0,
232    }
233  }
234}
235
236pub struct SequenceItemBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
237  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
238  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
239}
240impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> SequenceItemBuilder<'a, 'b, A> {
241  #[inline]
242  pub fn add_ref_anime_pack(&mut self, ref_anime_pack: ::flatbuffers::WIPOffset<&'b  str>) {
243    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SequenceItem::VT_REF_ANIME_PACK, ref_anime_pack);
244  }
245  #[inline]
246  pub fn add_ref_anime_pack_hash(&mut self, ref_anime_pack_hash: u32) {
247    self.fbb_.push_slot::<u32>(SequenceItem::VT_REF_ANIME_PACK_HASH, ref_anime_pack_hash, 0);
248  }
249  #[inline]
250  pub fn add_ref_anime_name(&mut self, ref_anime_name: ::flatbuffers::WIPOffset<&'b  str>) {
251    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SequenceItem::VT_REF_ANIME_NAME, ref_anime_name);
252  }
253  #[inline]
254  pub fn add_ref_anime_name_hash(&mut self, ref_anime_name_hash: u32) {
255    self.fbb_.push_slot::<u32>(SequenceItem::VT_REF_ANIME_NAME_HASH, ref_anime_name_hash, 0);
256  }
257  #[inline]
258  pub fn add_repeat_count(&mut self, repeat_count: i32) {
259    self.fbb_.push_slot::<i32>(SequenceItem::VT_REPEAT_COUNT, repeat_count, 0);
260  }
261  #[inline]
262  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> SequenceItemBuilder<'a, 'b, A> {
263    let start = _fbb.start_table();
264    SequenceItemBuilder {
265      fbb_: _fbb,
266      start_: start,
267    }
268  }
269  #[inline]
270  pub fn finish(self) -> ::flatbuffers::WIPOffset<SequenceItem<'a>> {
271    let o = self.fbb_.end_table(self.start_);
272    self.fbb_.required(o, SequenceItem::VT_REF_ANIME_PACK,"ref_anime_pack");
273    self.fbb_.required(o, SequenceItem::VT_REF_ANIME_NAME,"ref_anime_name");
274    ::flatbuffers::WIPOffset::new(o.value())
275  }
276}
277
278impl ::core::fmt::Debug for SequenceItem<'_> {
279  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
280    let mut ds = f.debug_struct("SequenceItem");
281      ds.field("ref_anime_pack", &self.ref_anime_pack());
282      ds.field("ref_anime_pack_hash", &self.ref_anime_pack_hash());
283      ds.field("ref_anime_name", &self.ref_anime_name());
284      ds.field("ref_anime_name_hash", &self.ref_anime_name_hash());
285      ds.field("repeat_count", &self.repeat_count());
286      ds.finish()
287  }
288}
289#[non_exhaustive]
290#[derive(Debug, Clone, PartialEq)]
291pub struct SequenceItemT {
292  pub ref_anime_pack: alloc::string::String,
293  pub ref_anime_pack_hash: u32,
294  pub ref_anime_name: alloc::string::String,
295  pub ref_anime_name_hash: u32,
296  pub repeat_count: i32,
297}
298impl Default for SequenceItemT {
299  fn default() -> Self {
300    Self {
301      ref_anime_pack: alloc::string::ToString::to_string(""),
302      ref_anime_pack_hash: 0,
303      ref_anime_name: alloc::string::ToString::to_string(""),
304      ref_anime_name_hash: 0,
305      repeat_count: 0,
306    }
307  }
308}
309impl SequenceItemT {
310  pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
311    &self,
312    _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
313  ) -> ::flatbuffers::WIPOffset<SequenceItem<'b>> {
314    let ref_anime_pack = Some({
315      let x = &self.ref_anime_pack;
316      _fbb.create_string(x)
317    });
318    let ref_anime_pack_hash = self.ref_anime_pack_hash;
319    let ref_anime_name = Some({
320      let x = &self.ref_anime_name;
321      _fbb.create_string(x)
322    });
323    let ref_anime_name_hash = self.ref_anime_name_hash;
324    let repeat_count = self.repeat_count;
325    SequenceItem::create(_fbb, &SequenceItemArgs{
326      ref_anime_pack,
327      ref_anime_pack_hash,
328      ref_anime_name,
329      ref_anime_name_hash,
330      repeat_count,
331    })
332  }
333}
334pub enum SequenceOffset {}
335#[derive(Copy, Clone, PartialEq)]
336
337pub struct Sequence<'a> {
338  pub _tab: ::flatbuffers::Table<'a>,
339}
340
341impl<'a> ::flatbuffers::Follow<'a> for Sequence<'a> {
342  type Inner = Sequence<'a>;
343  #[inline]
344  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
345    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
346  }
347}
348
349impl<'a> Sequence<'a> {
350  pub const VT_NAME: ::flatbuffers::VOffsetT = 4;
351  pub const VT_NAME_HASH: ::flatbuffers::VOffsetT = 6;
352  pub const VT_INDEX: ::flatbuffers::VOffsetT = 8;
353  pub const VT_TYPE_: ::flatbuffers::VOffsetT = 10;
354  pub const VT_LIST: ::flatbuffers::VOffsetT = 12;
355
356  #[inline]
357  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
358    Sequence { _tab: table }
359  }
360  #[allow(unused_mut)]
361  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
362    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
363    args: &'args SequenceArgs<'args>
364  ) -> ::flatbuffers::WIPOffset<Sequence<'bldr>> {
365    let mut builder = SequenceBuilder::new(_fbb);
366    if let Some(x) = args.list { builder.add_list(x); }
367    builder.add_index(args.index);
368    builder.add_name_hash(args.name_hash);
369    if let Some(x) = args.name { builder.add_name(x); }
370    builder.add_type_(args.type_);
371    builder.finish()
372  }
373
374  pub fn unpack(&self) -> SequenceT {
375    let name = {
376      let x = self.name();
377      alloc::string::ToString::to_string(x)
378    };
379    let name_hash = self.name_hash();
380    let index = self.index();
381    let type_ = self.type_();
382    let list = self.list().map(|x| {
383      x.iter().map(|t| t.unpack()).collect()
384    });
385    SequenceT {
386      name,
387      name_hash,
388      index,
389      type_,
390      list,
391    }
392  }
393
394  #[inline]
395  pub fn name(&self) -> &'a str {
396    // Safety:
397    // Created from valid Table for this object
398    // which contains a valid value in this slot
399    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Sequence::VT_NAME, None).unwrap()}
400  }
401  #[inline]
402  pub fn key_compare_less_than(&self, o: &Sequence) -> bool {
403    self.name() < o.name()
404  }
405
406  #[inline]
407  pub fn key_compare_with_value(&self, val: & str) -> ::core::cmp::Ordering {
408    let key = self.name();
409    key.cmp(val)
410  }
411  #[inline]
412  pub fn name_hash(&self) -> u32 {
413    // Safety:
414    // Created from valid Table for this object
415    // which contains a valid value in this slot
416    unsafe { self._tab.get::<u32>(Sequence::VT_NAME_HASH, Some(0)).unwrap()}
417  }
418  #[inline]
419  pub fn index(&self) -> i32 {
420    // Safety:
421    // Created from valid Table for this object
422    // which contains a valid value in this slot
423    unsafe { self._tab.get::<i32>(Sequence::VT_INDEX, Some(0)).unwrap()}
424  }
425  #[inline]
426  pub fn type_(&self) -> SequenceType {
427    // Safety:
428    // Created from valid Table for this object
429    // which contains a valid value in this slot
430    unsafe { self._tab.get::<SequenceType>(Sequence::VT_TYPE_, Some(SequenceType::Last)).unwrap()}
431  }
432  #[inline]
433  pub fn list(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<SequenceItem<'a>>>> {
434    // Safety:
435    // Created from valid Table for this object
436    // which contains a valid value in this slot
437    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<SequenceItem>>>>(Sequence::VT_LIST, None)}
438  }
439}
440
441impl ::flatbuffers::Verifiable for Sequence<'_> {
442  #[inline]
443  fn run_verifier(
444    v: &mut ::flatbuffers::Verifier, pos: usize
445  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
446    v.visit_table(pos)?
447     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
448     .visit_field::<u32>("name_hash", Self::VT_NAME_HASH, false)?
449     .visit_field::<i32>("index", Self::VT_INDEX, false)?
450     .visit_field::<SequenceType>("type_", Self::VT_TYPE_, false)?
451     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<SequenceItem>>>>("list", Self::VT_LIST, false)?
452     .finish();
453    Ok(())
454  }
455}
456pub struct SequenceArgs<'a> {
457    pub name: Option<::flatbuffers::WIPOffset<&'a str>>,
458    pub name_hash: u32,
459    pub index: i32,
460    pub type_: SequenceType,
461    pub list: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<SequenceItem<'a>>>>>,
462}
463impl<'a> Default for SequenceArgs<'a> {
464  #[inline]
465  fn default() -> Self {
466    SequenceArgs {
467      name: None, // required field
468      name_hash: 0,
469      index: 0,
470      type_: SequenceType::Last,
471      list: None,
472    }
473  }
474}
475
476pub struct SequenceBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
477  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
478  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
479}
480impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> SequenceBuilder<'a, 'b, A> {
481  #[inline]
482  pub fn add_name(&mut self, name: ::flatbuffers::WIPOffset<&'b  str>) {
483    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Sequence::VT_NAME, name);
484  }
485  #[inline]
486  pub fn add_name_hash(&mut self, name_hash: u32) {
487    self.fbb_.push_slot::<u32>(Sequence::VT_NAME_HASH, name_hash, 0);
488  }
489  #[inline]
490  pub fn add_index(&mut self, index: i32) {
491    self.fbb_.push_slot::<i32>(Sequence::VT_INDEX, index, 0);
492  }
493  #[inline]
494  pub fn add_type_(&mut self, type_: SequenceType) {
495    self.fbb_.push_slot::<SequenceType>(Sequence::VT_TYPE_, type_, SequenceType::Last);
496  }
497  #[inline]
498  pub fn add_list(&mut self, list: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<SequenceItem<'b >>>>) {
499    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Sequence::VT_LIST, list);
500  }
501  #[inline]
502  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> SequenceBuilder<'a, 'b, A> {
503    let start = _fbb.start_table();
504    SequenceBuilder {
505      fbb_: _fbb,
506      start_: start,
507    }
508  }
509  #[inline]
510  pub fn finish(self) -> ::flatbuffers::WIPOffset<Sequence<'a>> {
511    let o = self.fbb_.end_table(self.start_);
512    self.fbb_.required(o, Sequence::VT_NAME,"name");
513    ::flatbuffers::WIPOffset::new(o.value())
514  }
515}
516
517impl ::core::fmt::Debug for Sequence<'_> {
518  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
519    let mut ds = f.debug_struct("Sequence");
520      ds.field("name", &self.name());
521      ds.field("name_hash", &self.name_hash());
522      ds.field("index", &self.index());
523      ds.field("type_", &self.type_());
524      ds.field("list", &self.list());
525      ds.finish()
526  }
527}
528#[non_exhaustive]
529#[derive(Debug, Clone, PartialEq)]
530pub struct SequenceT {
531  pub name: alloc::string::String,
532  pub name_hash: u32,
533  pub index: i32,
534  pub type_: SequenceType,
535  pub list: Option<alloc::vec::Vec<SequenceItemT>>,
536}
537impl Default for SequenceT {
538  fn default() -> Self {
539    Self {
540      name: alloc::string::ToString::to_string(""),
541      name_hash: 0,
542      index: 0,
543      type_: SequenceType::Last,
544      list: None,
545    }
546  }
547}
548impl SequenceT {
549  pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
550    &self,
551    _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
552  ) -> ::flatbuffers::WIPOffset<Sequence<'b>> {
553    let name = Some({
554      let x = &self.name;
555      _fbb.create_string(x)
556    });
557    let name_hash = self.name_hash;
558    let index = self.index;
559    let type_ = self.type_;
560    let list = self.list.as_ref().map(|x|{
561      let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
562    });
563    Sequence::create(_fbb, &SequenceArgs{
564      name,
565      name_hash,
566      index,
567      type_,
568      list,
569    })
570  }
571}
572pub enum SsSequenceBinaryOffset {}
573#[derive(Copy, Clone, PartialEq)]
574
575pub struct SsSequenceBinary<'a> {
576  pub _tab: ::flatbuffers::Table<'a>,
577}
578
579impl<'a> ::flatbuffers::Follow<'a> for SsSequenceBinary<'a> {
580  type Inner = SsSequenceBinary<'a>;
581  #[inline]
582  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
583    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
584  }
585}
586
587impl<'a> SsSequenceBinary<'a> {
588  pub const VT_VERSION: ::flatbuffers::VOffsetT = 4;
589  pub const VT_SEQUENCE_LIST: ::flatbuffers::VOffsetT = 6;
590
591  #[inline]
592  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
593    SsSequenceBinary { _tab: table }
594  }
595  #[allow(unused_mut)]
596  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
597    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
598    args: &'args SsSequenceBinaryArgs<'args>
599  ) -> ::flatbuffers::WIPOffset<SsSequenceBinary<'bldr>> {
600    let mut builder = SsSequenceBinaryBuilder::new(_fbb);
601    if let Some(x) = args.sequence_list { builder.add_sequence_list(x); }
602    builder.add_version(args.version);
603    builder.finish()
604  }
605
606  pub fn unpack(&self) -> SsSequenceBinaryT {
607    let version = self.version();
608    let sequence_list = {
609      let x = self.sequence_list();
610      x.iter().map(|t| t.unpack()).collect()
611    };
612    SsSequenceBinaryT {
613      version,
614      sequence_list,
615    }
616  }
617
618  #[inline]
619  pub fn version(&self) -> u32 {
620    // Safety:
621    // Created from valid Table for this object
622    // which contains a valid value in this slot
623    unsafe { self._tab.get::<u32>(SsSequenceBinary::VT_VERSION, Some(0)).unwrap()}
624  }
625  #[inline]
626  pub fn sequence_list(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Sequence<'a>>> {
627    // Safety:
628    // Created from valid Table for this object
629    // which contains a valid value in this slot
630    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Sequence>>>>(SsSequenceBinary::VT_SEQUENCE_LIST, None).unwrap()}
631  }
632}
633
634impl ::flatbuffers::Verifiable for SsSequenceBinary<'_> {
635  #[inline]
636  fn run_verifier(
637    v: &mut ::flatbuffers::Verifier, pos: usize
638  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
639    v.visit_table(pos)?
640     .visit_field::<u32>("version", Self::VT_VERSION, false)?
641     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Sequence>>>>("sequence_list", Self::VT_SEQUENCE_LIST, true)?
642     .finish();
643    Ok(())
644  }
645}
646pub struct SsSequenceBinaryArgs<'a> {
647    pub version: u32,
648    pub sequence_list: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Sequence<'a>>>>>,
649}
650impl<'a> Default for SsSequenceBinaryArgs<'a> {
651  #[inline]
652  fn default() -> Self {
653    SsSequenceBinaryArgs {
654      version: 0,
655      sequence_list: None, // required field
656    }
657  }
658}
659
660pub struct SsSequenceBinaryBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
661  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
662  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
663}
664impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> SsSequenceBinaryBuilder<'a, 'b, A> {
665  #[inline]
666  pub fn add_version(&mut self, version: u32) {
667    self.fbb_.push_slot::<u32>(SsSequenceBinary::VT_VERSION, version, 0);
668  }
669  #[inline]
670  pub fn add_sequence_list(&mut self, sequence_list: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Sequence<'b >>>>) {
671    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SsSequenceBinary::VT_SEQUENCE_LIST, sequence_list);
672  }
673  #[inline]
674  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> SsSequenceBinaryBuilder<'a, 'b, A> {
675    let start = _fbb.start_table();
676    SsSequenceBinaryBuilder {
677      fbb_: _fbb,
678      start_: start,
679    }
680  }
681  #[inline]
682  pub fn finish(self) -> ::flatbuffers::WIPOffset<SsSequenceBinary<'a>> {
683    let o = self.fbb_.end_table(self.start_);
684    self.fbb_.required(o, SsSequenceBinary::VT_SEQUENCE_LIST,"sequence_list");
685    ::flatbuffers::WIPOffset::new(o.value())
686  }
687}
688
689impl ::core::fmt::Debug for SsSequenceBinary<'_> {
690  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
691    let mut ds = f.debug_struct("SsSequenceBinary");
692      ds.field("version", &self.version());
693      ds.field("sequence_list", &self.sequence_list());
694      ds.finish()
695  }
696}
697#[non_exhaustive]
698#[derive(Debug, Clone, PartialEq)]
699pub struct SsSequenceBinaryT {
700  pub version: u32,
701  pub sequence_list: alloc::vec::Vec<SequenceT>,
702}
703impl Default for SsSequenceBinaryT {
704  fn default() -> Self {
705    Self {
706      version: 0,
707      sequence_list: Default::default(),
708    }
709  }
710}
711impl SsSequenceBinaryT {
712  pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
713    &self,
714    _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
715  ) -> ::flatbuffers::WIPOffset<SsSequenceBinary<'b>> {
716    let version = self.version;
717    let sequence_list = Some({
718      let x = &self.sequence_list;
719      let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
720    });
721    SsSequenceBinary::create(_fbb, &SsSequenceBinaryArgs{
722      version,
723      sequence_list,
724    })
725  }
726}
727#[inline]
728/// Verifies that a buffer of bytes contains a `SsSequenceBinary`
729/// and returns it.
730/// Note that verification is still experimental and may not
731/// catch every error, or be maximally performant. For the
732/// previous, unchecked, behavior use
733/// `root_as_ss_sequence_binary_unchecked`.
734pub fn root_as_ss_sequence_binary(buf: &[u8]) -> Result<SsSequenceBinary<'_>, ::flatbuffers::InvalidFlatbuffer> {
735  ::flatbuffers::root::<SsSequenceBinary>(buf)
736}
737#[inline]
738/// Verifies that a buffer of bytes contains a size prefixed
739/// `SsSequenceBinary` and returns it.
740/// Note that verification is still experimental and may not
741/// catch every error, or be maximally performant. For the
742/// previous, unchecked, behavior use
743/// `size_prefixed_root_as_ss_sequence_binary_unchecked`.
744pub fn size_prefixed_root_as_ss_sequence_binary(buf: &[u8]) -> Result<SsSequenceBinary<'_>, ::flatbuffers::InvalidFlatbuffer> {
745  ::flatbuffers::size_prefixed_root::<SsSequenceBinary>(buf)
746}
747#[inline]
748/// Verifies, with the given options, that a buffer of bytes
749/// contains a `SsSequenceBinary` and returns it.
750/// Note that verification is still experimental and may not
751/// catch every error, or be maximally performant. For the
752/// previous, unchecked, behavior use
753/// `root_as_ss_sequence_binary_unchecked`.
754pub fn root_as_ss_sequence_binary_with_opts<'b, 'o>(
755  opts: &'o ::flatbuffers::VerifierOptions,
756  buf: &'b [u8],
757) -> Result<SsSequenceBinary<'b>, ::flatbuffers::InvalidFlatbuffer> {
758  ::flatbuffers::root_with_opts::<SsSequenceBinary<'b>>(opts, buf)
759}
760#[inline]
761/// Verifies, with the given verifier options, that a buffer of
762/// bytes contains a size prefixed `SsSequenceBinary` and returns
763/// it. Note that verification is still experimental and may not
764/// catch every error, or be maximally performant. For the
765/// previous, unchecked, behavior use
766/// `root_as_ss_sequence_binary_unchecked`.
767pub fn size_prefixed_root_as_ss_sequence_binary_with_opts<'b, 'o>(
768  opts: &'o ::flatbuffers::VerifierOptions,
769  buf: &'b [u8],
770) -> Result<SsSequenceBinary<'b>, ::flatbuffers::InvalidFlatbuffer> {
771  ::flatbuffers::size_prefixed_root_with_opts::<SsSequenceBinary<'b>>(opts, buf)
772}
773#[inline]
774/// Assumes, without verification, that a buffer of bytes contains a SsSequenceBinary and returns it.
775/// # Safety
776/// Callers must trust the given bytes do indeed contain a valid `SsSequenceBinary`.
777pub unsafe fn root_as_ss_sequence_binary_unchecked(buf: &[u8]) -> SsSequenceBinary<'_> {
778  unsafe { ::flatbuffers::root_unchecked::<SsSequenceBinary>(buf) }
779}
780#[inline]
781/// Assumes, without verification, that a buffer of bytes contains a size prefixed SsSequenceBinary and returns it.
782/// # Safety
783/// Callers must trust the given bytes do indeed contain a valid size prefixed `SsSequenceBinary`.
784pub unsafe fn size_prefixed_root_as_ss_sequence_binary_unchecked(buf: &[u8]) -> SsSequenceBinary<'_> {
785  unsafe { ::flatbuffers::size_prefixed_root_unchecked::<SsSequenceBinary>(buf) }
786}
787pub const SS_SEQUENCE_BINARY_IDENTIFIER: &str = "SSQB";
788
789#[inline]
790pub fn ss_sequence_binary_buffer_has_identifier(buf: &[u8]) -> bool {
791  ::flatbuffers::buffer_has_identifier(buf, SS_SEQUENCE_BINARY_IDENTIFIER, false)
792}
793
794#[inline]
795pub fn ss_sequence_binary_size_prefixed_buffer_has_identifier(buf: &[u8]) -> bool {
796  ::flatbuffers::buffer_has_identifier(buf, SS_SEQUENCE_BINARY_IDENTIFIER, true)
797}
798
799pub const SS_SEQUENCE_BINARY_EXTENSION: &str = "ssqb";
800
801#[inline]
802pub fn finish_ss_sequence_binary_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>(
803    fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
804    root: ::flatbuffers::WIPOffset<SsSequenceBinary<'a>>) {
805  fbb.finish(root, Some(SS_SEQUENCE_BINARY_IDENTIFIER));
806}
807
808#[inline]
809pub fn finish_size_prefixed_ss_sequence_binary_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>(fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, root: ::flatbuffers::WIPOffset<SsSequenceBinary<'a>>) {
810  fbb.finish_size_prefixed(root, Some(SS_SEQUENCE_BINARY_IDENTIFIER));
811}
812}  // pub mod format
813}  // pub mod ss
814