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