• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 
4 #![allow(dead_code)]
5 #![allow(unused_imports)]
6 
7 use std::mem;
8 use std::cmp::Ordering;
9 
10 extern crate flatbuffers;
11 use self::flatbuffers::EndianScalar;
12 
13 pub mod my_game {
14   #![allow(dead_code)]
15   #![allow(unused_imports)]
16 
17   use std::mem;
18   use std::cmp::Ordering;
19 
20   extern crate flatbuffers;
21   use self::flatbuffers::EndianScalar;
22 
23 pub enum InParentNamespaceOffset {}
24 #[derive(Copy, Clone, Debug, PartialEq)]
25 
26 pub struct InParentNamespace<'a> {
27   pub _tab: flatbuffers::Table<'a>,
28 }
29 
30 impl<'a> flatbuffers::Follow<'a> for InParentNamespace<'a> {
31     type Inner = InParentNamespace<'a>;
32     #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner33     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
34         Self {
35             _tab: flatbuffers::Table { buf: buf, loc: loc },
36         }
37     }
38 }
39 
40 impl<'a> InParentNamespace<'a> {
41     #[inline]
init_from_table(table: flatbuffers::Table<'a>) -> Self42     pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
43         InParentNamespace {
44             _tab: table,
45         }
46     }
47     #[allow(unused_mut)]
create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, _args: &'args InParentNamespaceArgs) -> flatbuffers::WIPOffset<InParentNamespace<'bldr>>48     pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
49         _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
50         _args: &'args InParentNamespaceArgs) -> flatbuffers::WIPOffset<InParentNamespace<'bldr>> {
51       let mut builder = InParentNamespaceBuilder::new(_fbb);
52       builder.finish()
53     }
54 
55 }
56 
57 pub struct InParentNamespaceArgs {
58 }
59 impl<'a> Default for InParentNamespaceArgs {
60     #[inline]
default() -> Self61     fn default() -> Self {
62         InParentNamespaceArgs {
63         }
64     }
65 }
66 pub struct InParentNamespaceBuilder<'a: 'b, 'b> {
67   fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
68   start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
69 }
70 impl<'a: 'b, 'b> InParentNamespaceBuilder<'a, 'b> {
71   #[inline]
new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> InParentNamespaceBuilder<'a, 'b>72   pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> InParentNamespaceBuilder<'a, 'b> {
73     let start = _fbb.start_table();
74     InParentNamespaceBuilder {
75       fbb_: _fbb,
76       start_: start,
77     }
78   }
79   #[inline]
finish(self) -> flatbuffers::WIPOffset<InParentNamespace<'a>>80   pub fn finish(self) -> flatbuffers::WIPOffset<InParentNamespace<'a>> {
81     let o = self.fbb_.end_table(self.start_);
82     flatbuffers::WIPOffset::new(o.value())
83   }
84 }
85 
86 pub mod example_2 {
87   #![allow(dead_code)]
88   #![allow(unused_imports)]
89 
90   use std::mem;
91   use std::cmp::Ordering;
92 
93   extern crate flatbuffers;
94   use self::flatbuffers::EndianScalar;
95 
96 pub enum MonsterOffset {}
97 #[derive(Copy, Clone, Debug, PartialEq)]
98 
99 pub struct Monster<'a> {
100   pub _tab: flatbuffers::Table<'a>,
101 }
102 
103 impl<'a> flatbuffers::Follow<'a> for Monster<'a> {
104     type Inner = Monster<'a>;
105     #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner106     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
107         Self {
108             _tab: flatbuffers::Table { buf: buf, loc: loc },
109         }
110     }
111 }
112 
113 impl<'a> Monster<'a> {
114     #[inline]
init_from_table(table: flatbuffers::Table<'a>) -> Self115     pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
116         Monster {
117             _tab: table,
118         }
119     }
120     #[allow(unused_mut)]
create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, _args: &'args MonsterArgs) -> flatbuffers::WIPOffset<Monster<'bldr>>121     pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
122         _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
123         _args: &'args MonsterArgs) -> flatbuffers::WIPOffset<Monster<'bldr>> {
124       let mut builder = MonsterBuilder::new(_fbb);
125       builder.finish()
126     }
127 
128 }
129 
130 pub struct MonsterArgs {
131 }
132 impl<'a> Default for MonsterArgs {
133     #[inline]
default() -> Self134     fn default() -> Self {
135         MonsterArgs {
136         }
137     }
138 }
139 pub struct MonsterBuilder<'a: 'b, 'b> {
140   fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
141   start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
142 }
143 impl<'a: 'b, 'b> MonsterBuilder<'a, 'b> {
144   #[inline]
new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> MonsterBuilder<'a, 'b>145   pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> MonsterBuilder<'a, 'b> {
146     let start = _fbb.start_table();
147     MonsterBuilder {
148       fbb_: _fbb,
149       start_: start,
150     }
151   }
152   #[inline]
finish(self) -> flatbuffers::WIPOffset<Monster<'a>>153   pub fn finish(self) -> flatbuffers::WIPOffset<Monster<'a>> {
154     let o = self.fbb_.end_table(self.start_);
155     flatbuffers::WIPOffset::new(o.value())
156   }
157 }
158 
159 }  // pub mod Example2
160 
161 pub mod example {
162   #![allow(dead_code)]
163   #![allow(unused_imports)]
164 
165   use std::mem;
166   use std::cmp::Ordering;
167 
168   extern crate flatbuffers;
169   use self::flatbuffers::EndianScalar;
170 
171 #[allow(non_camel_case_types)]
172 #[repr(i8)]
173 #[derive(Clone, Copy, PartialEq, Debug)]
174 pub enum Color {
175   Red = 1,
176   Green = 2,
177   Blue = 8,
178 
179 }
180 
181 const ENUM_MIN_COLOR: i8 = 1;
182 const ENUM_MAX_COLOR: i8 = 8;
183 
184 impl<'a> flatbuffers::Follow<'a> for Color {
185   type Inner = Self;
186   #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner187   fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
188     flatbuffers::read_scalar_at::<Self>(buf, loc)
189   }
190 }
191 
192 impl flatbuffers::EndianScalar for Color {
193   #[inline]
to_little_endian(self) -> Self194   fn to_little_endian(self) -> Self {
195     let n = i8::to_le(self as i8);
196     let p = &n as *const i8 as *const Color;
197     unsafe { *p }
198   }
199   #[inline]
from_little_endian(self) -> Self200   fn from_little_endian(self) -> Self {
201     let n = i8::from_le(self as i8);
202     let p = &n as *const i8 as *const Color;
203     unsafe { *p }
204   }
205 }
206 
207 impl flatbuffers::Push for Color {
208     type Output = Color;
209     #[inline]
push(&self, dst: &mut [u8], _rest: &[u8])210     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
211         flatbuffers::emplace_scalar::<Color>(dst, *self);
212     }
213 }
214 
215 #[allow(non_camel_case_types)]
216 const ENUM_VALUES_COLOR:[Color; 3] = [
217   Color::Red,
218   Color::Green,
219   Color::Blue
220 ];
221 
222 #[allow(non_camel_case_types)]
223 const ENUM_NAMES_COLOR:[&'static str; 8] = [
224     "Red",
225     "Green",
226     "",
227     "",
228     "",
229     "",
230     "",
231     "Blue"
232 ];
233 
enum_name_color(e: Color) -> &'static str234 pub fn enum_name_color(e: Color) -> &'static str {
235   let index: usize = e as usize - Color::Red as usize;
236   ENUM_NAMES_COLOR[index]
237 }
238 
239 #[allow(non_camel_case_types)]
240 #[repr(u8)]
241 #[derive(Clone, Copy, PartialEq, Debug)]
242 pub enum Any {
243   NONE = 0,
244   Monster = 1,
245   TestSimpleTableWithEnum = 2,
246   MyGame_Example2_Monster = 3,
247 
248 }
249 
250 const ENUM_MIN_ANY: u8 = 0;
251 const ENUM_MAX_ANY: u8 = 3;
252 
253 impl<'a> flatbuffers::Follow<'a> for Any {
254   type Inner = Self;
255   #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner256   fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
257     flatbuffers::read_scalar_at::<Self>(buf, loc)
258   }
259 }
260 
261 impl flatbuffers::EndianScalar for Any {
262   #[inline]
to_little_endian(self) -> Self263   fn to_little_endian(self) -> Self {
264     let n = u8::to_le(self as u8);
265     let p = &n as *const u8 as *const Any;
266     unsafe { *p }
267   }
268   #[inline]
from_little_endian(self) -> Self269   fn from_little_endian(self) -> Self {
270     let n = u8::from_le(self as u8);
271     let p = &n as *const u8 as *const Any;
272     unsafe { *p }
273   }
274 }
275 
276 impl flatbuffers::Push for Any {
277     type Output = Any;
278     #[inline]
push(&self, dst: &mut [u8], _rest: &[u8])279     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
280         flatbuffers::emplace_scalar::<Any>(dst, *self);
281     }
282 }
283 
284 #[allow(non_camel_case_types)]
285 const ENUM_VALUES_ANY:[Any; 4] = [
286   Any::NONE,
287   Any::Monster,
288   Any::TestSimpleTableWithEnum,
289   Any::MyGame_Example2_Monster
290 ];
291 
292 #[allow(non_camel_case_types)]
293 const ENUM_NAMES_ANY:[&'static str; 4] = [
294     "NONE",
295     "Monster",
296     "TestSimpleTableWithEnum",
297     "MyGame_Example2_Monster"
298 ];
299 
enum_name_any(e: Any) -> &'static str300 pub fn enum_name_any(e: Any) -> &'static str {
301   let index: usize = e as usize;
302   ENUM_NAMES_ANY[index]
303 }
304 
305 pub struct AnyUnionTableOffset {}
306 #[allow(non_camel_case_types)]
307 #[repr(u8)]
308 #[derive(Clone, Copy, PartialEq, Debug)]
309 pub enum AnyUniqueAliases {
310   NONE = 0,
311   M = 1,
312   T = 2,
313   M2 = 3,
314 
315 }
316 
317 const ENUM_MIN_ANY_UNIQUE_ALIASES: u8 = 0;
318 const ENUM_MAX_ANY_UNIQUE_ALIASES: u8 = 3;
319 
320 impl<'a> flatbuffers::Follow<'a> for AnyUniqueAliases {
321   type Inner = Self;
322   #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner323   fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
324     flatbuffers::read_scalar_at::<Self>(buf, loc)
325   }
326 }
327 
328 impl flatbuffers::EndianScalar for AnyUniqueAliases {
329   #[inline]
to_little_endian(self) -> Self330   fn to_little_endian(self) -> Self {
331     let n = u8::to_le(self as u8);
332     let p = &n as *const u8 as *const AnyUniqueAliases;
333     unsafe { *p }
334   }
335   #[inline]
from_little_endian(self) -> Self336   fn from_little_endian(self) -> Self {
337     let n = u8::from_le(self as u8);
338     let p = &n as *const u8 as *const AnyUniqueAliases;
339     unsafe { *p }
340   }
341 }
342 
343 impl flatbuffers::Push for AnyUniqueAliases {
344     type Output = AnyUniqueAliases;
345     #[inline]
push(&self, dst: &mut [u8], _rest: &[u8])346     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
347         flatbuffers::emplace_scalar::<AnyUniqueAliases>(dst, *self);
348     }
349 }
350 
351 #[allow(non_camel_case_types)]
352 const ENUM_VALUES_ANY_UNIQUE_ALIASES:[AnyUniqueAliases; 4] = [
353   AnyUniqueAliases::NONE,
354   AnyUniqueAliases::M,
355   AnyUniqueAliases::T,
356   AnyUniqueAliases::M2
357 ];
358 
359 #[allow(non_camel_case_types)]
360 const ENUM_NAMES_ANY_UNIQUE_ALIASES:[&'static str; 4] = [
361     "NONE",
362     "M",
363     "T",
364     "M2"
365 ];
366 
enum_name_any_unique_aliases(e: AnyUniqueAliases) -> &'static str367 pub fn enum_name_any_unique_aliases(e: AnyUniqueAliases) -> &'static str {
368   let index: usize = e as usize;
369   ENUM_NAMES_ANY_UNIQUE_ALIASES[index]
370 }
371 
372 pub struct AnyUniqueAliasesUnionTableOffset {}
373 #[allow(non_camel_case_types)]
374 #[repr(u8)]
375 #[derive(Clone, Copy, PartialEq, Debug)]
376 pub enum AnyAmbiguousAliases {
377   NONE = 0,
378   M1 = 1,
379   M2 = 2,
380   M3 = 3,
381 
382 }
383 
384 const ENUM_MIN_ANY_AMBIGUOUS_ALIASES: u8 = 0;
385 const ENUM_MAX_ANY_AMBIGUOUS_ALIASES: u8 = 3;
386 
387 impl<'a> flatbuffers::Follow<'a> for AnyAmbiguousAliases {
388   type Inner = Self;
389   #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner390   fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
391     flatbuffers::read_scalar_at::<Self>(buf, loc)
392   }
393 }
394 
395 impl flatbuffers::EndianScalar for AnyAmbiguousAliases {
396   #[inline]
to_little_endian(self) -> Self397   fn to_little_endian(self) -> Self {
398     let n = u8::to_le(self as u8);
399     let p = &n as *const u8 as *const AnyAmbiguousAliases;
400     unsafe { *p }
401   }
402   #[inline]
from_little_endian(self) -> Self403   fn from_little_endian(self) -> Self {
404     let n = u8::from_le(self as u8);
405     let p = &n as *const u8 as *const AnyAmbiguousAliases;
406     unsafe { *p }
407   }
408 }
409 
410 impl flatbuffers::Push for AnyAmbiguousAliases {
411     type Output = AnyAmbiguousAliases;
412     #[inline]
push(&self, dst: &mut [u8], _rest: &[u8])413     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
414         flatbuffers::emplace_scalar::<AnyAmbiguousAliases>(dst, *self);
415     }
416 }
417 
418 #[allow(non_camel_case_types)]
419 const ENUM_VALUES_ANY_AMBIGUOUS_ALIASES:[AnyAmbiguousAliases; 4] = [
420   AnyAmbiguousAliases::NONE,
421   AnyAmbiguousAliases::M1,
422   AnyAmbiguousAliases::M2,
423   AnyAmbiguousAliases::M3
424 ];
425 
426 #[allow(non_camel_case_types)]
427 const ENUM_NAMES_ANY_AMBIGUOUS_ALIASES:[&'static str; 4] = [
428     "NONE",
429     "M1",
430     "M2",
431     "M3"
432 ];
433 
enum_name_any_ambiguous_aliases(e: AnyAmbiguousAliases) -> &'static str434 pub fn enum_name_any_ambiguous_aliases(e: AnyAmbiguousAliases) -> &'static str {
435   let index: usize = e as usize;
436   ENUM_NAMES_ANY_AMBIGUOUS_ALIASES[index]
437 }
438 
439 pub struct AnyAmbiguousAliasesUnionTableOffset {}
440 // struct Test, aligned to 2
441 #[repr(C, align(2))]
442 #[derive(Clone, Copy, Debug, PartialEq)]
443 pub struct Test {
444   a_: i16,
445   b_: i8,
446   padding0__: u8,
447 } // pub struct Test
448 impl flatbuffers::SafeSliceAccess for Test {}
449 impl<'a> flatbuffers::Follow<'a> for Test {
450   type Inner = &'a Test;
451   #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner452   fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
453     <&'a Test>::follow(buf, loc)
454   }
455 }
456 impl<'a> flatbuffers::Follow<'a> for &'a Test {
457   type Inner = &'a Test;
458   #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner459   fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
460     flatbuffers::follow_cast_ref::<Test>(buf, loc)
461   }
462 }
463 impl<'b> flatbuffers::Push for Test {
464     type Output = Test;
465     #[inline]
push(&self, dst: &mut [u8], _rest: &[u8])466     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
467         let src = unsafe {
468             ::std::slice::from_raw_parts(self as *const Test as *const u8, Self::size())
469         };
470         dst.copy_from_slice(src);
471     }
472 }
473 impl<'b> flatbuffers::Push for &'b Test {
474     type Output = Test;
475 
476     #[inline]
push(&self, dst: &mut [u8], _rest: &[u8])477     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
478         let src = unsafe {
479             ::std::slice::from_raw_parts(*self as *const Test as *const u8, Self::size())
480         };
481         dst.copy_from_slice(src);
482     }
483 }
484 
485 
486 impl Test {
new<'a>(_a: i16, _b: i8) -> Self487   pub fn new<'a>(_a: i16, _b: i8) -> Self {
488     Test {
489       a_: _a.to_little_endian(),
490       b_: _b.to_little_endian(),
491 
492       padding0__: 0,
493     }
494   }
a<'a>(&'a self) -> i16495   pub fn a<'a>(&'a self) -> i16 {
496     self.a_.from_little_endian()
497   }
b<'a>(&'a self) -> i8498   pub fn b<'a>(&'a self) -> i8 {
499     self.b_.from_little_endian()
500   }
501 }
502 
503 // struct Vec3, aligned to 8
504 #[repr(C, align(8))]
505 #[derive(Clone, Copy, Debug, PartialEq)]
506 pub struct Vec3 {
507   x_: f32,
508   y_: f32,
509   z_: f32,
510   padding0__: u32,
511   test1_: f64,
512   test2_: Color,
513   padding1__: u8,
514   test3_: Test,
515   padding2__: u16,
516 } // pub struct Vec3
517 impl flatbuffers::SafeSliceAccess for Vec3 {}
518 impl<'a> flatbuffers::Follow<'a> for Vec3 {
519   type Inner = &'a Vec3;
520   #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner521   fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
522     <&'a Vec3>::follow(buf, loc)
523   }
524 }
525 impl<'a> flatbuffers::Follow<'a> for &'a Vec3 {
526   type Inner = &'a Vec3;
527   #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner528   fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
529     flatbuffers::follow_cast_ref::<Vec3>(buf, loc)
530   }
531 }
532 impl<'b> flatbuffers::Push for Vec3 {
533     type Output = Vec3;
534     #[inline]
push(&self, dst: &mut [u8], _rest: &[u8])535     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
536         let src = unsafe {
537             ::std::slice::from_raw_parts(self as *const Vec3 as *const u8, Self::size())
538         };
539         dst.copy_from_slice(src);
540     }
541 }
542 impl<'b> flatbuffers::Push for &'b Vec3 {
543     type Output = Vec3;
544 
545     #[inline]
push(&self, dst: &mut [u8], _rest: &[u8])546     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
547         let src = unsafe {
548             ::std::slice::from_raw_parts(*self as *const Vec3 as *const u8, Self::size())
549         };
550         dst.copy_from_slice(src);
551     }
552 }
553 
554 
555 impl Vec3 {
new<'a>(_x: f32, _y: f32, _z: f32, _test1: f64, _test2: Color, _test3: &'a Test) -> Self556   pub fn new<'a>(_x: f32, _y: f32, _z: f32, _test1: f64, _test2: Color, _test3: &'a Test) -> Self {
557     Vec3 {
558       x_: _x.to_little_endian(),
559       y_: _y.to_little_endian(),
560       z_: _z.to_little_endian(),
561       test1_: _test1.to_little_endian(),
562       test2_: _test2.to_little_endian(),
563       test3_: *_test3,
564 
565       padding0__: 0,
566       padding1__: 0,
567       padding2__: 0,
568     }
569   }
x<'a>(&'a self) -> f32570   pub fn x<'a>(&'a self) -> f32 {
571     self.x_.from_little_endian()
572   }
y<'a>(&'a self) -> f32573   pub fn y<'a>(&'a self) -> f32 {
574     self.y_.from_little_endian()
575   }
z<'a>(&'a self) -> f32576   pub fn z<'a>(&'a self) -> f32 {
577     self.z_.from_little_endian()
578   }
test1<'a>(&'a self) -> f64579   pub fn test1<'a>(&'a self) -> f64 {
580     self.test1_.from_little_endian()
581   }
test2<'a>(&'a self) -> Color582   pub fn test2<'a>(&'a self) -> Color {
583     self.test2_.from_little_endian()
584   }
test3<'a>(&'a self) -> &'a Test585   pub fn test3<'a>(&'a self) -> &'a Test {
586     &self.test3_
587   }
588 }
589 
590 // struct Ability, aligned to 4
591 #[repr(C, align(4))]
592 #[derive(Clone, Copy, Debug, PartialEq)]
593 pub struct Ability {
594   id_: u32,
595   distance_: u32,
596 } // pub struct Ability
597 impl flatbuffers::SafeSliceAccess for Ability {}
598 impl<'a> flatbuffers::Follow<'a> for Ability {
599   type Inner = &'a Ability;
600   #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner601   fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
602     <&'a Ability>::follow(buf, loc)
603   }
604 }
605 impl<'a> flatbuffers::Follow<'a> for &'a Ability {
606   type Inner = &'a Ability;
607   #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner608   fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
609     flatbuffers::follow_cast_ref::<Ability>(buf, loc)
610   }
611 }
612 impl<'b> flatbuffers::Push for Ability {
613     type Output = Ability;
614     #[inline]
push(&self, dst: &mut [u8], _rest: &[u8])615     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
616         let src = unsafe {
617             ::std::slice::from_raw_parts(self as *const Ability as *const u8, Self::size())
618         };
619         dst.copy_from_slice(src);
620     }
621 }
622 impl<'b> flatbuffers::Push for &'b Ability {
623     type Output = Ability;
624 
625     #[inline]
push(&self, dst: &mut [u8], _rest: &[u8])626     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
627         let src = unsafe {
628             ::std::slice::from_raw_parts(*self as *const Ability as *const u8, Self::size())
629         };
630         dst.copy_from_slice(src);
631     }
632 }
633 
634 
635 impl Ability {
new<'a>(_id: u32, _distance: u32) -> Self636   pub fn new<'a>(_id: u32, _distance: u32) -> Self {
637     Ability {
638       id_: _id.to_little_endian(),
639       distance_: _distance.to_little_endian(),
640 
641     }
642   }
id<'a>(&'a self) -> u32643   pub fn id<'a>(&'a self) -> u32 {
644     self.id_.from_little_endian()
645   }
646   #[inline]
key_compare_less_than(&self, o: &Ability) -> bool647   pub fn key_compare_less_than(&self, o: &Ability) ->  bool {
648     self.id() < o.id()
649   }
650 
651   #[inline]
key_compare_with_value(&self, val: u32) -> ::std::cmp::Ordering652   pub fn key_compare_with_value(&self, val: u32) ->  ::std::cmp::Ordering {
653     let key = self.id();
654     key.cmp(&val)
655   }
distance<'a>(&'a self) -> u32656   pub fn distance<'a>(&'a self) -> u32 {
657     self.distance_.from_little_endian()
658   }
659 }
660 
661 pub enum TestSimpleTableWithEnumOffset {}
662 #[derive(Copy, Clone, Debug, PartialEq)]
663 
664 pub struct TestSimpleTableWithEnum<'a> {
665   pub _tab: flatbuffers::Table<'a>,
666 }
667 
668 impl<'a> flatbuffers::Follow<'a> for TestSimpleTableWithEnum<'a> {
669     type Inner = TestSimpleTableWithEnum<'a>;
670     #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner671     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
672         Self {
673             _tab: flatbuffers::Table { buf: buf, loc: loc },
674         }
675     }
676 }
677 
678 impl<'a> TestSimpleTableWithEnum<'a> {
679     #[inline]
init_from_table(table: flatbuffers::Table<'a>) -> Self680     pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
681         TestSimpleTableWithEnum {
682             _tab: table,
683         }
684     }
685     #[allow(unused_mut)]
create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, args: &'args TestSimpleTableWithEnumArgs) -> flatbuffers::WIPOffset<TestSimpleTableWithEnum<'bldr>>686     pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
687         _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
688         args: &'args TestSimpleTableWithEnumArgs) -> flatbuffers::WIPOffset<TestSimpleTableWithEnum<'bldr>> {
689       let mut builder = TestSimpleTableWithEnumBuilder::new(_fbb);
690       builder.add_color(args.color);
691       builder.finish()
692     }
693 
694     pub const VT_COLOR: flatbuffers::VOffsetT = 4;
695 
696   #[inline]
color(&self) -> Color697   pub fn color(&self) -> Color {
698     self._tab.get::<Color>(TestSimpleTableWithEnum::VT_COLOR, Some(Color::Green)).unwrap()
699   }
700 }
701 
702 pub struct TestSimpleTableWithEnumArgs {
703     pub color: Color,
704 }
705 impl<'a> Default for TestSimpleTableWithEnumArgs {
706     #[inline]
default() -> Self707     fn default() -> Self {
708         TestSimpleTableWithEnumArgs {
709             color: Color::Green,
710         }
711     }
712 }
713 pub struct TestSimpleTableWithEnumBuilder<'a: 'b, 'b> {
714   fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
715   start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
716 }
717 impl<'a: 'b, 'b> TestSimpleTableWithEnumBuilder<'a, 'b> {
718   #[inline]
add_color(&mut self, color: Color)719   pub fn add_color(&mut self, color: Color) {
720     self.fbb_.push_slot::<Color>(TestSimpleTableWithEnum::VT_COLOR, color, Color::Green);
721   }
722   #[inline]
new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TestSimpleTableWithEnumBuilder<'a, 'b>723   pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TestSimpleTableWithEnumBuilder<'a, 'b> {
724     let start = _fbb.start_table();
725     TestSimpleTableWithEnumBuilder {
726       fbb_: _fbb,
727       start_: start,
728     }
729   }
730   #[inline]
finish(self) -> flatbuffers::WIPOffset<TestSimpleTableWithEnum<'a>>731   pub fn finish(self) -> flatbuffers::WIPOffset<TestSimpleTableWithEnum<'a>> {
732     let o = self.fbb_.end_table(self.start_);
733     flatbuffers::WIPOffset::new(o.value())
734   }
735 }
736 
737 pub enum StatOffset {}
738 #[derive(Copy, Clone, Debug, PartialEq)]
739 
740 pub struct Stat<'a> {
741   pub _tab: flatbuffers::Table<'a>,
742 }
743 
744 impl<'a> flatbuffers::Follow<'a> for Stat<'a> {
745     type Inner = Stat<'a>;
746     #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner747     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
748         Self {
749             _tab: flatbuffers::Table { buf: buf, loc: loc },
750         }
751     }
752 }
753 
754 impl<'a> Stat<'a> {
755     #[inline]
init_from_table(table: flatbuffers::Table<'a>) -> Self756     pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
757         Stat {
758             _tab: table,
759         }
760     }
761     #[allow(unused_mut)]
create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, args: &'args StatArgs<'args>) -> flatbuffers::WIPOffset<Stat<'bldr>>762     pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
763         _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
764         args: &'args StatArgs<'args>) -> flatbuffers::WIPOffset<Stat<'bldr>> {
765       let mut builder = StatBuilder::new(_fbb);
766       builder.add_val(args.val);
767       if let Some(x) = args.id { builder.add_id(x); }
768       builder.add_count(args.count);
769       builder.finish()
770     }
771 
772     pub const VT_ID: flatbuffers::VOffsetT = 4;
773     pub const VT_VAL: flatbuffers::VOffsetT = 6;
774     pub const VT_COUNT: flatbuffers::VOffsetT = 8;
775 
776   #[inline]
id(&self) -> Option<&'a str>777   pub fn id(&self) -> Option<&'a str> {
778     self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Stat::VT_ID, None)
779   }
780   #[inline]
val(&self) -> i64781   pub fn val(&self) -> i64 {
782     self._tab.get::<i64>(Stat::VT_VAL, Some(0)).unwrap()
783   }
784   #[inline]
count(&self) -> u16785   pub fn count(&self) -> u16 {
786     self._tab.get::<u16>(Stat::VT_COUNT, Some(0)).unwrap()
787   }
788 }
789 
790 pub struct StatArgs<'a> {
791     pub id: Option<flatbuffers::WIPOffset<&'a  str>>,
792     pub val: i64,
793     pub count: u16,
794 }
795 impl<'a> Default for StatArgs<'a> {
796     #[inline]
default() -> Self797     fn default() -> Self {
798         StatArgs {
799             id: None,
800             val: 0,
801             count: 0,
802         }
803     }
804 }
805 pub struct StatBuilder<'a: 'b, 'b> {
806   fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
807   start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
808 }
809 impl<'a: 'b, 'b> StatBuilder<'a, 'b> {
810   #[inline]
add_id(&mut self, id: flatbuffers::WIPOffset<&'b str>)811   pub fn add_id(&mut self, id: flatbuffers::WIPOffset<&'b  str>) {
812     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Stat::VT_ID, id);
813   }
814   #[inline]
add_val(&mut self, val: i64)815   pub fn add_val(&mut self, val: i64) {
816     self.fbb_.push_slot::<i64>(Stat::VT_VAL, val, 0);
817   }
818   #[inline]
add_count(&mut self, count: u16)819   pub fn add_count(&mut self, count: u16) {
820     self.fbb_.push_slot::<u16>(Stat::VT_COUNT, count, 0);
821   }
822   #[inline]
new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatBuilder<'a, 'b>823   pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StatBuilder<'a, 'b> {
824     let start = _fbb.start_table();
825     StatBuilder {
826       fbb_: _fbb,
827       start_: start,
828     }
829   }
830   #[inline]
finish(self) -> flatbuffers::WIPOffset<Stat<'a>>831   pub fn finish(self) -> flatbuffers::WIPOffset<Stat<'a>> {
832     let o = self.fbb_.end_table(self.start_);
833     flatbuffers::WIPOffset::new(o.value())
834   }
835 }
836 
837 pub enum ReferrableOffset {}
838 #[derive(Copy, Clone, Debug, PartialEq)]
839 
840 pub struct Referrable<'a> {
841   pub _tab: flatbuffers::Table<'a>,
842 }
843 
844 impl<'a> flatbuffers::Follow<'a> for Referrable<'a> {
845     type Inner = Referrable<'a>;
846     #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner847     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
848         Self {
849             _tab: flatbuffers::Table { buf: buf, loc: loc },
850         }
851     }
852 }
853 
854 impl<'a> Referrable<'a> {
855     #[inline]
init_from_table(table: flatbuffers::Table<'a>) -> Self856     pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
857         Referrable {
858             _tab: table,
859         }
860     }
861     #[allow(unused_mut)]
create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, args: &'args ReferrableArgs) -> flatbuffers::WIPOffset<Referrable<'bldr>>862     pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
863         _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
864         args: &'args ReferrableArgs) -> flatbuffers::WIPOffset<Referrable<'bldr>> {
865       let mut builder = ReferrableBuilder::new(_fbb);
866       builder.add_id(args.id);
867       builder.finish()
868     }
869 
870     pub const VT_ID: flatbuffers::VOffsetT = 4;
871 
872   #[inline]
id(&self) -> u64873   pub fn id(&self) -> u64 {
874     self._tab.get::<u64>(Referrable::VT_ID, Some(0)).unwrap()
875   }
876   #[inline]
key_compare_less_than(&self, o: &Referrable) -> bool877   pub fn key_compare_less_than(&self, o: &Referrable) ->  bool {
878     self.id() < o.id()
879   }
880 
881   #[inline]
key_compare_with_value(&self, val: u64) -> ::std::cmp::Ordering882   pub fn key_compare_with_value(&self, val: u64) ->  ::std::cmp::Ordering {
883     let key = self.id();
884     key.cmp(&val)
885   }
886 }
887 
888 pub struct ReferrableArgs {
889     pub id: u64,
890 }
891 impl<'a> Default for ReferrableArgs {
892     #[inline]
default() -> Self893     fn default() -> Self {
894         ReferrableArgs {
895             id: 0,
896         }
897     }
898 }
899 pub struct ReferrableBuilder<'a: 'b, 'b> {
900   fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
901   start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
902 }
903 impl<'a: 'b, 'b> ReferrableBuilder<'a, 'b> {
904   #[inline]
add_id(&mut self, id: u64)905   pub fn add_id(&mut self, id: u64) {
906     self.fbb_.push_slot::<u64>(Referrable::VT_ID, id, 0);
907   }
908   #[inline]
new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ReferrableBuilder<'a, 'b>909   pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ReferrableBuilder<'a, 'b> {
910     let start = _fbb.start_table();
911     ReferrableBuilder {
912       fbb_: _fbb,
913       start_: start,
914     }
915   }
916   #[inline]
finish(self) -> flatbuffers::WIPOffset<Referrable<'a>>917   pub fn finish(self) -> flatbuffers::WIPOffset<Referrable<'a>> {
918     let o = self.fbb_.end_table(self.start_);
919     flatbuffers::WIPOffset::new(o.value())
920   }
921 }
922 
923 /// an example documentation comment: monster object
924 pub enum MonsterOffset {}
925 #[derive(Copy, Clone, Debug, PartialEq)]
926 
927 pub struct Monster<'a> {
928   pub _tab: flatbuffers::Table<'a>,
929 }
930 
931 impl<'a> flatbuffers::Follow<'a> for Monster<'a> {
932     type Inner = Monster<'a>;
933     #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner934     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
935         Self {
936             _tab: flatbuffers::Table { buf: buf, loc: loc },
937         }
938     }
939 }
940 
941 impl<'a> Monster<'a> {
942     #[inline]
init_from_table(table: flatbuffers::Table<'a>) -> Self943     pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
944         Monster {
945             _tab: table,
946         }
947     }
948     #[allow(unused_mut)]
create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, args: &'args MonsterArgs<'args>) -> flatbuffers::WIPOffset<Monster<'bldr>>949     pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
950         _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
951         args: &'args MonsterArgs<'args>) -> flatbuffers::WIPOffset<Monster<'bldr>> {
952       let mut builder = MonsterBuilder::new(_fbb);
953       builder.add_non_owning_reference(args.non_owning_reference);
954       builder.add_co_owning_reference(args.co_owning_reference);
955       builder.add_single_weak_reference(args.single_weak_reference);
956       builder.add_testhashu64_fnv1a(args.testhashu64_fnv1a);
957       builder.add_testhashs64_fnv1a(args.testhashs64_fnv1a);
958       builder.add_testhashu64_fnv1(args.testhashu64_fnv1);
959       builder.add_testhashs64_fnv1(args.testhashs64_fnv1);
960       if let Some(x) = args.vector_of_enums { builder.add_vector_of_enums(x); }
961       if let Some(x) = args.any_ambiguous { builder.add_any_ambiguous(x); }
962       if let Some(x) = args.any_unique { builder.add_any_unique(x); }
963       if let Some(x) = args.vector_of_non_owning_references { builder.add_vector_of_non_owning_references(x); }
964       if let Some(x) = args.vector_of_co_owning_references { builder.add_vector_of_co_owning_references(x); }
965       if let Some(x) = args.vector_of_strong_referrables { builder.add_vector_of_strong_referrables(x); }
966       if let Some(x) = args.vector_of_weak_references { builder.add_vector_of_weak_references(x); }
967       if let Some(x) = args.vector_of_referrables { builder.add_vector_of_referrables(x); }
968       if let Some(x) = args.parent_namespace_test { builder.add_parent_namespace_test(x); }
969       if let Some(x) = args.vector_of_doubles { builder.add_vector_of_doubles(x); }
970       if let Some(x) = args.vector_of_longs { builder.add_vector_of_longs(x); }
971       if let Some(x) = args.test5 { builder.add_test5(x); }
972       if let Some(x) = args.flex { builder.add_flex(x); }
973       if let Some(x) = args.testarrayofsortedstruct { builder.add_testarrayofsortedstruct(x); }
974       if let Some(x) = args.testarrayofstring2 { builder.add_testarrayofstring2(x); }
975       builder.add_testf3(args.testf3);
976       builder.add_testf2(args.testf2);
977       builder.add_testf(args.testf);
978       if let Some(x) = args.testarrayofbools { builder.add_testarrayofbools(x); }
979       builder.add_testhashu32_fnv1a(args.testhashu32_fnv1a);
980       builder.add_testhashs32_fnv1a(args.testhashs32_fnv1a);
981       builder.add_testhashu32_fnv1(args.testhashu32_fnv1);
982       builder.add_testhashs32_fnv1(args.testhashs32_fnv1);
983       if let Some(x) = args.testempty { builder.add_testempty(x); }
984       if let Some(x) = args.testnestedflatbuffer { builder.add_testnestedflatbuffer(x); }
985       if let Some(x) = args.enemy { builder.add_enemy(x); }
986       if let Some(x) = args.testarrayoftables { builder.add_testarrayoftables(x); }
987       if let Some(x) = args.testarrayofstring { builder.add_testarrayofstring(x); }
988       if let Some(x) = args.test4 { builder.add_test4(x); }
989       if let Some(x) = args.test { builder.add_test(x); }
990       if let Some(x) = args.inventory { builder.add_inventory(x); }
991       if let Some(x) = args.name { builder.add_name(x); }
992       if let Some(x) = args.pos { builder.add_pos(x); }
993       builder.add_hp(args.hp);
994       builder.add_mana(args.mana);
995       builder.add_any_ambiguous_type(args.any_ambiguous_type);
996       builder.add_any_unique_type(args.any_unique_type);
997       builder.add_testbool(args.testbool);
998       builder.add_test_type(args.test_type);
999       builder.add_color(args.color);
1000       builder.finish()
1001     }
1002 
1003     pub const VT_POS: flatbuffers::VOffsetT = 4;
1004     pub const VT_MANA: flatbuffers::VOffsetT = 6;
1005     pub const VT_HP: flatbuffers::VOffsetT = 8;
1006     pub const VT_NAME: flatbuffers::VOffsetT = 10;
1007     pub const VT_INVENTORY: flatbuffers::VOffsetT = 14;
1008     pub const VT_COLOR: flatbuffers::VOffsetT = 16;
1009     pub const VT_TEST_TYPE: flatbuffers::VOffsetT = 18;
1010     pub const VT_TEST: flatbuffers::VOffsetT = 20;
1011     pub const VT_TEST4: flatbuffers::VOffsetT = 22;
1012     pub const VT_TESTARRAYOFSTRING: flatbuffers::VOffsetT = 24;
1013     pub const VT_TESTARRAYOFTABLES: flatbuffers::VOffsetT = 26;
1014     pub const VT_ENEMY: flatbuffers::VOffsetT = 28;
1015     pub const VT_TESTNESTEDFLATBUFFER: flatbuffers::VOffsetT = 30;
1016     pub const VT_TESTEMPTY: flatbuffers::VOffsetT = 32;
1017     pub const VT_TESTBOOL: flatbuffers::VOffsetT = 34;
1018     pub const VT_TESTHASHS32_FNV1: flatbuffers::VOffsetT = 36;
1019     pub const VT_TESTHASHU32_FNV1: flatbuffers::VOffsetT = 38;
1020     pub const VT_TESTHASHS64_FNV1: flatbuffers::VOffsetT = 40;
1021     pub const VT_TESTHASHU64_FNV1: flatbuffers::VOffsetT = 42;
1022     pub const VT_TESTHASHS32_FNV1A: flatbuffers::VOffsetT = 44;
1023     pub const VT_TESTHASHU32_FNV1A: flatbuffers::VOffsetT = 46;
1024     pub const VT_TESTHASHS64_FNV1A: flatbuffers::VOffsetT = 48;
1025     pub const VT_TESTHASHU64_FNV1A: flatbuffers::VOffsetT = 50;
1026     pub const VT_TESTARRAYOFBOOLS: flatbuffers::VOffsetT = 52;
1027     pub const VT_TESTF: flatbuffers::VOffsetT = 54;
1028     pub const VT_TESTF2: flatbuffers::VOffsetT = 56;
1029     pub const VT_TESTF3: flatbuffers::VOffsetT = 58;
1030     pub const VT_TESTARRAYOFSTRING2: flatbuffers::VOffsetT = 60;
1031     pub const VT_TESTARRAYOFSORTEDSTRUCT: flatbuffers::VOffsetT = 62;
1032     pub const VT_FLEX: flatbuffers::VOffsetT = 64;
1033     pub const VT_TEST5: flatbuffers::VOffsetT = 66;
1034     pub const VT_VECTOR_OF_LONGS: flatbuffers::VOffsetT = 68;
1035     pub const VT_VECTOR_OF_DOUBLES: flatbuffers::VOffsetT = 70;
1036     pub const VT_PARENT_NAMESPACE_TEST: flatbuffers::VOffsetT = 72;
1037     pub const VT_VECTOR_OF_REFERRABLES: flatbuffers::VOffsetT = 74;
1038     pub const VT_SINGLE_WEAK_REFERENCE: flatbuffers::VOffsetT = 76;
1039     pub const VT_VECTOR_OF_WEAK_REFERENCES: flatbuffers::VOffsetT = 78;
1040     pub const VT_VECTOR_OF_STRONG_REFERRABLES: flatbuffers::VOffsetT = 80;
1041     pub const VT_CO_OWNING_REFERENCE: flatbuffers::VOffsetT = 82;
1042     pub const VT_VECTOR_OF_CO_OWNING_REFERENCES: flatbuffers::VOffsetT = 84;
1043     pub const VT_NON_OWNING_REFERENCE: flatbuffers::VOffsetT = 86;
1044     pub const VT_VECTOR_OF_NON_OWNING_REFERENCES: flatbuffers::VOffsetT = 88;
1045     pub const VT_ANY_UNIQUE_TYPE: flatbuffers::VOffsetT = 90;
1046     pub const VT_ANY_UNIQUE: flatbuffers::VOffsetT = 92;
1047     pub const VT_ANY_AMBIGUOUS_TYPE: flatbuffers::VOffsetT = 94;
1048     pub const VT_ANY_AMBIGUOUS: flatbuffers::VOffsetT = 96;
1049     pub const VT_VECTOR_OF_ENUMS: flatbuffers::VOffsetT = 98;
1050 
1051   #[inline]
pos(&self) -> Option<&'a Vec3>1052   pub fn pos(&self) -> Option<&'a Vec3> {
1053     self._tab.get::<Vec3>(Monster::VT_POS, None)
1054   }
1055   #[inline]
mana(&self) -> i161056   pub fn mana(&self) -> i16 {
1057     self._tab.get::<i16>(Monster::VT_MANA, Some(150)).unwrap()
1058   }
1059   #[inline]
hp(&self) -> i161060   pub fn hp(&self) -> i16 {
1061     self._tab.get::<i16>(Monster::VT_HP, Some(100)).unwrap()
1062   }
1063   #[inline]
name(&self) -> &'a str1064   pub fn name(&self) -> &'a str {
1065     self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Monster::VT_NAME, None).unwrap()
1066   }
1067   #[inline]
key_compare_less_than(&self, o: &Monster) -> bool1068   pub fn key_compare_less_than(&self, o: &Monster) ->  bool {
1069     self.name() < o.name()
1070   }
1071 
1072   #[inline]
key_compare_with_value(&self, val: & str) -> ::std::cmp::Ordering1073   pub fn key_compare_with_value(&self, val: & str) ->  ::std::cmp::Ordering {
1074     let key = self.name();
1075     key.cmp(&val)
1076   }
1077   #[inline]
inventory(&self) -> Option<&'a [u8]>1078   pub fn inventory(&self) -> Option<&'a [u8]> {
1079     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(Monster::VT_INVENTORY, None).map(|v| v.safe_slice())
1080   }
1081   #[inline]
color(&self) -> Color1082   pub fn color(&self) -> Color {
1083     self._tab.get::<Color>(Monster::VT_COLOR, Some(Color::Blue)).unwrap()
1084   }
1085   #[inline]
test_type(&self) -> Any1086   pub fn test_type(&self) -> Any {
1087     self._tab.get::<Any>(Monster::VT_TEST_TYPE, Some(Any::NONE)).unwrap()
1088   }
1089   #[inline]
test(&self) -> Option<flatbuffers::Table<'a>>1090   pub fn test(&self) -> Option<flatbuffers::Table<'a>> {
1091     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(Monster::VT_TEST, None)
1092   }
1093   #[inline]
test4(&self) -> Option<&'a [Test]>1094   pub fn test4(&self) -> Option<&'a [Test]> {
1095     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<Test>>>(Monster::VT_TEST4, None).map(|v| v.safe_slice() )
1096   }
1097   #[inline]
testarrayofstring(&self) -> Option<flatbuffers::Vector<flatbuffers::ForwardsUOffset<&'a str>>>1098   pub fn testarrayofstring(&self) -> Option<flatbuffers::Vector<flatbuffers::ForwardsUOffset<&'a str>>> {
1099     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<flatbuffers::ForwardsUOffset<&'a str>>>>(Monster::VT_TESTARRAYOFSTRING, None)
1100   }
1101   /// an example documentation comment: this will end up in the generated code
1102   /// multiline too
1103   #[inline]
testarrayoftables(&self) -> Option<flatbuffers::Vector<flatbuffers::ForwardsUOffset<Monster<'a>>>>1104   pub fn testarrayoftables(&self) -> Option<flatbuffers::Vector<flatbuffers::ForwardsUOffset<Monster<'a>>>> {
1105     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<flatbuffers::ForwardsUOffset<Monster<'a>>>>>(Monster::VT_TESTARRAYOFTABLES, None)
1106   }
1107   #[inline]
enemy(&self) -> Option<Monster<'a>>1108   pub fn enemy(&self) -> Option<Monster<'a>> {
1109     self._tab.get::<flatbuffers::ForwardsUOffset<Monster<'a>>>(Monster::VT_ENEMY, None)
1110   }
1111   #[inline]
testnestedflatbuffer(&self) -> Option<&'a [u8]>1112   pub fn testnestedflatbuffer(&self) -> Option<&'a [u8]> {
1113     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(Monster::VT_TESTNESTEDFLATBUFFER, None).map(|v| v.safe_slice())
1114   }
testnestedflatbuffer_nested_flatbuffer(&'a self) -> Option<Monster<'a>>1115   pub fn testnestedflatbuffer_nested_flatbuffer(&'a self) ->  Option<Monster<'a>> {
1116      match self.testnestedflatbuffer() {
1117          None => { None }
1118          Some(data) => {
1119              use self::flatbuffers::Follow;
1120              Some(<flatbuffers::ForwardsUOffset<Monster<'a>>>::follow(data, 0))
1121          },
1122      }
1123   }
1124   #[inline]
testempty(&self) -> Option<Stat<'a>>1125   pub fn testempty(&self) -> Option<Stat<'a>> {
1126     self._tab.get::<flatbuffers::ForwardsUOffset<Stat<'a>>>(Monster::VT_TESTEMPTY, None)
1127   }
1128   #[inline]
testbool(&self) -> bool1129   pub fn testbool(&self) -> bool {
1130     self._tab.get::<bool>(Monster::VT_TESTBOOL, Some(false)).unwrap()
1131   }
1132   #[inline]
testhashs32_fnv1(&self) -> i321133   pub fn testhashs32_fnv1(&self) -> i32 {
1134     self._tab.get::<i32>(Monster::VT_TESTHASHS32_FNV1, Some(0)).unwrap()
1135   }
1136   #[inline]
testhashu32_fnv1(&self) -> u321137   pub fn testhashu32_fnv1(&self) -> u32 {
1138     self._tab.get::<u32>(Monster::VT_TESTHASHU32_FNV1, Some(0)).unwrap()
1139   }
1140   #[inline]
testhashs64_fnv1(&self) -> i641141   pub fn testhashs64_fnv1(&self) -> i64 {
1142     self._tab.get::<i64>(Monster::VT_TESTHASHS64_FNV1, Some(0)).unwrap()
1143   }
1144   #[inline]
testhashu64_fnv1(&self) -> u641145   pub fn testhashu64_fnv1(&self) -> u64 {
1146     self._tab.get::<u64>(Monster::VT_TESTHASHU64_FNV1, Some(0)).unwrap()
1147   }
1148   #[inline]
testhashs32_fnv1a(&self) -> i321149   pub fn testhashs32_fnv1a(&self) -> i32 {
1150     self._tab.get::<i32>(Monster::VT_TESTHASHS32_FNV1A, Some(0)).unwrap()
1151   }
1152   #[inline]
testhashu32_fnv1a(&self) -> u321153   pub fn testhashu32_fnv1a(&self) -> u32 {
1154     self._tab.get::<u32>(Monster::VT_TESTHASHU32_FNV1A, Some(0)).unwrap()
1155   }
1156   #[inline]
testhashs64_fnv1a(&self) -> i641157   pub fn testhashs64_fnv1a(&self) -> i64 {
1158     self._tab.get::<i64>(Monster::VT_TESTHASHS64_FNV1A, Some(0)).unwrap()
1159   }
1160   #[inline]
testhashu64_fnv1a(&self) -> u641161   pub fn testhashu64_fnv1a(&self) -> u64 {
1162     self._tab.get::<u64>(Monster::VT_TESTHASHU64_FNV1A, Some(0)).unwrap()
1163   }
1164   #[inline]
testarrayofbools(&self) -> Option<&'a [bool]>1165   pub fn testarrayofbools(&self) -> Option<&'a [bool]> {
1166     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, bool>>>(Monster::VT_TESTARRAYOFBOOLS, None).map(|v| v.safe_slice())
1167   }
1168   #[inline]
testf(&self) -> f321169   pub fn testf(&self) -> f32 {
1170     self._tab.get::<f32>(Monster::VT_TESTF, Some(3.14159)).unwrap()
1171   }
1172   #[inline]
testf2(&self) -> f321173   pub fn testf2(&self) -> f32 {
1174     self._tab.get::<f32>(Monster::VT_TESTF2, Some(3.0)).unwrap()
1175   }
1176   #[inline]
testf3(&self) -> f321177   pub fn testf3(&self) -> f32 {
1178     self._tab.get::<f32>(Monster::VT_TESTF3, Some(0.0)).unwrap()
1179   }
1180   #[inline]
testarrayofstring2(&self) -> Option<flatbuffers::Vector<flatbuffers::ForwardsUOffset<&'a str>>>1181   pub fn testarrayofstring2(&self) -> Option<flatbuffers::Vector<flatbuffers::ForwardsUOffset<&'a str>>> {
1182     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<flatbuffers::ForwardsUOffset<&'a str>>>>(Monster::VT_TESTARRAYOFSTRING2, None)
1183   }
1184   #[inline]
testarrayofsortedstruct(&self) -> Option<&'a [Ability]>1185   pub fn testarrayofsortedstruct(&self) -> Option<&'a [Ability]> {
1186     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<Ability>>>(Monster::VT_TESTARRAYOFSORTEDSTRUCT, None).map(|v| v.safe_slice() )
1187   }
1188   #[inline]
flex(&self) -> Option<&'a [u8]>1189   pub fn flex(&self) -> Option<&'a [u8]> {
1190     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(Monster::VT_FLEX, None).map(|v| v.safe_slice())
1191   }
1192   #[inline]
test5(&self) -> Option<&'a [Test]>1193   pub fn test5(&self) -> Option<&'a [Test]> {
1194     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<Test>>>(Monster::VT_TEST5, None).map(|v| v.safe_slice() )
1195   }
1196   #[inline]
vector_of_longs(&self) -> Option<flatbuffers::Vector<'a, i64>>1197   pub fn vector_of_longs(&self) -> Option<flatbuffers::Vector<'a, i64>> {
1198     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i64>>>(Monster::VT_VECTOR_OF_LONGS, None)
1199   }
1200   #[inline]
vector_of_doubles(&self) -> Option<flatbuffers::Vector<'a, f64>>1201   pub fn vector_of_doubles(&self) -> Option<flatbuffers::Vector<'a, f64>> {
1202     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f64>>>(Monster::VT_VECTOR_OF_DOUBLES, None)
1203   }
1204   #[inline]
parent_namespace_test(&self) -> Option<super::InParentNamespace<'a>>1205   pub fn parent_namespace_test(&self) -> Option<super::InParentNamespace<'a>> {
1206     self._tab.get::<flatbuffers::ForwardsUOffset<super::InParentNamespace<'a>>>(Monster::VT_PARENT_NAMESPACE_TEST, None)
1207   }
1208   #[inline]
vector_of_referrables(&self) -> Option<flatbuffers::Vector<flatbuffers::ForwardsUOffset<Referrable<'a>>>>1209   pub fn vector_of_referrables(&self) -> Option<flatbuffers::Vector<flatbuffers::ForwardsUOffset<Referrable<'a>>>> {
1210     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<flatbuffers::ForwardsUOffset<Referrable<'a>>>>>(Monster::VT_VECTOR_OF_REFERRABLES, None)
1211   }
1212   #[inline]
single_weak_reference(&self) -> u641213   pub fn single_weak_reference(&self) -> u64 {
1214     self._tab.get::<u64>(Monster::VT_SINGLE_WEAK_REFERENCE, Some(0)).unwrap()
1215   }
1216   #[inline]
vector_of_weak_references(&self) -> Option<flatbuffers::Vector<'a, u64>>1217   pub fn vector_of_weak_references(&self) -> Option<flatbuffers::Vector<'a, u64>> {
1218     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u64>>>(Monster::VT_VECTOR_OF_WEAK_REFERENCES, None)
1219   }
1220   #[inline]
vector_of_strong_referrables(&self) -> Option<flatbuffers::Vector<flatbuffers::ForwardsUOffset<Referrable<'a>>>>1221   pub fn vector_of_strong_referrables(&self) -> Option<flatbuffers::Vector<flatbuffers::ForwardsUOffset<Referrable<'a>>>> {
1222     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<flatbuffers::ForwardsUOffset<Referrable<'a>>>>>(Monster::VT_VECTOR_OF_STRONG_REFERRABLES, None)
1223   }
1224   #[inline]
co_owning_reference(&self) -> u641225   pub fn co_owning_reference(&self) -> u64 {
1226     self._tab.get::<u64>(Monster::VT_CO_OWNING_REFERENCE, Some(0)).unwrap()
1227   }
1228   #[inline]
vector_of_co_owning_references(&self) -> Option<flatbuffers::Vector<'a, u64>>1229   pub fn vector_of_co_owning_references(&self) -> Option<flatbuffers::Vector<'a, u64>> {
1230     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u64>>>(Monster::VT_VECTOR_OF_CO_OWNING_REFERENCES, None)
1231   }
1232   #[inline]
non_owning_reference(&self) -> u641233   pub fn non_owning_reference(&self) -> u64 {
1234     self._tab.get::<u64>(Monster::VT_NON_OWNING_REFERENCE, Some(0)).unwrap()
1235   }
1236   #[inline]
vector_of_non_owning_references(&self) -> Option<flatbuffers::Vector<'a, u64>>1237   pub fn vector_of_non_owning_references(&self) -> Option<flatbuffers::Vector<'a, u64>> {
1238     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u64>>>(Monster::VT_VECTOR_OF_NON_OWNING_REFERENCES, None)
1239   }
1240   #[inline]
any_unique_type(&self) -> AnyUniqueAliases1241   pub fn any_unique_type(&self) -> AnyUniqueAliases {
1242     self._tab.get::<AnyUniqueAliases>(Monster::VT_ANY_UNIQUE_TYPE, Some(AnyUniqueAliases::NONE)).unwrap()
1243   }
1244   #[inline]
any_unique(&self) -> Option<flatbuffers::Table<'a>>1245   pub fn any_unique(&self) -> Option<flatbuffers::Table<'a>> {
1246     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(Monster::VT_ANY_UNIQUE, None)
1247   }
1248   #[inline]
any_ambiguous_type(&self) -> AnyAmbiguousAliases1249   pub fn any_ambiguous_type(&self) -> AnyAmbiguousAliases {
1250     self._tab.get::<AnyAmbiguousAliases>(Monster::VT_ANY_AMBIGUOUS_TYPE, Some(AnyAmbiguousAliases::NONE)).unwrap()
1251   }
1252   #[inline]
any_ambiguous(&self) -> Option<flatbuffers::Table<'a>>1253   pub fn any_ambiguous(&self) -> Option<flatbuffers::Table<'a>> {
1254     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(Monster::VT_ANY_AMBIGUOUS, None)
1255   }
1256   #[inline]
vector_of_enums(&self) -> Option<flatbuffers::Vector<'a, Color>>1257   pub fn vector_of_enums(&self) -> Option<flatbuffers::Vector<'a, Color>> {
1258     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, Color>>>(Monster::VT_VECTOR_OF_ENUMS, None)
1259   }
1260   #[inline]
1261   #[allow(non_snake_case)]
test_as_monster(&self) -> Option<Monster<'a>>1262   pub fn test_as_monster(&self) -> Option<Monster<'a>> {
1263     if self.test_type() == Any::Monster {
1264       self.test().map(|u| Monster::init_from_table(u))
1265     } else {
1266       None
1267     }
1268   }
1269 
1270   #[inline]
1271   #[allow(non_snake_case)]
test_as_test_simple_table_with_enum(&self) -> Option<TestSimpleTableWithEnum<'a>>1272   pub fn test_as_test_simple_table_with_enum(&self) -> Option<TestSimpleTableWithEnum<'a>> {
1273     if self.test_type() == Any::TestSimpleTableWithEnum {
1274       self.test().map(|u| TestSimpleTableWithEnum::init_from_table(u))
1275     } else {
1276       None
1277     }
1278   }
1279 
1280   #[inline]
1281   #[allow(non_snake_case)]
test_as_my_game_example_2_monster(&self) -> Option<super::example_2::Monster<'a>>1282   pub fn test_as_my_game_example_2_monster(&self) -> Option<super::example_2::Monster<'a>> {
1283     if self.test_type() == Any::MyGame_Example2_Monster {
1284       self.test().map(|u| super::example_2::Monster::init_from_table(u))
1285     } else {
1286       None
1287     }
1288   }
1289 
1290   #[inline]
1291   #[allow(non_snake_case)]
any_unique_as_m(&self) -> Option<Monster<'a>>1292   pub fn any_unique_as_m(&self) -> Option<Monster<'a>> {
1293     if self.any_unique_type() == AnyUniqueAliases::M {
1294       self.any_unique().map(|u| Monster::init_from_table(u))
1295     } else {
1296       None
1297     }
1298   }
1299 
1300   #[inline]
1301   #[allow(non_snake_case)]
any_unique_as_t(&self) -> Option<TestSimpleTableWithEnum<'a>>1302   pub fn any_unique_as_t(&self) -> Option<TestSimpleTableWithEnum<'a>> {
1303     if self.any_unique_type() == AnyUniqueAliases::T {
1304       self.any_unique().map(|u| TestSimpleTableWithEnum::init_from_table(u))
1305     } else {
1306       None
1307     }
1308   }
1309 
1310   #[inline]
1311   #[allow(non_snake_case)]
any_unique_as_m2(&self) -> Option<super::example_2::Monster<'a>>1312   pub fn any_unique_as_m2(&self) -> Option<super::example_2::Monster<'a>> {
1313     if self.any_unique_type() == AnyUniqueAliases::M2 {
1314       self.any_unique().map(|u| super::example_2::Monster::init_from_table(u))
1315     } else {
1316       None
1317     }
1318   }
1319 
1320   #[inline]
1321   #[allow(non_snake_case)]
any_ambiguous_as_m1(&self) -> Option<Monster<'a>>1322   pub fn any_ambiguous_as_m1(&self) -> Option<Monster<'a>> {
1323     if self.any_ambiguous_type() == AnyAmbiguousAliases::M1 {
1324       self.any_ambiguous().map(|u| Monster::init_from_table(u))
1325     } else {
1326       None
1327     }
1328   }
1329 
1330   #[inline]
1331   #[allow(non_snake_case)]
any_ambiguous_as_m2(&self) -> Option<Monster<'a>>1332   pub fn any_ambiguous_as_m2(&self) -> Option<Monster<'a>> {
1333     if self.any_ambiguous_type() == AnyAmbiguousAliases::M2 {
1334       self.any_ambiguous().map(|u| Monster::init_from_table(u))
1335     } else {
1336       None
1337     }
1338   }
1339 
1340   #[inline]
1341   #[allow(non_snake_case)]
any_ambiguous_as_m3(&self) -> Option<Monster<'a>>1342   pub fn any_ambiguous_as_m3(&self) -> Option<Monster<'a>> {
1343     if self.any_ambiguous_type() == AnyAmbiguousAliases::M3 {
1344       self.any_ambiguous().map(|u| Monster::init_from_table(u))
1345     } else {
1346       None
1347     }
1348   }
1349 
1350 }
1351 
1352 pub struct MonsterArgs<'a> {
1353     pub pos: Option<&'a  Vec3>,
1354     pub mana: i16,
1355     pub hp: i16,
1356     pub name: Option<flatbuffers::WIPOffset<&'a  str>>,
1357     pub inventory: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a ,  u8>>>,
1358     pub color: Color,
1359     pub test_type: Any,
1360     pub test: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
1361     pub test4: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a , Test>>>,
1362     pub testarrayofstring: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a , flatbuffers::ForwardsUOffset<&'a  str>>>>,
1363     pub testarrayoftables: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a , flatbuffers::ForwardsUOffset<Monster<'a >>>>>,
1364     pub enemy: Option<flatbuffers::WIPOffset<Monster<'a >>>,
1365     pub testnestedflatbuffer: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a ,  u8>>>,
1366     pub testempty: Option<flatbuffers::WIPOffset<Stat<'a >>>,
1367     pub testbool: bool,
1368     pub testhashs32_fnv1: i32,
1369     pub testhashu32_fnv1: u32,
1370     pub testhashs64_fnv1: i64,
1371     pub testhashu64_fnv1: u64,
1372     pub testhashs32_fnv1a: i32,
1373     pub testhashu32_fnv1a: u32,
1374     pub testhashs64_fnv1a: i64,
1375     pub testhashu64_fnv1a: u64,
1376     pub testarrayofbools: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a , bool>>>,
1377     pub testf: f32,
1378     pub testf2: f32,
1379     pub testf3: f32,
1380     pub testarrayofstring2: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a , flatbuffers::ForwardsUOffset<&'a  str>>>>,
1381     pub testarrayofsortedstruct: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a , Ability>>>,
1382     pub flex: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a ,  u8>>>,
1383     pub test5: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a , Test>>>,
1384     pub vector_of_longs: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a ,  i64>>>,
1385     pub vector_of_doubles: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a ,  f64>>>,
1386     pub parent_namespace_test: Option<flatbuffers::WIPOffset<super::InParentNamespace<'a >>>,
1387     pub vector_of_referrables: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a , flatbuffers::ForwardsUOffset<Referrable<'a >>>>>,
1388     pub single_weak_reference: u64,
1389     pub vector_of_weak_references: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a ,  u64>>>,
1390     pub vector_of_strong_referrables: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a , flatbuffers::ForwardsUOffset<Referrable<'a >>>>>,
1391     pub co_owning_reference: u64,
1392     pub vector_of_co_owning_references: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a ,  u64>>>,
1393     pub non_owning_reference: u64,
1394     pub vector_of_non_owning_references: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a ,  u64>>>,
1395     pub any_unique_type: AnyUniqueAliases,
1396     pub any_unique: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
1397     pub any_ambiguous_type: AnyAmbiguousAliases,
1398     pub any_ambiguous: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
1399     pub vector_of_enums: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a , Color>>>,
1400 }
1401 impl<'a> Default for MonsterArgs<'a> {
1402     #[inline]
default() -> Self1403     fn default() -> Self {
1404         MonsterArgs {
1405             pos: None,
1406             mana: 150,
1407             hp: 100,
1408             name: None, // required field
1409             inventory: None,
1410             color: Color::Blue,
1411             test_type: Any::NONE,
1412             test: None,
1413             test4: None,
1414             testarrayofstring: None,
1415             testarrayoftables: None,
1416             enemy: None,
1417             testnestedflatbuffer: None,
1418             testempty: None,
1419             testbool: false,
1420             testhashs32_fnv1: 0,
1421             testhashu32_fnv1: 0,
1422             testhashs64_fnv1: 0,
1423             testhashu64_fnv1: 0,
1424             testhashs32_fnv1a: 0,
1425             testhashu32_fnv1a: 0,
1426             testhashs64_fnv1a: 0,
1427             testhashu64_fnv1a: 0,
1428             testarrayofbools: None,
1429             testf: 3.14159,
1430             testf2: 3.0,
1431             testf3: 0.0,
1432             testarrayofstring2: None,
1433             testarrayofsortedstruct: None,
1434             flex: None,
1435             test5: None,
1436             vector_of_longs: None,
1437             vector_of_doubles: None,
1438             parent_namespace_test: None,
1439             vector_of_referrables: None,
1440             single_weak_reference: 0,
1441             vector_of_weak_references: None,
1442             vector_of_strong_referrables: None,
1443             co_owning_reference: 0,
1444             vector_of_co_owning_references: None,
1445             non_owning_reference: 0,
1446             vector_of_non_owning_references: None,
1447             any_unique_type: AnyUniqueAliases::NONE,
1448             any_unique: None,
1449             any_ambiguous_type: AnyAmbiguousAliases::NONE,
1450             any_ambiguous: None,
1451             vector_of_enums: None,
1452         }
1453     }
1454 }
1455 pub struct MonsterBuilder<'a: 'b, 'b> {
1456   fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
1457   start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1458 }
1459 impl<'a: 'b, 'b> MonsterBuilder<'a, 'b> {
1460   #[inline]
add_pos(&mut self, pos: &'b Vec3)1461   pub fn add_pos(&mut self, pos: &'b  Vec3) {
1462     self.fbb_.push_slot_always::<&Vec3>(Monster::VT_POS, pos);
1463   }
1464   #[inline]
add_mana(&mut self, mana: i16)1465   pub fn add_mana(&mut self, mana: i16) {
1466     self.fbb_.push_slot::<i16>(Monster::VT_MANA, mana, 150);
1467   }
1468   #[inline]
add_hp(&mut self, hp: i16)1469   pub fn add_hp(&mut self, hp: i16) {
1470     self.fbb_.push_slot::<i16>(Monster::VT_HP, hp, 100);
1471   }
1472   #[inline]
add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>)1473   pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
1474     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_NAME, name);
1475   }
1476   #[inline]
add_inventory(&mut self, inventory: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u8>>)1477   pub fn add_inventory(&mut self, inventory: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u8>>) {
1478     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_INVENTORY, inventory);
1479   }
1480   #[inline]
add_color(&mut self, color: Color)1481   pub fn add_color(&mut self, color: Color) {
1482     self.fbb_.push_slot::<Color>(Monster::VT_COLOR, color, Color::Blue);
1483   }
1484   #[inline]
add_test_type(&mut self, test_type: Any)1485   pub fn add_test_type(&mut self, test_type: Any) {
1486     self.fbb_.push_slot::<Any>(Monster::VT_TEST_TYPE, test_type, Any::NONE);
1487   }
1488   #[inline]
add_test(&mut self, test: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>)1489   pub fn add_test(&mut self, test: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
1490     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_TEST, test);
1491   }
1492   #[inline]
add_test4(&mut self, test4: flatbuffers::WIPOffset<flatbuffers::Vector<'b , Test>>)1493   pub fn add_test4(&mut self, test4: flatbuffers::WIPOffset<flatbuffers::Vector<'b , Test>>) {
1494     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_TEST4, test4);
1495   }
1496   #[inline]
add_testarrayofstring(&mut self, testarrayofstring: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b str>>>)1497   pub fn add_testarrayofstring(&mut self, testarrayofstring: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
1498     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_TESTARRAYOFSTRING, testarrayofstring);
1499   }
1500   #[inline]
add_testarrayoftables(&mut self, testarrayoftables: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Monster<'b >>>>)1501   pub fn add_testarrayoftables(&mut self, testarrayoftables: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Monster<'b >>>>) {
1502     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_TESTARRAYOFTABLES, testarrayoftables);
1503   }
1504   #[inline]
add_enemy(&mut self, enemy: flatbuffers::WIPOffset<Monster<'b >>)1505   pub fn add_enemy(&mut self, enemy: flatbuffers::WIPOffset<Monster<'b >>) {
1506     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Monster>>(Monster::VT_ENEMY, enemy);
1507   }
1508   #[inline]
add_testnestedflatbuffer(&mut self, testnestedflatbuffer: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u8>>)1509   pub fn add_testnestedflatbuffer(&mut self, testnestedflatbuffer: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u8>>) {
1510     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_TESTNESTEDFLATBUFFER, testnestedflatbuffer);
1511   }
1512   #[inline]
add_testempty(&mut self, testempty: flatbuffers::WIPOffset<Stat<'b >>)1513   pub fn add_testempty(&mut self, testempty: flatbuffers::WIPOffset<Stat<'b >>) {
1514     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Stat>>(Monster::VT_TESTEMPTY, testempty);
1515   }
1516   #[inline]
add_testbool(&mut self, testbool: bool)1517   pub fn add_testbool(&mut self, testbool: bool) {
1518     self.fbb_.push_slot::<bool>(Monster::VT_TESTBOOL, testbool, false);
1519   }
1520   #[inline]
add_testhashs32_fnv1(&mut self, testhashs32_fnv1: i32)1521   pub fn add_testhashs32_fnv1(&mut self, testhashs32_fnv1: i32) {
1522     self.fbb_.push_slot::<i32>(Monster::VT_TESTHASHS32_FNV1, testhashs32_fnv1, 0);
1523   }
1524   #[inline]
add_testhashu32_fnv1(&mut self, testhashu32_fnv1: u32)1525   pub fn add_testhashu32_fnv1(&mut self, testhashu32_fnv1: u32) {
1526     self.fbb_.push_slot::<u32>(Monster::VT_TESTHASHU32_FNV1, testhashu32_fnv1, 0);
1527   }
1528   #[inline]
add_testhashs64_fnv1(&mut self, testhashs64_fnv1: i64)1529   pub fn add_testhashs64_fnv1(&mut self, testhashs64_fnv1: i64) {
1530     self.fbb_.push_slot::<i64>(Monster::VT_TESTHASHS64_FNV1, testhashs64_fnv1, 0);
1531   }
1532   #[inline]
add_testhashu64_fnv1(&mut self, testhashu64_fnv1: u64)1533   pub fn add_testhashu64_fnv1(&mut self, testhashu64_fnv1: u64) {
1534     self.fbb_.push_slot::<u64>(Monster::VT_TESTHASHU64_FNV1, testhashu64_fnv1, 0);
1535   }
1536   #[inline]
add_testhashs32_fnv1a(&mut self, testhashs32_fnv1a: i32)1537   pub fn add_testhashs32_fnv1a(&mut self, testhashs32_fnv1a: i32) {
1538     self.fbb_.push_slot::<i32>(Monster::VT_TESTHASHS32_FNV1A, testhashs32_fnv1a, 0);
1539   }
1540   #[inline]
add_testhashu32_fnv1a(&mut self, testhashu32_fnv1a: u32)1541   pub fn add_testhashu32_fnv1a(&mut self, testhashu32_fnv1a: u32) {
1542     self.fbb_.push_slot::<u32>(Monster::VT_TESTHASHU32_FNV1A, testhashu32_fnv1a, 0);
1543   }
1544   #[inline]
add_testhashs64_fnv1a(&mut self, testhashs64_fnv1a: i64)1545   pub fn add_testhashs64_fnv1a(&mut self, testhashs64_fnv1a: i64) {
1546     self.fbb_.push_slot::<i64>(Monster::VT_TESTHASHS64_FNV1A, testhashs64_fnv1a, 0);
1547   }
1548   #[inline]
add_testhashu64_fnv1a(&mut self, testhashu64_fnv1a: u64)1549   pub fn add_testhashu64_fnv1a(&mut self, testhashu64_fnv1a: u64) {
1550     self.fbb_.push_slot::<u64>(Monster::VT_TESTHASHU64_FNV1A, testhashu64_fnv1a, 0);
1551   }
1552   #[inline]
add_testarrayofbools(&mut self, testarrayofbools: flatbuffers::WIPOffset<flatbuffers::Vector<'b , bool>>)1553   pub fn add_testarrayofbools(&mut self, testarrayofbools: flatbuffers::WIPOffset<flatbuffers::Vector<'b , bool>>) {
1554     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_TESTARRAYOFBOOLS, testarrayofbools);
1555   }
1556   #[inline]
add_testf(&mut self, testf: f32)1557   pub fn add_testf(&mut self, testf: f32) {
1558     self.fbb_.push_slot::<f32>(Monster::VT_TESTF, testf, 3.14159);
1559   }
1560   #[inline]
add_testf2(&mut self, testf2: f32)1561   pub fn add_testf2(&mut self, testf2: f32) {
1562     self.fbb_.push_slot::<f32>(Monster::VT_TESTF2, testf2, 3.0);
1563   }
1564   #[inline]
add_testf3(&mut self, testf3: f32)1565   pub fn add_testf3(&mut self, testf3: f32) {
1566     self.fbb_.push_slot::<f32>(Monster::VT_TESTF3, testf3, 0.0);
1567   }
1568   #[inline]
add_testarrayofstring2(&mut self, testarrayofstring2: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b str>>>)1569   pub fn add_testarrayofstring2(&mut self, testarrayofstring2: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
1570     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_TESTARRAYOFSTRING2, testarrayofstring2);
1571   }
1572   #[inline]
add_testarrayofsortedstruct(&mut self, testarrayofsortedstruct: flatbuffers::WIPOffset<flatbuffers::Vector<'b , Ability>>)1573   pub fn add_testarrayofsortedstruct(&mut self, testarrayofsortedstruct: flatbuffers::WIPOffset<flatbuffers::Vector<'b , Ability>>) {
1574     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_TESTARRAYOFSORTEDSTRUCT, testarrayofsortedstruct);
1575   }
1576   #[inline]
add_flex(&mut self, flex: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u8>>)1577   pub fn add_flex(&mut self, flex: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u8>>) {
1578     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_FLEX, flex);
1579   }
1580   #[inline]
add_test5(&mut self, test5: flatbuffers::WIPOffset<flatbuffers::Vector<'b , Test>>)1581   pub fn add_test5(&mut self, test5: flatbuffers::WIPOffset<flatbuffers::Vector<'b , Test>>) {
1582     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_TEST5, test5);
1583   }
1584   #[inline]
add_vector_of_longs(&mut self, vector_of_longs: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i64>>)1585   pub fn add_vector_of_longs(&mut self, vector_of_longs: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i64>>) {
1586     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_VECTOR_OF_LONGS, vector_of_longs);
1587   }
1588   #[inline]
add_vector_of_doubles(&mut self, vector_of_doubles: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f64>>)1589   pub fn add_vector_of_doubles(&mut self, vector_of_doubles: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f64>>) {
1590     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_VECTOR_OF_DOUBLES, vector_of_doubles);
1591   }
1592   #[inline]
add_parent_namespace_test(&mut self, parent_namespace_test: flatbuffers::WIPOffset<super::InParentNamespace<'b >>)1593   pub fn add_parent_namespace_test(&mut self, parent_namespace_test: flatbuffers::WIPOffset<super::InParentNamespace<'b >>) {
1594     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<super::InParentNamespace>>(Monster::VT_PARENT_NAMESPACE_TEST, parent_namespace_test);
1595   }
1596   #[inline]
add_vector_of_referrables(&mut self, vector_of_referrables: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Referrable<'b >>>>)1597   pub fn add_vector_of_referrables(&mut self, vector_of_referrables: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Referrable<'b >>>>) {
1598     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_VECTOR_OF_REFERRABLES, vector_of_referrables);
1599   }
1600   #[inline]
add_single_weak_reference(&mut self, single_weak_reference: u64)1601   pub fn add_single_weak_reference(&mut self, single_weak_reference: u64) {
1602     self.fbb_.push_slot::<u64>(Monster::VT_SINGLE_WEAK_REFERENCE, single_weak_reference, 0);
1603   }
1604   #[inline]
add_vector_of_weak_references(&mut self, vector_of_weak_references: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u64>>)1605   pub fn add_vector_of_weak_references(&mut self, vector_of_weak_references: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u64>>) {
1606     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_VECTOR_OF_WEAK_REFERENCES, vector_of_weak_references);
1607   }
1608   #[inline]
add_vector_of_strong_referrables(&mut self, vector_of_strong_referrables: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Referrable<'b >>>>)1609   pub fn add_vector_of_strong_referrables(&mut self, vector_of_strong_referrables: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Referrable<'b >>>>) {
1610     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_VECTOR_OF_STRONG_REFERRABLES, vector_of_strong_referrables);
1611   }
1612   #[inline]
add_co_owning_reference(&mut self, co_owning_reference: u64)1613   pub fn add_co_owning_reference(&mut self, co_owning_reference: u64) {
1614     self.fbb_.push_slot::<u64>(Monster::VT_CO_OWNING_REFERENCE, co_owning_reference, 0);
1615   }
1616   #[inline]
add_vector_of_co_owning_references(&mut self, vector_of_co_owning_references: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u64>>)1617   pub fn add_vector_of_co_owning_references(&mut self, vector_of_co_owning_references: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u64>>) {
1618     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_VECTOR_OF_CO_OWNING_REFERENCES, vector_of_co_owning_references);
1619   }
1620   #[inline]
add_non_owning_reference(&mut self, non_owning_reference: u64)1621   pub fn add_non_owning_reference(&mut self, non_owning_reference: u64) {
1622     self.fbb_.push_slot::<u64>(Monster::VT_NON_OWNING_REFERENCE, non_owning_reference, 0);
1623   }
1624   #[inline]
add_vector_of_non_owning_references(&mut self, vector_of_non_owning_references: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u64>>)1625   pub fn add_vector_of_non_owning_references(&mut self, vector_of_non_owning_references: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u64>>) {
1626     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_VECTOR_OF_NON_OWNING_REFERENCES, vector_of_non_owning_references);
1627   }
1628   #[inline]
add_any_unique_type(&mut self, any_unique_type: AnyUniqueAliases)1629   pub fn add_any_unique_type(&mut self, any_unique_type: AnyUniqueAliases) {
1630     self.fbb_.push_slot::<AnyUniqueAliases>(Monster::VT_ANY_UNIQUE_TYPE, any_unique_type, AnyUniqueAliases::NONE);
1631   }
1632   #[inline]
add_any_unique(&mut self, any_unique: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>)1633   pub fn add_any_unique(&mut self, any_unique: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
1634     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_ANY_UNIQUE, any_unique);
1635   }
1636   #[inline]
add_any_ambiguous_type(&mut self, any_ambiguous_type: AnyAmbiguousAliases)1637   pub fn add_any_ambiguous_type(&mut self, any_ambiguous_type: AnyAmbiguousAliases) {
1638     self.fbb_.push_slot::<AnyAmbiguousAliases>(Monster::VT_ANY_AMBIGUOUS_TYPE, any_ambiguous_type, AnyAmbiguousAliases::NONE);
1639   }
1640   #[inline]
add_any_ambiguous(&mut self, any_ambiguous: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>)1641   pub fn add_any_ambiguous(&mut self, any_ambiguous: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
1642     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_ANY_AMBIGUOUS, any_ambiguous);
1643   }
1644   #[inline]
add_vector_of_enums(&mut self, vector_of_enums: flatbuffers::WIPOffset<flatbuffers::Vector<'b , Color>>)1645   pub fn add_vector_of_enums(&mut self, vector_of_enums: flatbuffers::WIPOffset<flatbuffers::Vector<'b , Color>>) {
1646     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Monster::VT_VECTOR_OF_ENUMS, vector_of_enums);
1647   }
1648   #[inline]
new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> MonsterBuilder<'a, 'b>1649   pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> MonsterBuilder<'a, 'b> {
1650     let start = _fbb.start_table();
1651     MonsterBuilder {
1652       fbb_: _fbb,
1653       start_: start,
1654     }
1655   }
1656   #[inline]
finish(self) -> flatbuffers::WIPOffset<Monster<'a>>1657   pub fn finish(self) -> flatbuffers::WIPOffset<Monster<'a>> {
1658     let o = self.fbb_.end_table(self.start_);
1659     self.fbb_.required(o, Monster::VT_NAME,"name");
1660     flatbuffers::WIPOffset::new(o.value())
1661   }
1662 }
1663 
1664 pub enum TypeAliasesOffset {}
1665 #[derive(Copy, Clone, Debug, PartialEq)]
1666 
1667 pub struct TypeAliases<'a> {
1668   pub _tab: flatbuffers::Table<'a>,
1669 }
1670 
1671 impl<'a> flatbuffers::Follow<'a> for TypeAliases<'a> {
1672     type Inner = TypeAliases<'a>;
1673     #[inline]
follow(buf: &'a [u8], loc: usize) -> Self::Inner1674     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1675         Self {
1676             _tab: flatbuffers::Table { buf: buf, loc: loc },
1677         }
1678     }
1679 }
1680 
1681 impl<'a> TypeAliases<'a> {
1682     #[inline]
init_from_table(table: flatbuffers::Table<'a>) -> Self1683     pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1684         TypeAliases {
1685             _tab: table,
1686         }
1687     }
1688     #[allow(unused_mut)]
create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, args: &'args TypeAliasesArgs<'args>) -> flatbuffers::WIPOffset<TypeAliases<'bldr>>1689     pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
1690         _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
1691         args: &'args TypeAliasesArgs<'args>) -> flatbuffers::WIPOffset<TypeAliases<'bldr>> {
1692       let mut builder = TypeAliasesBuilder::new(_fbb);
1693       builder.add_f64_(args.f64_);
1694       builder.add_u64_(args.u64_);
1695       builder.add_i64_(args.i64_);
1696       if let Some(x) = args.vf64 { builder.add_vf64(x); }
1697       if let Some(x) = args.v8 { builder.add_v8(x); }
1698       builder.add_f32_(args.f32_);
1699       builder.add_u32_(args.u32_);
1700       builder.add_i32_(args.i32_);
1701       builder.add_u16_(args.u16_);
1702       builder.add_i16_(args.i16_);
1703       builder.add_u8_(args.u8_);
1704       builder.add_i8_(args.i8_);
1705       builder.finish()
1706     }
1707 
1708     pub const VT_I8_: flatbuffers::VOffsetT = 4;
1709     pub const VT_U8_: flatbuffers::VOffsetT = 6;
1710     pub const VT_I16_: flatbuffers::VOffsetT = 8;
1711     pub const VT_U16_: flatbuffers::VOffsetT = 10;
1712     pub const VT_I32_: flatbuffers::VOffsetT = 12;
1713     pub const VT_U32_: flatbuffers::VOffsetT = 14;
1714     pub const VT_I64_: flatbuffers::VOffsetT = 16;
1715     pub const VT_U64_: flatbuffers::VOffsetT = 18;
1716     pub const VT_F32_: flatbuffers::VOffsetT = 20;
1717     pub const VT_F64_: flatbuffers::VOffsetT = 22;
1718     pub const VT_V8: flatbuffers::VOffsetT = 24;
1719     pub const VT_VF64: flatbuffers::VOffsetT = 26;
1720 
1721   #[inline]
i8_(&self) -> i81722   pub fn i8_(&self) -> i8 {
1723     self._tab.get::<i8>(TypeAliases::VT_I8_, Some(0)).unwrap()
1724   }
1725   #[inline]
u8_(&self) -> u81726   pub fn u8_(&self) -> u8 {
1727     self._tab.get::<u8>(TypeAliases::VT_U8_, Some(0)).unwrap()
1728   }
1729   #[inline]
i16_(&self) -> i161730   pub fn i16_(&self) -> i16 {
1731     self._tab.get::<i16>(TypeAliases::VT_I16_, Some(0)).unwrap()
1732   }
1733   #[inline]
u16_(&self) -> u161734   pub fn u16_(&self) -> u16 {
1735     self._tab.get::<u16>(TypeAliases::VT_U16_, Some(0)).unwrap()
1736   }
1737   #[inline]
i32_(&self) -> i321738   pub fn i32_(&self) -> i32 {
1739     self._tab.get::<i32>(TypeAliases::VT_I32_, Some(0)).unwrap()
1740   }
1741   #[inline]
u32_(&self) -> u321742   pub fn u32_(&self) -> u32 {
1743     self._tab.get::<u32>(TypeAliases::VT_U32_, Some(0)).unwrap()
1744   }
1745   #[inline]
i64_(&self) -> i641746   pub fn i64_(&self) -> i64 {
1747     self._tab.get::<i64>(TypeAliases::VT_I64_, Some(0)).unwrap()
1748   }
1749   #[inline]
u64_(&self) -> u641750   pub fn u64_(&self) -> u64 {
1751     self._tab.get::<u64>(TypeAliases::VT_U64_, Some(0)).unwrap()
1752   }
1753   #[inline]
f32_(&self) -> f321754   pub fn f32_(&self) -> f32 {
1755     self._tab.get::<f32>(TypeAliases::VT_F32_, Some(0.0)).unwrap()
1756   }
1757   #[inline]
f64_(&self) -> f641758   pub fn f64_(&self) -> f64 {
1759     self._tab.get::<f64>(TypeAliases::VT_F64_, Some(0.0)).unwrap()
1760   }
1761   #[inline]
v8(&self) -> Option<&'a [i8]>1762   pub fn v8(&self) -> Option<&'a [i8]> {
1763     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i8>>>(TypeAliases::VT_V8, None).map(|v| v.safe_slice())
1764   }
1765   #[inline]
vf64(&self) -> Option<flatbuffers::Vector<'a, f64>>1766   pub fn vf64(&self) -> Option<flatbuffers::Vector<'a, f64>> {
1767     self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f64>>>(TypeAliases::VT_VF64, None)
1768   }
1769 }
1770 
1771 pub struct TypeAliasesArgs<'a> {
1772     pub i8_: i8,
1773     pub u8_: u8,
1774     pub i16_: i16,
1775     pub u16_: u16,
1776     pub i32_: i32,
1777     pub u32_: u32,
1778     pub i64_: i64,
1779     pub u64_: u64,
1780     pub f32_: f32,
1781     pub f64_: f64,
1782     pub v8: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a ,  i8>>>,
1783     pub vf64: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a ,  f64>>>,
1784 }
1785 impl<'a> Default for TypeAliasesArgs<'a> {
1786     #[inline]
default() -> Self1787     fn default() -> Self {
1788         TypeAliasesArgs {
1789             i8_: 0,
1790             u8_: 0,
1791             i16_: 0,
1792             u16_: 0,
1793             i32_: 0,
1794             u32_: 0,
1795             i64_: 0,
1796             u64_: 0,
1797             f32_: 0.0,
1798             f64_: 0.0,
1799             v8: None,
1800             vf64: None,
1801         }
1802     }
1803 }
1804 pub struct TypeAliasesBuilder<'a: 'b, 'b> {
1805   fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
1806   start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1807 }
1808 impl<'a: 'b, 'b> TypeAliasesBuilder<'a, 'b> {
1809   #[inline]
add_i8_(&mut self, i8_: i8)1810   pub fn add_i8_(&mut self, i8_: i8) {
1811     self.fbb_.push_slot::<i8>(TypeAliases::VT_I8_, i8_, 0);
1812   }
1813   #[inline]
add_u8_(&mut self, u8_: u8)1814   pub fn add_u8_(&mut self, u8_: u8) {
1815     self.fbb_.push_slot::<u8>(TypeAliases::VT_U8_, u8_, 0);
1816   }
1817   #[inline]
add_i16_(&mut self, i16_: i16)1818   pub fn add_i16_(&mut self, i16_: i16) {
1819     self.fbb_.push_slot::<i16>(TypeAliases::VT_I16_, i16_, 0);
1820   }
1821   #[inline]
add_u16_(&mut self, u16_: u16)1822   pub fn add_u16_(&mut self, u16_: u16) {
1823     self.fbb_.push_slot::<u16>(TypeAliases::VT_U16_, u16_, 0);
1824   }
1825   #[inline]
add_i32_(&mut self, i32_: i32)1826   pub fn add_i32_(&mut self, i32_: i32) {
1827     self.fbb_.push_slot::<i32>(TypeAliases::VT_I32_, i32_, 0);
1828   }
1829   #[inline]
add_u32_(&mut self, u32_: u32)1830   pub fn add_u32_(&mut self, u32_: u32) {
1831     self.fbb_.push_slot::<u32>(TypeAliases::VT_U32_, u32_, 0);
1832   }
1833   #[inline]
add_i64_(&mut self, i64_: i64)1834   pub fn add_i64_(&mut self, i64_: i64) {
1835     self.fbb_.push_slot::<i64>(TypeAliases::VT_I64_, i64_, 0);
1836   }
1837   #[inline]
add_u64_(&mut self, u64_: u64)1838   pub fn add_u64_(&mut self, u64_: u64) {
1839     self.fbb_.push_slot::<u64>(TypeAliases::VT_U64_, u64_, 0);
1840   }
1841   #[inline]
add_f32_(&mut self, f32_: f32)1842   pub fn add_f32_(&mut self, f32_: f32) {
1843     self.fbb_.push_slot::<f32>(TypeAliases::VT_F32_, f32_, 0.0);
1844   }
1845   #[inline]
add_f64_(&mut self, f64_: f64)1846   pub fn add_f64_(&mut self, f64_: f64) {
1847     self.fbb_.push_slot::<f64>(TypeAliases::VT_F64_, f64_, 0.0);
1848   }
1849   #[inline]
add_v8(&mut self, v8: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i8>>)1850   pub fn add_v8(&mut self, v8: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i8>>) {
1851     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TypeAliases::VT_V8, v8);
1852   }
1853   #[inline]
add_vf64(&mut self, vf64: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f64>>)1854   pub fn add_vf64(&mut self, vf64: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f64>>) {
1855     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TypeAliases::VT_VF64, vf64);
1856   }
1857   #[inline]
new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TypeAliasesBuilder<'a, 'b>1858   pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TypeAliasesBuilder<'a, 'b> {
1859     let start = _fbb.start_table();
1860     TypeAliasesBuilder {
1861       fbb_: _fbb,
1862       start_: start,
1863     }
1864   }
1865   #[inline]
finish(self) -> flatbuffers::WIPOffset<TypeAliases<'a>>1866   pub fn finish(self) -> flatbuffers::WIPOffset<TypeAliases<'a>> {
1867     let o = self.fbb_.end_table(self.start_);
1868     flatbuffers::WIPOffset::new(o.value())
1869   }
1870 }
1871 
1872 #[inline]
get_root_as_monster<'a>(buf: &'a [u8]) -> Monster<'a>1873 pub fn get_root_as_monster<'a>(buf: &'a [u8]) -> Monster<'a> {
1874   flatbuffers::get_root::<Monster<'a>>(buf)
1875 }
1876 
1877 #[inline]
get_size_prefixed_root_as_monster<'a>(buf: &'a [u8]) -> Monster<'a>1878 pub fn get_size_prefixed_root_as_monster<'a>(buf: &'a [u8]) -> Monster<'a> {
1879   flatbuffers::get_size_prefixed_root::<Monster<'a>>(buf)
1880 }
1881 
1882 pub const MONSTER_IDENTIFIER: &'static str = "MONS";
1883 
1884 #[inline]
monster_buffer_has_identifier(buf: &[u8]) -> bool1885 pub fn monster_buffer_has_identifier(buf: &[u8]) -> bool {
1886   return flatbuffers::buffer_has_identifier(buf, MONSTER_IDENTIFIER, false);
1887 }
1888 
1889 #[inline]
monster_size_prefixed_buffer_has_identifier(buf: &[u8]) -> bool1890 pub fn monster_size_prefixed_buffer_has_identifier(buf: &[u8]) -> bool {
1891   return flatbuffers::buffer_has_identifier(buf, MONSTER_IDENTIFIER, true);
1892 }
1893 
1894 pub const MONSTER_EXTENSION: &'static str = "mon";
1895 
1896 #[inline]
finish_monster_buffer<'a, 'b>( fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>, root: flatbuffers::WIPOffset<Monster<'a>>)1897 pub fn finish_monster_buffer<'a, 'b>(
1898     fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
1899     root: flatbuffers::WIPOffset<Monster<'a>>) {
1900   fbb.finish(root, Some(MONSTER_IDENTIFIER));
1901 }
1902 
1903 #[inline]
finish_size_prefixed_monster_buffer<'a, 'b>(fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>, root: flatbuffers::WIPOffset<Monster<'a>>)1904 pub fn finish_size_prefixed_monster_buffer<'a, 'b>(fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>, root: flatbuffers::WIPOffset<Monster<'a>>) {
1905   fbb.finish_size_prefixed(root, Some(MONSTER_IDENTIFIER));
1906 }
1907 }  // pub mod Example
1908 }  // pub mod MyGame
1909 
1910