1extern crate alloc;
4
5
6#[allow(unused_imports, dead_code)]
7pub mod ss {
8extern crate alloc;
9
10#[allow(unused_imports, dead_code)]
11pub mod format {
12extern crate alloc;
13
14
15#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
16pub const ENUM_MIN_TEX_FILTER_MODE: u8 = 0;
17#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
18pub const ENUM_MAX_TEX_FILTER_MODE: u8 = 1;
19#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
20#[allow(non_camel_case_types)]
21pub const ENUM_VALUES_TEX_FILTER_MODE: [TexFilterMode; 2] = [
22 TexFilterMode::Nearest,
23 TexFilterMode::Linear,
24];
25
26#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
27#[repr(transparent)]
28pub struct TexFilterMode(pub u8);
29#[allow(non_upper_case_globals)]
30impl TexFilterMode {
31 pub const Nearest: Self = Self(0);
32 pub const Linear: Self = Self(1);
33
34 pub const ENUM_MIN: u8 = 0;
35 pub const ENUM_MAX: u8 = 1;
36 pub const ENUM_VALUES: &'static [Self] = &[
37 Self::Nearest,
38 Self::Linear,
39 ];
40 pub fn variant_name(self) -> Option<&'static str> {
42 match self {
43 Self::Nearest => Some("Nearest"),
44 Self::Linear => Some("Linear"),
45 _ => None,
46 }
47 }
48}
49impl ::core::fmt::Debug for TexFilterMode {
50 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
51 if let Some(name) = self.variant_name() {
52 f.write_str(name)
53 } else {
54 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
55 }
56 }
57}
58impl<'a> ::flatbuffers::Follow<'a> for TexFilterMode {
59 type Inner = Self;
60 #[inline]
61 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
62 let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
63 Self(b)
64 }
65}
66
67impl ::flatbuffers::Push for TexFilterMode {
68 type Output = TexFilterMode;
69 #[inline]
70 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
71 unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
72 }
73}
74
75impl ::flatbuffers::EndianScalar for TexFilterMode {
76 type Scalar = u8;
77 #[inline]
78 fn to_little_endian(self) -> u8 {
79 self.0.to_le()
80 }
81 #[inline]
82 #[allow(clippy::wrong_self_convention)]
83 fn from_little_endian(v: u8) -> Self {
84 let b = u8::from_le(v);
85 Self(b)
86 }
87}
88
89impl<'a> ::flatbuffers::Verifiable for TexFilterMode {
90 #[inline]
91 fn run_verifier(
92 v: &mut ::flatbuffers::Verifier, pos: usize
93 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
94 u8::run_verifier(v, pos)
95 }
96}
97
98impl ::flatbuffers::SimpleToVerifyInSlice for TexFilterMode {}
99#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
100pub const ENUM_MIN_RENDER_BLEND_TYPE: u8 = 0;
101#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
102pub const ENUM_MAX_RENDER_BLEND_TYPE: u8 = 1;
103#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
104#[allow(non_camel_case_types)]
105pub const ENUM_VALUES_RENDER_BLEND_TYPE: [RenderBlendType; 2] = [
106 RenderBlendType::Mix,
107 RenderBlendType::Add,
108];
109
110#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
111#[repr(transparent)]
112pub struct RenderBlendType(pub u8);
113#[allow(non_upper_case_globals)]
114impl RenderBlendType {
115 pub const Mix: Self = Self(0);
116 pub const Add: Self = Self(1);
117
118 pub const ENUM_MIN: u8 = 0;
119 pub const ENUM_MAX: u8 = 1;
120 pub const ENUM_VALUES: &'static [Self] = &[
121 Self::Mix,
122 Self::Add,
123 ];
124 pub fn variant_name(self) -> Option<&'static str> {
126 match self {
127 Self::Mix => Some("Mix"),
128 Self::Add => Some("Add"),
129 _ => None,
130 }
131 }
132}
133impl ::core::fmt::Debug for RenderBlendType {
134 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
135 if let Some(name) = self.variant_name() {
136 f.write_str(name)
137 } else {
138 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
139 }
140 }
141}
142impl<'a> ::flatbuffers::Follow<'a> for RenderBlendType {
143 type Inner = Self;
144 #[inline]
145 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
146 let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
147 Self(b)
148 }
149}
150
151impl ::flatbuffers::Push for RenderBlendType {
152 type Output = RenderBlendType;
153 #[inline]
154 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
155 unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
156 }
157}
158
159impl ::flatbuffers::EndianScalar for RenderBlendType {
160 type Scalar = u8;
161 #[inline]
162 fn to_little_endian(self) -> u8 {
163 self.0.to_le()
164 }
165 #[inline]
166 #[allow(clippy::wrong_self_convention)]
167 fn from_little_endian(v: u8) -> Self {
168 let b = u8::from_le(v);
169 Self(b)
170 }
171}
172
173impl<'a> ::flatbuffers::Verifiable for RenderBlendType {
174 #[inline]
175 fn run_verifier(
176 v: &mut ::flatbuffers::Verifier, pos: usize
177 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
178 u8::run_verifier(v, pos)
179 }
180}
181
182impl ::flatbuffers::SimpleToVerifyInSlice for RenderBlendType {}
183#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
184pub const ENUM_MIN_TEX_WRAP_MODE: u8 = 0;
185#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
186pub const ENUM_MAX_TEX_WRAP_MODE: u8 = 2;
187#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
188#[allow(non_camel_case_types)]
189pub const ENUM_VALUES_TEX_WRAP_MODE: [TexWrapMode; 3] = [
190 TexWrapMode::Clamp,
191 TexWrapMode::Repeat,
192 TexWrapMode::Mirror,
193];
194
195#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
196#[repr(transparent)]
197pub struct TexWrapMode(pub u8);
198#[allow(non_upper_case_globals)]
199impl TexWrapMode {
200 pub const Clamp: Self = Self(0);
201 pub const Repeat: Self = Self(1);
202 pub const Mirror: Self = Self(2);
203
204 pub const ENUM_MIN: u8 = 0;
205 pub const ENUM_MAX: u8 = 2;
206 pub const ENUM_VALUES: &'static [Self] = &[
207 Self::Clamp,
208 Self::Repeat,
209 Self::Mirror,
210 ];
211 pub fn variant_name(self) -> Option<&'static str> {
213 match self {
214 Self::Clamp => Some("Clamp"),
215 Self::Repeat => Some("Repeat"),
216 Self::Mirror => Some("Mirror"),
217 _ => None,
218 }
219 }
220}
221impl ::core::fmt::Debug for TexWrapMode {
222 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
223 if let Some(name) = self.variant_name() {
224 f.write_str(name)
225 } else {
226 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
227 }
228 }
229}
230impl<'a> ::flatbuffers::Follow<'a> for TexWrapMode {
231 type Inner = Self;
232 #[inline]
233 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
234 let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
235 Self(b)
236 }
237}
238
239impl ::flatbuffers::Push for TexWrapMode {
240 type Output = TexWrapMode;
241 #[inline]
242 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
243 unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
244 }
245}
246
247impl ::flatbuffers::EndianScalar for TexWrapMode {
248 type Scalar = u8;
249 #[inline]
250 fn to_little_endian(self) -> u8 {
251 self.0.to_le()
252 }
253 #[inline]
254 #[allow(clippy::wrong_self_convention)]
255 fn from_little_endian(v: u8) -> Self {
256 let b = u8::from_le(v);
257 Self(b)
258 }
259}
260
261impl<'a> ::flatbuffers::Verifiable for TexWrapMode {
262 #[inline]
263 fn run_verifier(
264 v: &mut ::flatbuffers::Verifier, pos: usize
265 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
266 u8::run_verifier(v, pos)
267 }
268}
269
270impl ::flatbuffers::SimpleToVerifyInSlice for TexWrapMode {}
271#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
272pub const ENUM_MIN_MESH_DIV_TYPE: u8 = 0;
273#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
274pub const ENUM_MAX_MESH_DIV_TYPE: u8 = 2;
275#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
276#[allow(non_camel_case_types)]
277pub const ENUM_VALUES_MESH_DIV_TYPE: [MeshDivType; 3] = [
278 MeshDivType::Unknown,
279 MeshDivType::PolylineBase,
280 MeshDivType::Boxdiv,
281];
282
283#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
284#[repr(transparent)]
285pub struct MeshDivType(pub u8);
286#[allow(non_upper_case_globals)]
287impl MeshDivType {
288 pub const Unknown: Self = Self(0);
289 pub const PolylineBase: Self = Self(1);
290 pub const Boxdiv: Self = Self(2);
291
292 pub const ENUM_MIN: u8 = 0;
293 pub const ENUM_MAX: u8 = 2;
294 pub const ENUM_VALUES: &'static [Self] = &[
295 Self::Unknown,
296 Self::PolylineBase,
297 Self::Boxdiv,
298 ];
299 pub fn variant_name(self) -> Option<&'static str> {
301 match self {
302 Self::Unknown => Some("Unknown"),
303 Self::PolylineBase => Some("PolylineBase"),
304 Self::Boxdiv => Some("Boxdiv"),
305 _ => None,
306 }
307 }
308}
309impl ::core::fmt::Debug for MeshDivType {
310 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
311 if let Some(name) = self.variant_name() {
312 f.write_str(name)
313 } else {
314 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
315 }
316 }
317}
318impl<'a> ::flatbuffers::Follow<'a> for MeshDivType {
319 type Inner = Self;
320 #[inline]
321 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
322 let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
323 Self(b)
324 }
325}
326
327impl ::flatbuffers::Push for MeshDivType {
328 type Output = MeshDivType;
329 #[inline]
330 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
331 unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
332 }
333}
334
335impl ::flatbuffers::EndianScalar for MeshDivType {
336 type Scalar = u8;
337 #[inline]
338 fn to_little_endian(self) -> u8 {
339 self.0.to_le()
340 }
341 #[inline]
342 #[allow(clippy::wrong_self_convention)]
343 fn from_little_endian(v: u8) -> Self {
344 let b = u8::from_le(v);
345 Self(b)
346 }
347}
348
349impl<'a> ::flatbuffers::Verifiable for MeshDivType {
350 #[inline]
351 fn run_verifier(
352 v: &mut ::flatbuffers::Verifier, pos: usize
353 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
354 u8::run_verifier(v, pos)
355 }
356}
357
358impl ::flatbuffers::SimpleToVerifyInSlice for MeshDivType {}
359#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
360pub const ENUM_MIN_BOUNDS_TYPE: u8 = 0;
361#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
362pub const ENUM_MAX_BOUNDS_TYPE: u8 = 5;
363#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
364#[allow(non_camel_case_types)]
365pub const ENUM_VALUES_BOUNDS_TYPE: [BoundsType; 6] = [
366 BoundsType::None,
367 BoundsType::Quad,
368 BoundsType::Aabb,
369 BoundsType::Circle,
370 BoundsType::CircleSmin,
371 BoundsType::CircleSmax,
372];
373
374#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
375#[repr(transparent)]
376pub struct BoundsType(pub u8);
377#[allow(non_upper_case_globals)]
378impl BoundsType {
379 pub const None: Self = Self(0);
380 pub const Quad: Self = Self(1);
381 pub const Aabb: Self = Self(2);
382 pub const Circle: Self = Self(3);
383 pub const CircleSmin: Self = Self(4);
384 pub const CircleSmax: Self = Self(5);
385
386 pub const ENUM_MIN: u8 = 0;
387 pub const ENUM_MAX: u8 = 5;
388 pub const ENUM_VALUES: &'static [Self] = &[
389 Self::None,
390 Self::Quad,
391 Self::Aabb,
392 Self::Circle,
393 Self::CircleSmin,
394 Self::CircleSmax,
395 ];
396 pub fn variant_name(self) -> Option<&'static str> {
398 match self {
399 Self::None => Some("None"),
400 Self::Quad => Some("Quad"),
401 Self::Aabb => Some("Aabb"),
402 Self::Circle => Some("Circle"),
403 Self::CircleSmin => Some("CircleSmin"),
404 Self::CircleSmax => Some("CircleSmax"),
405 _ => None,
406 }
407 }
408}
409impl ::core::fmt::Debug for BoundsType {
410 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
411 if let Some(name) = self.variant_name() {
412 f.write_str(name)
413 } else {
414 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
415 }
416 }
417}
418impl<'a> ::flatbuffers::Follow<'a> for BoundsType {
419 type Inner = Self;
420 #[inline]
421 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
422 let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
423 Self(b)
424 }
425}
426
427impl ::flatbuffers::Push for BoundsType {
428 type Output = BoundsType;
429 #[inline]
430 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
431 unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
432 }
433}
434
435impl ::flatbuffers::EndianScalar for BoundsType {
436 type Scalar = u8;
437 #[inline]
438 fn to_little_endian(self) -> u8 {
439 self.0.to_le()
440 }
441 #[inline]
442 #[allow(clippy::wrong_self_convention)]
443 fn from_little_endian(v: u8) -> Self {
444 let b = u8::from_le(v);
445 Self(b)
446 }
447}
448
449impl<'a> ::flatbuffers::Verifiable for BoundsType {
450 #[inline]
451 fn run_verifier(
452 v: &mut ::flatbuffers::Verifier, pos: usize
453 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
454 u8::run_verifier(v, pos)
455 }
456}
457
458impl ::flatbuffers::SimpleToVerifyInSlice for BoundsType {}
459#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
460pub const ENUM_MIN_INHERIT_TYPE: u8 = 0;
461#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
462pub const ENUM_MAX_INHERIT_TYPE: u8 = 1;
463#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
464#[allow(non_camel_case_types)]
465pub const ENUM_VALUES_INHERIT_TYPE: [InheritType; 2] = [
466 InheritType::Parent,
467 InheritType::Self_,
468];
469
470#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
471#[repr(transparent)]
472pub struct InheritType(pub u8);
473#[allow(non_upper_case_globals)]
474impl InheritType {
475 pub const Parent: Self = Self(0);
476 pub const Self_: Self = Self(1);
477
478 pub const ENUM_MIN: u8 = 0;
479 pub const ENUM_MAX: u8 = 1;
480 pub const ENUM_VALUES: &'static [Self] = &[
481 Self::Parent,
482 Self::Self_,
483 ];
484 pub fn variant_name(self) -> Option<&'static str> {
486 match self {
487 Self::Parent => Some("Parent"),
488 Self::Self_ => Some("Self_"),
489 _ => None,
490 }
491 }
492}
493impl ::core::fmt::Debug for InheritType {
494 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
495 if let Some(name) = self.variant_name() {
496 f.write_str(name)
497 } else {
498 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
499 }
500 }
501}
502impl<'a> ::flatbuffers::Follow<'a> for InheritType {
503 type Inner = Self;
504 #[inline]
505 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
506 let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
507 Self(b)
508 }
509}
510
511impl ::flatbuffers::Push for InheritType {
512 type Output = InheritType;
513 #[inline]
514 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
515 unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
516 }
517}
518
519impl ::flatbuffers::EndianScalar for InheritType {
520 type Scalar = u8;
521 #[inline]
522 fn to_little_endian(self) -> u8 {
523 self.0.to_le()
524 }
525 #[inline]
526 #[allow(clippy::wrong_self_convention)]
527 fn from_little_endian(v: u8) -> Self {
528 let b = u8::from_le(v);
529 Self(b)
530 }
531}
532
533impl<'a> ::flatbuffers::Verifiable for InheritType {
534 #[inline]
535 fn run_verifier(
536 v: &mut ::flatbuffers::Verifier, pos: usize
537 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
538 u8::run_verifier(v, pos)
539 }
540}
541
542impl ::flatbuffers::SimpleToVerifyInSlice for InheritType {}
543#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
544pub const ENUM_MIN_BLEND_TYPE: u8 = 0;
545#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
546pub const ENUM_MAX_BLEND_TYPE: u8 = 11;
547#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
548#[allow(non_camel_case_types)]
549pub const ENUM_VALUES_BLEND_TYPE: [BlendType; 12] = [
550 BlendType::Mix,
551 BlendType::Mul,
552 BlendType::Add,
553 BlendType::Sub,
554 BlendType::Mulalpha,
555 BlendType::Screen,
556 BlendType::Exclusion,
557 BlendType::Invert,
558 BlendType::Mul2,
559 BlendType::Div2,
560 BlendType::Screen2,
561 BlendType::Overlay2,
562];
563
564#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
565#[repr(transparent)]
566pub struct BlendType(pub u8);
567#[allow(non_upper_case_globals)]
568impl BlendType {
569 pub const Mix: Self = Self(0);
570 pub const Mul: Self = Self(1);
571 pub const Add: Self = Self(2);
572 pub const Sub: Self = Self(3);
573 pub const Mulalpha: Self = Self(4);
574 pub const Screen: Self = Self(5);
575 pub const Exclusion: Self = Self(6);
576 pub const Invert: Self = Self(7);
577 pub const Mul2: Self = Self(8);
578 pub const Div2: Self = Self(9);
579 pub const Screen2: Self = Self(10);
580 pub const Overlay2: Self = Self(11);
581
582 pub const ENUM_MIN: u8 = 0;
583 pub const ENUM_MAX: u8 = 11;
584 pub const ENUM_VALUES: &'static [Self] = &[
585 Self::Mix,
586 Self::Mul,
587 Self::Add,
588 Self::Sub,
589 Self::Mulalpha,
590 Self::Screen,
591 Self::Exclusion,
592 Self::Invert,
593 Self::Mul2,
594 Self::Div2,
595 Self::Screen2,
596 Self::Overlay2,
597 ];
598 pub fn variant_name(self) -> Option<&'static str> {
600 match self {
601 Self::Mix => Some("Mix"),
602 Self::Mul => Some("Mul"),
603 Self::Add => Some("Add"),
604 Self::Sub => Some("Sub"),
605 Self::Mulalpha => Some("Mulalpha"),
606 Self::Screen => Some("Screen"),
607 Self::Exclusion => Some("Exclusion"),
608 Self::Invert => Some("Invert"),
609 Self::Mul2 => Some("Mul2"),
610 Self::Div2 => Some("Div2"),
611 Self::Screen2 => Some("Screen2"),
612 Self::Overlay2 => Some("Overlay2"),
613 _ => None,
614 }
615 }
616}
617impl ::core::fmt::Debug for BlendType {
618 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
619 if let Some(name) = self.variant_name() {
620 f.write_str(name)
621 } else {
622 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
623 }
624 }
625}
626impl<'a> ::flatbuffers::Follow<'a> for BlendType {
627 type Inner = Self;
628 #[inline]
629 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
630 let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
631 Self(b)
632 }
633}
634
635impl ::flatbuffers::Push for BlendType {
636 type Output = BlendType;
637 #[inline]
638 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
639 unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
640 }
641}
642
643impl ::flatbuffers::EndianScalar for BlendType {
644 type Scalar = u8;
645 #[inline]
646 fn to_little_endian(self) -> u8 {
647 self.0.to_le()
648 }
649 #[inline]
650 #[allow(clippy::wrong_self_convention)]
651 fn from_little_endian(v: u8) -> Self {
652 let b = u8::from_le(v);
653 Self(b)
654 }
655}
656
657impl<'a> ::flatbuffers::Verifiable for BlendType {
658 #[inline]
659 fn run_verifier(
660 v: &mut ::flatbuffers::Verifier, pos: usize
661 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
662 u8::run_verifier(v, pos)
663 }
664}
665
666impl ::flatbuffers::SimpleToVerifyInSlice for BlendType {}
667#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
668pub const ENUM_MIN_INTERPOLATION_TYPE: u8 = 0;
669#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
670pub const ENUM_MAX_INTERPOLATION_TYPE: u8 = 23;
671#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
672#[allow(non_camel_case_types)]
673pub const ENUM_VALUES_INTERPOLATION_TYPE: [InterpolationType; 24] = [
674 InterpolationType::None,
675 InterpolationType::Linear,
676 InterpolationType::Hermite,
677 InterpolationType::Bezier,
678 InterpolationType::Acceleration,
679 InterpolationType::Deceleration,
680 InterpolationType::EaseIn,
681 InterpolationType::EaseOut,
682 InterpolationType::EaseInOut,
683 InterpolationType::EaseExponentialIn,
684 InterpolationType::EaseExponentialOut,
685 InterpolationType::EaseExponentialInOut,
686 InterpolationType::EaseSineIn,
687 InterpolationType::EaseSineOut,
688 InterpolationType::EaseSineInOut,
689 InterpolationType::EaseElasticIn,
690 InterpolationType::EaseElasticOut,
691 InterpolationType::EaseElasticInOut,
692 InterpolationType::EaseBounceIn,
693 InterpolationType::EaseBounceOut,
694 InterpolationType::EaseBounceInOut,
695 InterpolationType::EaseBackIn,
696 InterpolationType::EaseBackOut,
697 InterpolationType::EaseBackInOut,
698];
699
700#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
701#[repr(transparent)]
702pub struct InterpolationType(pub u8);
703#[allow(non_upper_case_globals)]
704impl InterpolationType {
705 pub const None: Self = Self(0);
706 pub const Linear: Self = Self(1);
707 pub const Hermite: Self = Self(2);
708 pub const Bezier: Self = Self(3);
709 pub const Acceleration: Self = Self(4);
710 pub const Deceleration: Self = Self(5);
711 pub const EaseIn: Self = Self(6);
712 pub const EaseOut: Self = Self(7);
713 pub const EaseInOut: Self = Self(8);
714 pub const EaseExponentialIn: Self = Self(9);
715 pub const EaseExponentialOut: Self = Self(10);
716 pub const EaseExponentialInOut: Self = Self(11);
717 pub const EaseSineIn: Self = Self(12);
718 pub const EaseSineOut: Self = Self(13);
719 pub const EaseSineInOut: Self = Self(14);
720 pub const EaseElasticIn: Self = Self(15);
721 pub const EaseElasticOut: Self = Self(16);
722 pub const EaseElasticInOut: Self = Self(17);
723 pub const EaseBounceIn: Self = Self(18);
724 pub const EaseBounceOut: Self = Self(19);
725 pub const EaseBounceInOut: Self = Self(20);
726 pub const EaseBackIn: Self = Self(21);
727 pub const EaseBackOut: Self = Self(22);
728 pub const EaseBackInOut: Self = Self(23);
729
730 pub const ENUM_MIN: u8 = 0;
731 pub const ENUM_MAX: u8 = 23;
732 pub const ENUM_VALUES: &'static [Self] = &[
733 Self::None,
734 Self::Linear,
735 Self::Hermite,
736 Self::Bezier,
737 Self::Acceleration,
738 Self::Deceleration,
739 Self::EaseIn,
740 Self::EaseOut,
741 Self::EaseInOut,
742 Self::EaseExponentialIn,
743 Self::EaseExponentialOut,
744 Self::EaseExponentialInOut,
745 Self::EaseSineIn,
746 Self::EaseSineOut,
747 Self::EaseSineInOut,
748 Self::EaseElasticIn,
749 Self::EaseElasticOut,
750 Self::EaseElasticInOut,
751 Self::EaseBounceIn,
752 Self::EaseBounceOut,
753 Self::EaseBounceInOut,
754 Self::EaseBackIn,
755 Self::EaseBackOut,
756 Self::EaseBackInOut,
757 ];
758 pub fn variant_name(self) -> Option<&'static str> {
760 match self {
761 Self::None => Some("None"),
762 Self::Linear => Some("Linear"),
763 Self::Hermite => Some("Hermite"),
764 Self::Bezier => Some("Bezier"),
765 Self::Acceleration => Some("Acceleration"),
766 Self::Deceleration => Some("Deceleration"),
767 Self::EaseIn => Some("EaseIn"),
768 Self::EaseOut => Some("EaseOut"),
769 Self::EaseInOut => Some("EaseInOut"),
770 Self::EaseExponentialIn => Some("EaseExponentialIn"),
771 Self::EaseExponentialOut => Some("EaseExponentialOut"),
772 Self::EaseExponentialInOut => Some("EaseExponentialInOut"),
773 Self::EaseSineIn => Some("EaseSineIn"),
774 Self::EaseSineOut => Some("EaseSineOut"),
775 Self::EaseSineInOut => Some("EaseSineInOut"),
776 Self::EaseElasticIn => Some("EaseElasticIn"),
777 Self::EaseElasticOut => Some("EaseElasticOut"),
778 Self::EaseElasticInOut => Some("EaseElasticInOut"),
779 Self::EaseBounceIn => Some("EaseBounceIn"),
780 Self::EaseBounceOut => Some("EaseBounceOut"),
781 Self::EaseBounceInOut => Some("EaseBounceInOut"),
782 Self::EaseBackIn => Some("EaseBackIn"),
783 Self::EaseBackOut => Some("EaseBackOut"),
784 Self::EaseBackInOut => Some("EaseBackInOut"),
785 _ => None,
786 }
787 }
788}
789impl ::core::fmt::Debug for InterpolationType {
790 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
791 if let Some(name) = self.variant_name() {
792 f.write_str(name)
793 } else {
794 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
795 }
796 }
797}
798impl<'a> ::flatbuffers::Follow<'a> for InterpolationType {
799 type Inner = Self;
800 #[inline]
801 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
802 let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
803 Self(b)
804 }
805}
806
807impl ::flatbuffers::Push for InterpolationType {
808 type Output = InterpolationType;
809 #[inline]
810 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
811 unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
812 }
813}
814
815impl ::flatbuffers::EndianScalar for InterpolationType {
816 type Scalar = u8;
817 #[inline]
818 fn to_little_endian(self) -> u8 {
819 self.0.to_le()
820 }
821 #[inline]
822 #[allow(clippy::wrong_self_convention)]
823 fn from_little_endian(v: u8) -> Self {
824 let b = u8::from_le(v);
825 Self(b)
826 }
827}
828
829impl<'a> ::flatbuffers::Verifiable for InterpolationType {
830 #[inline]
831 fn run_verifier(
832 v: &mut ::flatbuffers::Verifier, pos: usize
833 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
834 u8::run_verifier(v, pos)
835 }
836}
837
838impl ::flatbuffers::SimpleToVerifyInSlice for InterpolationType {}
839#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
840pub const ENUM_MIN_EFFECT_NODE_TYPE: u8 = 0;
841#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
842pub const ENUM_MAX_EFFECT_NODE_TYPE: u8 = 2;
843#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
844#[allow(non_camel_case_types)]
845pub const ENUM_VALUES_EFFECT_NODE_TYPE: [EffectNodeType; 3] = [
846 EffectNodeType::Root,
847 EffectNodeType::Emitter,
848 EffectNodeType::Particle,
849];
850
851#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
852#[repr(transparent)]
853pub struct EffectNodeType(pub u8);
854#[allow(non_upper_case_globals)]
855impl EffectNodeType {
856 pub const Root: Self = Self(0);
857 pub const Emitter: Self = Self(1);
858 pub const Particle: Self = Self(2);
859
860 pub const ENUM_MIN: u8 = 0;
861 pub const ENUM_MAX: u8 = 2;
862 pub const ENUM_VALUES: &'static [Self] = &[
863 Self::Root,
864 Self::Emitter,
865 Self::Particle,
866 ];
867 pub fn variant_name(self) -> Option<&'static str> {
869 match self {
870 Self::Root => Some("Root"),
871 Self::Emitter => Some("Emitter"),
872 Self::Particle => Some("Particle"),
873 _ => None,
874 }
875 }
876}
877impl ::core::fmt::Debug for EffectNodeType {
878 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
879 if let Some(name) = self.variant_name() {
880 f.write_str(name)
881 } else {
882 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
883 }
884 }
885}
886impl<'a> ::flatbuffers::Follow<'a> for EffectNodeType {
887 type Inner = Self;
888 #[inline]
889 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
890 let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
891 Self(b)
892 }
893}
894
895impl ::flatbuffers::Push for EffectNodeType {
896 type Output = EffectNodeType;
897 #[inline]
898 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
899 unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
900 }
901}
902
903impl ::flatbuffers::EndianScalar for EffectNodeType {
904 type Scalar = u8;
905 #[inline]
906 fn to_little_endian(self) -> u8 {
907 self.0.to_le()
908 }
909 #[inline]
910 #[allow(clippy::wrong_self_convention)]
911 fn from_little_endian(v: u8) -> Self {
912 let b = u8::from_le(v);
913 Self(b)
914 }
915}
916
917impl<'a> ::flatbuffers::Verifiable for EffectNodeType {
918 #[inline]
919 fn run_verifier(
920 v: &mut ::flatbuffers::Verifier, pos: usize
921 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
922 u8::run_verifier(v, pos)
923 }
924}
925
926impl ::flatbuffers::SimpleToVerifyInSlice for EffectNodeType {}
927#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
928pub const ENUM_MIN_EFFECT_NODE_BEHAVIOR: u8 = 0;
929#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
930pub const ENUM_MAX_EFFECT_NODE_BEHAVIOR: u8 = 17;
931#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
932#[allow(non_camel_case_types)]
933pub const ENUM_VALUES_EFFECT_NODE_BEHAVIOR: [EffectNodeBehavior; 18] = [
934 EffectNodeBehavior::NONE,
935 EffectNodeBehavior::EffectParticleElementBasic,
936 EffectNodeBehavior::EffectParticleElementRndSeedChange,
937 EffectNodeBehavior::EffectParticleElementDelay,
938 EffectNodeBehavior::EffectParticleElementGravity,
939 EffectNodeBehavior::EffectParticleElementPosition,
940 EffectNodeBehavior::EffectParticleElementRotation,
941 EffectNodeBehavior::EffectParticleElementRotationTrans,
942 EffectNodeBehavior::EffectParticleElementTransSpeed,
943 EffectNodeBehavior::EffectParticleElementTangentialAcceleration,
944 EffectNodeBehavior::EffectParticleElementInitColor,
945 EffectNodeBehavior::EffectParticleElementTransColor,
946 EffectNodeBehavior::EffectParticleElementAlphaFade,
947 EffectNodeBehavior::EffectParticleElementSize,
948 EffectNodeBehavior::EffectParticleElementTransSize,
949 EffectNodeBehavior::EffectParticlePointGravity,
950 EffectNodeBehavior::EffectParticleTurnToDirectionEnabled,
951 EffectNodeBehavior::EffectParticleInfiniteEmitEnabled,
952];
953
954#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
955#[repr(transparent)]
956pub struct EffectNodeBehavior(pub u8);
957#[allow(non_upper_case_globals)]
958impl EffectNodeBehavior {
959 pub const NONE: Self = Self(0);
960 pub const EffectParticleElementBasic: Self = Self(1);
961 pub const EffectParticleElementRndSeedChange: Self = Self(2);
962 pub const EffectParticleElementDelay: Self = Self(3);
963 pub const EffectParticleElementGravity: Self = Self(4);
964 pub const EffectParticleElementPosition: Self = Self(5);
965 pub const EffectParticleElementRotation: Self = Self(6);
966 pub const EffectParticleElementRotationTrans: Self = Self(7);
967 pub const EffectParticleElementTransSpeed: Self = Self(8);
968 pub const EffectParticleElementTangentialAcceleration: Self = Self(9);
969 pub const EffectParticleElementInitColor: Self = Self(10);
970 pub const EffectParticleElementTransColor: Self = Self(11);
971 pub const EffectParticleElementAlphaFade: Self = Self(12);
972 pub const EffectParticleElementSize: Self = Self(13);
973 pub const EffectParticleElementTransSize: Self = Self(14);
974 pub const EffectParticlePointGravity: Self = Self(15);
975 pub const EffectParticleTurnToDirectionEnabled: Self = Self(16);
976 pub const EffectParticleInfiniteEmitEnabled: Self = Self(17);
977
978 pub const ENUM_MIN: u8 = 0;
979 pub const ENUM_MAX: u8 = 17;
980 pub const ENUM_VALUES: &'static [Self] = &[
981 Self::NONE,
982 Self::EffectParticleElementBasic,
983 Self::EffectParticleElementRndSeedChange,
984 Self::EffectParticleElementDelay,
985 Self::EffectParticleElementGravity,
986 Self::EffectParticleElementPosition,
987 Self::EffectParticleElementRotation,
988 Self::EffectParticleElementRotationTrans,
989 Self::EffectParticleElementTransSpeed,
990 Self::EffectParticleElementTangentialAcceleration,
991 Self::EffectParticleElementInitColor,
992 Self::EffectParticleElementTransColor,
993 Self::EffectParticleElementAlphaFade,
994 Self::EffectParticleElementSize,
995 Self::EffectParticleElementTransSize,
996 Self::EffectParticlePointGravity,
997 Self::EffectParticleTurnToDirectionEnabled,
998 Self::EffectParticleInfiniteEmitEnabled,
999 ];
1000 pub fn variant_name(self) -> Option<&'static str> {
1002 match self {
1003 Self::NONE => Some("NONE"),
1004 Self::EffectParticleElementBasic => Some("EffectParticleElementBasic"),
1005 Self::EffectParticleElementRndSeedChange => Some("EffectParticleElementRndSeedChange"),
1006 Self::EffectParticleElementDelay => Some("EffectParticleElementDelay"),
1007 Self::EffectParticleElementGravity => Some("EffectParticleElementGravity"),
1008 Self::EffectParticleElementPosition => Some("EffectParticleElementPosition"),
1009 Self::EffectParticleElementRotation => Some("EffectParticleElementRotation"),
1010 Self::EffectParticleElementRotationTrans => Some("EffectParticleElementRotationTrans"),
1011 Self::EffectParticleElementTransSpeed => Some("EffectParticleElementTransSpeed"),
1012 Self::EffectParticleElementTangentialAcceleration => Some("EffectParticleElementTangentialAcceleration"),
1013 Self::EffectParticleElementInitColor => Some("EffectParticleElementInitColor"),
1014 Self::EffectParticleElementTransColor => Some("EffectParticleElementTransColor"),
1015 Self::EffectParticleElementAlphaFade => Some("EffectParticleElementAlphaFade"),
1016 Self::EffectParticleElementSize => Some("EffectParticleElementSize"),
1017 Self::EffectParticleElementTransSize => Some("EffectParticleElementTransSize"),
1018 Self::EffectParticlePointGravity => Some("EffectParticlePointGravity"),
1019 Self::EffectParticleTurnToDirectionEnabled => Some("EffectParticleTurnToDirectionEnabled"),
1020 Self::EffectParticleInfiniteEmitEnabled => Some("EffectParticleInfiniteEmitEnabled"),
1021 _ => None,
1022 }
1023 }
1024}
1025impl ::core::fmt::Debug for EffectNodeBehavior {
1026 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
1027 if let Some(name) = self.variant_name() {
1028 f.write_str(name)
1029 } else {
1030 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
1031 }
1032 }
1033}
1034impl<'a> ::flatbuffers::Follow<'a> for EffectNodeBehavior {
1035 type Inner = Self;
1036 #[inline]
1037 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1038 let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
1039 Self(b)
1040 }
1041}
1042
1043impl ::flatbuffers::Push for EffectNodeBehavior {
1044 type Output = EffectNodeBehavior;
1045 #[inline]
1046 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1047 unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
1048 }
1049}
1050
1051impl ::flatbuffers::EndianScalar for EffectNodeBehavior {
1052 type Scalar = u8;
1053 #[inline]
1054 fn to_little_endian(self) -> u8 {
1055 self.0.to_le()
1056 }
1057 #[inline]
1058 #[allow(clippy::wrong_self_convention)]
1059 fn from_little_endian(v: u8) -> Self {
1060 let b = u8::from_le(v);
1061 Self(b)
1062 }
1063}
1064
1065impl<'a> ::flatbuffers::Verifiable for EffectNodeBehavior {
1066 #[inline]
1067 fn run_verifier(
1068 v: &mut ::flatbuffers::Verifier, pos: usize
1069 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
1070 u8::run_verifier(v, pos)
1071 }
1072}
1073
1074impl ::flatbuffers::SimpleToVerifyInSlice for EffectNodeBehavior {}
1075pub struct EffectNodeBehaviorUnionTableOffset {}
1076
1077#[allow(clippy::upper_case_acronyms)]
1078#[non_exhaustive]
1079#[derive(Debug, Clone, PartialEq)]
1080pub enum EffectNodeBehaviorT {
1081 NONE,
1082 EffectParticleElementBasic(alloc::boxed::Box<EffectParticleElementBasicT>),
1083 EffectParticleElementRndSeedChange(alloc::boxed::Box<IntValueEntryT>),
1084 EffectParticleElementDelay(alloc::boxed::Box<IntValueEntryT>),
1085 EffectParticleElementGravity(alloc::boxed::Box<Vec2ValueEntryT>),
1086 EffectParticleElementPosition(alloc::boxed::Box<MinMax2ValueEntryT>),
1087 EffectParticleElementRotation(alloc::boxed::Box<EffectParticleElementRotationT>),
1088 EffectParticleElementRotationTrans(alloc::boxed::Box<EffectParticleElementRotationTransT>),
1089 EffectParticleElementTransSpeed(alloc::boxed::Box<Vec2ValueEntryT>),
1090 EffectParticleElementTangentialAcceleration(alloc::boxed::Box<Vec2ValueEntryT>),
1091 EffectParticleElementInitColor(alloc::boxed::Box<EffectParticleElementInitColorT>),
1092 EffectParticleElementTransColor(alloc::boxed::Box<EffectParticleElementTransColorT>),
1093 EffectParticleElementAlphaFade(alloc::boxed::Box<Vec2ValueEntryT>),
1094 EffectParticleElementSize(alloc::boxed::Box<MinMax2AndVec2ValueTableT>),
1095 EffectParticleElementTransSize(alloc::boxed::Box<MinMax2AndVec2ValueTableT>),
1096 EffectParticlePointGravity(alloc::boxed::Box<EffectParticlePointGravityT>),
1097 EffectParticleTurnToDirectionEnabled(alloc::boxed::Box<FloatValueEntryT>),
1098 EffectParticleInfiniteEmitEnabled(alloc::boxed::Box<IntValueEntryT>),
1099}
1100impl Default for EffectNodeBehaviorT {
1101 fn default() -> Self {
1102 Self::NONE
1103 }
1104}
1105impl EffectNodeBehaviorT {
1106 pub fn effect_node_behavior_type(&self) -> EffectNodeBehavior {
1107 match self {
1108 Self::NONE => EffectNodeBehavior::NONE,
1109 Self::EffectParticleElementBasic(_) => EffectNodeBehavior::EffectParticleElementBasic,
1110 Self::EffectParticleElementRndSeedChange(_) => EffectNodeBehavior::EffectParticleElementRndSeedChange,
1111 Self::EffectParticleElementDelay(_) => EffectNodeBehavior::EffectParticleElementDelay,
1112 Self::EffectParticleElementGravity(_) => EffectNodeBehavior::EffectParticleElementGravity,
1113 Self::EffectParticleElementPosition(_) => EffectNodeBehavior::EffectParticleElementPosition,
1114 Self::EffectParticleElementRotation(_) => EffectNodeBehavior::EffectParticleElementRotation,
1115 Self::EffectParticleElementRotationTrans(_) => EffectNodeBehavior::EffectParticleElementRotationTrans,
1116 Self::EffectParticleElementTransSpeed(_) => EffectNodeBehavior::EffectParticleElementTransSpeed,
1117 Self::EffectParticleElementTangentialAcceleration(_) => EffectNodeBehavior::EffectParticleElementTangentialAcceleration,
1118 Self::EffectParticleElementInitColor(_) => EffectNodeBehavior::EffectParticleElementInitColor,
1119 Self::EffectParticleElementTransColor(_) => EffectNodeBehavior::EffectParticleElementTransColor,
1120 Self::EffectParticleElementAlphaFade(_) => EffectNodeBehavior::EffectParticleElementAlphaFade,
1121 Self::EffectParticleElementSize(_) => EffectNodeBehavior::EffectParticleElementSize,
1122 Self::EffectParticleElementTransSize(_) => EffectNodeBehavior::EffectParticleElementTransSize,
1123 Self::EffectParticlePointGravity(_) => EffectNodeBehavior::EffectParticlePointGravity,
1124 Self::EffectParticleTurnToDirectionEnabled(_) => EffectNodeBehavior::EffectParticleTurnToDirectionEnabled,
1125 Self::EffectParticleInfiniteEmitEnabled(_) => EffectNodeBehavior::EffectParticleInfiniteEmitEnabled,
1126 }
1127 }
1128 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(&self, fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>) -> Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>> {
1129 match self {
1130 Self::NONE => None,
1131 Self::EffectParticleElementBasic(v) => Some(v.pack(fbb).as_union_value()),
1132 Self::EffectParticleElementRndSeedChange(v) => Some(v.pack(fbb).as_union_value()),
1133 Self::EffectParticleElementDelay(v) => Some(v.pack(fbb).as_union_value()),
1134 Self::EffectParticleElementGravity(v) => Some(v.pack(fbb).as_union_value()),
1135 Self::EffectParticleElementPosition(v) => Some(v.pack(fbb).as_union_value()),
1136 Self::EffectParticleElementRotation(v) => Some(v.pack(fbb).as_union_value()),
1137 Self::EffectParticleElementRotationTrans(v) => Some(v.pack(fbb).as_union_value()),
1138 Self::EffectParticleElementTransSpeed(v) => Some(v.pack(fbb).as_union_value()),
1139 Self::EffectParticleElementTangentialAcceleration(v) => Some(v.pack(fbb).as_union_value()),
1140 Self::EffectParticleElementInitColor(v) => Some(v.pack(fbb).as_union_value()),
1141 Self::EffectParticleElementTransColor(v) => Some(v.pack(fbb).as_union_value()),
1142 Self::EffectParticleElementAlphaFade(v) => Some(v.pack(fbb).as_union_value()),
1143 Self::EffectParticleElementSize(v) => Some(v.pack(fbb).as_union_value()),
1144 Self::EffectParticleElementTransSize(v) => Some(v.pack(fbb).as_union_value()),
1145 Self::EffectParticlePointGravity(v) => Some(v.pack(fbb).as_union_value()),
1146 Self::EffectParticleTurnToDirectionEnabled(v) => Some(v.pack(fbb).as_union_value()),
1147 Self::EffectParticleInfiniteEmitEnabled(v) => Some(v.pack(fbb).as_union_value()),
1148 }
1149 }
1150 pub fn take_effect_particle_element_basic(&mut self) -> Option<alloc::boxed::Box<EffectParticleElementBasicT>> {
1152 if let Self::EffectParticleElementBasic(_) = self {
1153 let v = ::core::mem::replace(self, Self::NONE);
1154 if let Self::EffectParticleElementBasic(w) = v {
1155 Some(w)
1156 } else {
1157 unreachable!()
1158 }
1159 } else {
1160 None
1161 }
1162 }
1163 pub fn as_effect_particle_element_basic(&self) -> Option<&EffectParticleElementBasicT> {
1165 if let Self::EffectParticleElementBasic(v) = self { Some(v.as_ref()) } else { None }
1166 }
1167 pub fn as_effect_particle_element_basic_mut(&mut self) -> Option<&mut EffectParticleElementBasicT> {
1169 if let Self::EffectParticleElementBasic(v) = self { Some(v.as_mut()) } else { None }
1170 }
1171 pub fn take_effect_particle_element_rnd_seed_change(&mut self) -> Option<alloc::boxed::Box<IntValueEntryT>> {
1173 if let Self::EffectParticleElementRndSeedChange(_) = self {
1174 let v = ::core::mem::replace(self, Self::NONE);
1175 if let Self::EffectParticleElementRndSeedChange(w) = v {
1176 Some(w)
1177 } else {
1178 unreachable!()
1179 }
1180 } else {
1181 None
1182 }
1183 }
1184 pub fn as_effect_particle_element_rnd_seed_change(&self) -> Option<&IntValueEntryT> {
1186 if let Self::EffectParticleElementRndSeedChange(v) = self { Some(v.as_ref()) } else { None }
1187 }
1188 pub fn as_effect_particle_element_rnd_seed_change_mut(&mut self) -> Option<&mut IntValueEntryT> {
1190 if let Self::EffectParticleElementRndSeedChange(v) = self { Some(v.as_mut()) } else { None }
1191 }
1192 pub fn take_effect_particle_element_delay(&mut self) -> Option<alloc::boxed::Box<IntValueEntryT>> {
1194 if let Self::EffectParticleElementDelay(_) = self {
1195 let v = ::core::mem::replace(self, Self::NONE);
1196 if let Self::EffectParticleElementDelay(w) = v {
1197 Some(w)
1198 } else {
1199 unreachable!()
1200 }
1201 } else {
1202 None
1203 }
1204 }
1205 pub fn as_effect_particle_element_delay(&self) -> Option<&IntValueEntryT> {
1207 if let Self::EffectParticleElementDelay(v) = self { Some(v.as_ref()) } else { None }
1208 }
1209 pub fn as_effect_particle_element_delay_mut(&mut self) -> Option<&mut IntValueEntryT> {
1211 if let Self::EffectParticleElementDelay(v) = self { Some(v.as_mut()) } else { None }
1212 }
1213 pub fn take_effect_particle_element_gravity(&mut self) -> Option<alloc::boxed::Box<Vec2ValueEntryT>> {
1215 if let Self::EffectParticleElementGravity(_) = self {
1216 let v = ::core::mem::replace(self, Self::NONE);
1217 if let Self::EffectParticleElementGravity(w) = v {
1218 Some(w)
1219 } else {
1220 unreachable!()
1221 }
1222 } else {
1223 None
1224 }
1225 }
1226 pub fn as_effect_particle_element_gravity(&self) -> Option<&Vec2ValueEntryT> {
1228 if let Self::EffectParticleElementGravity(v) = self { Some(v.as_ref()) } else { None }
1229 }
1230 pub fn as_effect_particle_element_gravity_mut(&mut self) -> Option<&mut Vec2ValueEntryT> {
1232 if let Self::EffectParticleElementGravity(v) = self { Some(v.as_mut()) } else { None }
1233 }
1234 pub fn take_effect_particle_element_position(&mut self) -> Option<alloc::boxed::Box<MinMax2ValueEntryT>> {
1236 if let Self::EffectParticleElementPosition(_) = self {
1237 let v = ::core::mem::replace(self, Self::NONE);
1238 if let Self::EffectParticleElementPosition(w) = v {
1239 Some(w)
1240 } else {
1241 unreachable!()
1242 }
1243 } else {
1244 None
1245 }
1246 }
1247 pub fn as_effect_particle_element_position(&self) -> Option<&MinMax2ValueEntryT> {
1249 if let Self::EffectParticleElementPosition(v) = self { Some(v.as_ref()) } else { None }
1250 }
1251 pub fn as_effect_particle_element_position_mut(&mut self) -> Option<&mut MinMax2ValueEntryT> {
1253 if let Self::EffectParticleElementPosition(v) = self { Some(v.as_mut()) } else { None }
1254 }
1255 pub fn take_effect_particle_element_rotation(&mut self) -> Option<alloc::boxed::Box<EffectParticleElementRotationT>> {
1257 if let Self::EffectParticleElementRotation(_) = self {
1258 let v = ::core::mem::replace(self, Self::NONE);
1259 if let Self::EffectParticleElementRotation(w) = v {
1260 Some(w)
1261 } else {
1262 unreachable!()
1263 }
1264 } else {
1265 None
1266 }
1267 }
1268 pub fn as_effect_particle_element_rotation(&self) -> Option<&EffectParticleElementRotationT> {
1270 if let Self::EffectParticleElementRotation(v) = self { Some(v.as_ref()) } else { None }
1271 }
1272 pub fn as_effect_particle_element_rotation_mut(&mut self) -> Option<&mut EffectParticleElementRotationT> {
1274 if let Self::EffectParticleElementRotation(v) = self { Some(v.as_mut()) } else { None }
1275 }
1276 pub fn take_effect_particle_element_rotation_trans(&mut self) -> Option<alloc::boxed::Box<EffectParticleElementRotationTransT>> {
1278 if let Self::EffectParticleElementRotationTrans(_) = self {
1279 let v = ::core::mem::replace(self, Self::NONE);
1280 if let Self::EffectParticleElementRotationTrans(w) = v {
1281 Some(w)
1282 } else {
1283 unreachable!()
1284 }
1285 } else {
1286 None
1287 }
1288 }
1289 pub fn as_effect_particle_element_rotation_trans(&self) -> Option<&EffectParticleElementRotationTransT> {
1291 if let Self::EffectParticleElementRotationTrans(v) = self { Some(v.as_ref()) } else { None }
1292 }
1293 pub fn as_effect_particle_element_rotation_trans_mut(&mut self) -> Option<&mut EffectParticleElementRotationTransT> {
1295 if let Self::EffectParticleElementRotationTrans(v) = self { Some(v.as_mut()) } else { None }
1296 }
1297 pub fn take_effect_particle_element_trans_speed(&mut self) -> Option<alloc::boxed::Box<Vec2ValueEntryT>> {
1299 if let Self::EffectParticleElementTransSpeed(_) = self {
1300 let v = ::core::mem::replace(self, Self::NONE);
1301 if let Self::EffectParticleElementTransSpeed(w) = v {
1302 Some(w)
1303 } else {
1304 unreachable!()
1305 }
1306 } else {
1307 None
1308 }
1309 }
1310 pub fn as_effect_particle_element_trans_speed(&self) -> Option<&Vec2ValueEntryT> {
1312 if let Self::EffectParticleElementTransSpeed(v) = self { Some(v.as_ref()) } else { None }
1313 }
1314 pub fn as_effect_particle_element_trans_speed_mut(&mut self) -> Option<&mut Vec2ValueEntryT> {
1316 if let Self::EffectParticleElementTransSpeed(v) = self { Some(v.as_mut()) } else { None }
1317 }
1318 pub fn take_effect_particle_element_tangential_acceleration(&mut self) -> Option<alloc::boxed::Box<Vec2ValueEntryT>> {
1320 if let Self::EffectParticleElementTangentialAcceleration(_) = self {
1321 let v = ::core::mem::replace(self, Self::NONE);
1322 if let Self::EffectParticleElementTangentialAcceleration(w) = v {
1323 Some(w)
1324 } else {
1325 unreachable!()
1326 }
1327 } else {
1328 None
1329 }
1330 }
1331 pub fn as_effect_particle_element_tangential_acceleration(&self) -> Option<&Vec2ValueEntryT> {
1333 if let Self::EffectParticleElementTangentialAcceleration(v) = self { Some(v.as_ref()) } else { None }
1334 }
1335 pub fn as_effect_particle_element_tangential_acceleration_mut(&mut self) -> Option<&mut Vec2ValueEntryT> {
1337 if let Self::EffectParticleElementTangentialAcceleration(v) = self { Some(v.as_mut()) } else { None }
1338 }
1339 pub fn take_effect_particle_element_init_color(&mut self) -> Option<alloc::boxed::Box<EffectParticleElementInitColorT>> {
1341 if let Self::EffectParticleElementInitColor(_) = self {
1342 let v = ::core::mem::replace(self, Self::NONE);
1343 if let Self::EffectParticleElementInitColor(w) = v {
1344 Some(w)
1345 } else {
1346 unreachable!()
1347 }
1348 } else {
1349 None
1350 }
1351 }
1352 pub fn as_effect_particle_element_init_color(&self) -> Option<&EffectParticleElementInitColorT> {
1354 if let Self::EffectParticleElementInitColor(v) = self { Some(v.as_ref()) } else { None }
1355 }
1356 pub fn as_effect_particle_element_init_color_mut(&mut self) -> Option<&mut EffectParticleElementInitColorT> {
1358 if let Self::EffectParticleElementInitColor(v) = self { Some(v.as_mut()) } else { None }
1359 }
1360 pub fn take_effect_particle_element_trans_color(&mut self) -> Option<alloc::boxed::Box<EffectParticleElementTransColorT>> {
1362 if let Self::EffectParticleElementTransColor(_) = self {
1363 let v = ::core::mem::replace(self, Self::NONE);
1364 if let Self::EffectParticleElementTransColor(w) = v {
1365 Some(w)
1366 } else {
1367 unreachable!()
1368 }
1369 } else {
1370 None
1371 }
1372 }
1373 pub fn as_effect_particle_element_trans_color(&self) -> Option<&EffectParticleElementTransColorT> {
1375 if let Self::EffectParticleElementTransColor(v) = self { Some(v.as_ref()) } else { None }
1376 }
1377 pub fn as_effect_particle_element_trans_color_mut(&mut self) -> Option<&mut EffectParticleElementTransColorT> {
1379 if let Self::EffectParticleElementTransColor(v) = self { Some(v.as_mut()) } else { None }
1380 }
1381 pub fn take_effect_particle_element_alpha_fade(&mut self) -> Option<alloc::boxed::Box<Vec2ValueEntryT>> {
1383 if let Self::EffectParticleElementAlphaFade(_) = self {
1384 let v = ::core::mem::replace(self, Self::NONE);
1385 if let Self::EffectParticleElementAlphaFade(w) = v {
1386 Some(w)
1387 } else {
1388 unreachable!()
1389 }
1390 } else {
1391 None
1392 }
1393 }
1394 pub fn as_effect_particle_element_alpha_fade(&self) -> Option<&Vec2ValueEntryT> {
1396 if let Self::EffectParticleElementAlphaFade(v) = self { Some(v.as_ref()) } else { None }
1397 }
1398 pub fn as_effect_particle_element_alpha_fade_mut(&mut self) -> Option<&mut Vec2ValueEntryT> {
1400 if let Self::EffectParticleElementAlphaFade(v) = self { Some(v.as_mut()) } else { None }
1401 }
1402 pub fn take_effect_particle_element_size(&mut self) -> Option<alloc::boxed::Box<MinMax2AndVec2ValueTableT>> {
1404 if let Self::EffectParticleElementSize(_) = self {
1405 let v = ::core::mem::replace(self, Self::NONE);
1406 if let Self::EffectParticleElementSize(w) = v {
1407 Some(w)
1408 } else {
1409 unreachable!()
1410 }
1411 } else {
1412 None
1413 }
1414 }
1415 pub fn as_effect_particle_element_size(&self) -> Option<&MinMax2AndVec2ValueTableT> {
1417 if let Self::EffectParticleElementSize(v) = self { Some(v.as_ref()) } else { None }
1418 }
1419 pub fn as_effect_particle_element_size_mut(&mut self) -> Option<&mut MinMax2AndVec2ValueTableT> {
1421 if let Self::EffectParticleElementSize(v) = self { Some(v.as_mut()) } else { None }
1422 }
1423 pub fn take_effect_particle_element_trans_size(&mut self) -> Option<alloc::boxed::Box<MinMax2AndVec2ValueTableT>> {
1425 if let Self::EffectParticleElementTransSize(_) = self {
1426 let v = ::core::mem::replace(self, Self::NONE);
1427 if let Self::EffectParticleElementTransSize(w) = v {
1428 Some(w)
1429 } else {
1430 unreachable!()
1431 }
1432 } else {
1433 None
1434 }
1435 }
1436 pub fn as_effect_particle_element_trans_size(&self) -> Option<&MinMax2AndVec2ValueTableT> {
1438 if let Self::EffectParticleElementTransSize(v) = self { Some(v.as_ref()) } else { None }
1439 }
1440 pub fn as_effect_particle_element_trans_size_mut(&mut self) -> Option<&mut MinMax2AndVec2ValueTableT> {
1442 if let Self::EffectParticleElementTransSize(v) = self { Some(v.as_mut()) } else { None }
1443 }
1444 pub fn take_effect_particle_point_gravity(&mut self) -> Option<alloc::boxed::Box<EffectParticlePointGravityT>> {
1446 if let Self::EffectParticlePointGravity(_) = self {
1447 let v = ::core::mem::replace(self, Self::NONE);
1448 if let Self::EffectParticlePointGravity(w) = v {
1449 Some(w)
1450 } else {
1451 unreachable!()
1452 }
1453 } else {
1454 None
1455 }
1456 }
1457 pub fn as_effect_particle_point_gravity(&self) -> Option<&EffectParticlePointGravityT> {
1459 if let Self::EffectParticlePointGravity(v) = self { Some(v.as_ref()) } else { None }
1460 }
1461 pub fn as_effect_particle_point_gravity_mut(&mut self) -> Option<&mut EffectParticlePointGravityT> {
1463 if let Self::EffectParticlePointGravity(v) = self { Some(v.as_mut()) } else { None }
1464 }
1465 pub fn take_effect_particle_turn_to_direction_enabled(&mut self) -> Option<alloc::boxed::Box<FloatValueEntryT>> {
1467 if let Self::EffectParticleTurnToDirectionEnabled(_) = self {
1468 let v = ::core::mem::replace(self, Self::NONE);
1469 if let Self::EffectParticleTurnToDirectionEnabled(w) = v {
1470 Some(w)
1471 } else {
1472 unreachable!()
1473 }
1474 } else {
1475 None
1476 }
1477 }
1478 pub fn as_effect_particle_turn_to_direction_enabled(&self) -> Option<&FloatValueEntryT> {
1480 if let Self::EffectParticleTurnToDirectionEnabled(v) = self { Some(v.as_ref()) } else { None }
1481 }
1482 pub fn as_effect_particle_turn_to_direction_enabled_mut(&mut self) -> Option<&mut FloatValueEntryT> {
1484 if let Self::EffectParticleTurnToDirectionEnabled(v) = self { Some(v.as_mut()) } else { None }
1485 }
1486 pub fn take_effect_particle_infinite_emit_enabled(&mut self) -> Option<alloc::boxed::Box<IntValueEntryT>> {
1488 if let Self::EffectParticleInfiniteEmitEnabled(_) = self {
1489 let v = ::core::mem::replace(self, Self::NONE);
1490 if let Self::EffectParticleInfiniteEmitEnabled(w) = v {
1491 Some(w)
1492 } else {
1493 unreachable!()
1494 }
1495 } else {
1496 None
1497 }
1498 }
1499 pub fn as_effect_particle_infinite_emit_enabled(&self) -> Option<&IntValueEntryT> {
1501 if let Self::EffectParticleInfiniteEmitEnabled(v) = self { Some(v.as_ref()) } else { None }
1502 }
1503 pub fn as_effect_particle_infinite_emit_enabled_mut(&mut self) -> Option<&mut IntValueEntryT> {
1505 if let Self::EffectParticleInfiniteEmitEnabled(v) = self { Some(v.as_mut()) } else { None }
1506 }
1507}
1508#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1509pub const ENUM_MIN_SIGNAL_COMMAND_PARAM_TYPE: u8 = 0;
1510#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1511pub const ENUM_MAX_SIGNAL_COMMAND_PARAM_TYPE: u8 = 5;
1512#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1513#[allow(non_camel_case_types)]
1514pub const ENUM_VALUES_SIGNAL_COMMAND_PARAM_TYPE: [SignalCommandParamType; 6] = [
1515 SignalCommandParamType::Bool,
1516 SignalCommandParamType::Index,
1517 SignalCommandParamType::Integer,
1518 SignalCommandParamType::Floating,
1519 SignalCommandParamType::Text,
1520 SignalCommandParamType::None,
1521];
1522
1523#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1524#[repr(transparent)]
1525pub struct SignalCommandParamType(pub u8);
1526#[allow(non_upper_case_globals)]
1527impl SignalCommandParamType {
1528 pub const Bool: Self = Self(0);
1529 pub const Index: Self = Self(1);
1530 pub const Integer: Self = Self(2);
1531 pub const Floating: Self = Self(3);
1532 pub const Text: Self = Self(4);
1533 pub const None: Self = Self(5);
1534
1535 pub const ENUM_MIN: u8 = 0;
1536 pub const ENUM_MAX: u8 = 5;
1537 pub const ENUM_VALUES: &'static [Self] = &[
1538 Self::Bool,
1539 Self::Index,
1540 Self::Integer,
1541 Self::Floating,
1542 Self::Text,
1543 Self::None,
1544 ];
1545 pub fn variant_name(self) -> Option<&'static str> {
1547 match self {
1548 Self::Bool => Some("Bool"),
1549 Self::Index => Some("Index"),
1550 Self::Integer => Some("Integer"),
1551 Self::Floating => Some("Floating"),
1552 Self::Text => Some("Text"),
1553 Self::None => Some("None"),
1554 _ => None,
1555 }
1556 }
1557}
1558impl ::core::fmt::Debug for SignalCommandParamType {
1559 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
1560 if let Some(name) = self.variant_name() {
1561 f.write_str(name)
1562 } else {
1563 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
1564 }
1565 }
1566}
1567impl<'a> ::flatbuffers::Follow<'a> for SignalCommandParamType {
1568 type Inner = Self;
1569 #[inline]
1570 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1571 let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
1572 Self(b)
1573 }
1574}
1575
1576impl ::flatbuffers::Push for SignalCommandParamType {
1577 type Output = SignalCommandParamType;
1578 #[inline]
1579 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1580 unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
1581 }
1582}
1583
1584impl ::flatbuffers::EndianScalar for SignalCommandParamType {
1585 type Scalar = u8;
1586 #[inline]
1587 fn to_little_endian(self) -> u8 {
1588 self.0.to_le()
1589 }
1590 #[inline]
1591 #[allow(clippy::wrong_self_convention)]
1592 fn from_little_endian(v: u8) -> Self {
1593 let b = u8::from_le(v);
1594 Self(b)
1595 }
1596}
1597
1598impl<'a> ::flatbuffers::Verifiable for SignalCommandParamType {
1599 #[inline]
1600 fn run_verifier(
1601 v: &mut ::flatbuffers::Verifier, pos: usize
1602 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
1603 u8::run_verifier(v, pos)
1604 }
1605}
1606
1607impl ::flatbuffers::SimpleToVerifyInSlice for SignalCommandParamType {}
1608#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1609pub const ENUM_MIN_SIGNAL_COMMAND_PARAM_VALUE: u8 = 0;
1610#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1611pub const ENUM_MAX_SIGNAL_COMMAND_PARAM_VALUE: u8 = 6;
1612#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1613#[allow(non_camel_case_types)]
1614pub const ENUM_VALUES_SIGNAL_COMMAND_PARAM_VALUE: [SignalCommandParamValue; 7] = [
1615 SignalCommandParamValue::NONE,
1616 SignalCommandParamValue::Bool,
1617 SignalCommandParamValue::Index,
1618 SignalCommandParamValue::Integer,
1619 SignalCommandParamValue::Floating,
1620 SignalCommandParamValue::Text,
1621 SignalCommandParamValue::None,
1622];
1623
1624#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1625#[repr(transparent)]
1626pub struct SignalCommandParamValue(pub u8);
1627#[allow(non_upper_case_globals)]
1628impl SignalCommandParamValue {
1629 pub const NONE: Self = Self(0);
1630 pub const Bool: Self = Self(1);
1631 pub const Index: Self = Self(2);
1632 pub const Integer: Self = Self(3);
1633 pub const Floating: Self = Self(4);
1634 pub const Text: Self = Self(5);
1635 pub const None: Self = Self(6);
1636
1637 pub const ENUM_MIN: u8 = 0;
1638 pub const ENUM_MAX: u8 = 6;
1639 pub const ENUM_VALUES: &'static [Self] = &[
1640 Self::NONE,
1641 Self::Bool,
1642 Self::Index,
1643 Self::Integer,
1644 Self::Floating,
1645 Self::Text,
1646 Self::None,
1647 ];
1648 pub fn variant_name(self) -> Option<&'static str> {
1650 match self {
1651 Self::NONE => Some("NONE"),
1652 Self::Bool => Some("Bool"),
1653 Self::Index => Some("Index"),
1654 Self::Integer => Some("Integer"),
1655 Self::Floating => Some("Floating"),
1656 Self::Text => Some("Text"),
1657 Self::None => Some("None"),
1658 _ => None,
1659 }
1660 }
1661}
1662impl ::core::fmt::Debug for SignalCommandParamValue {
1663 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
1664 if let Some(name) = self.variant_name() {
1665 f.write_str(name)
1666 } else {
1667 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
1668 }
1669 }
1670}
1671impl<'a> ::flatbuffers::Follow<'a> for SignalCommandParamValue {
1672 type Inner = Self;
1673 #[inline]
1674 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1675 let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
1676 Self(b)
1677 }
1678}
1679
1680impl ::flatbuffers::Push for SignalCommandParamValue {
1681 type Output = SignalCommandParamValue;
1682 #[inline]
1683 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1684 unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
1685 }
1686}
1687
1688impl ::flatbuffers::EndianScalar for SignalCommandParamValue {
1689 type Scalar = u8;
1690 #[inline]
1691 fn to_little_endian(self) -> u8 {
1692 self.0.to_le()
1693 }
1694 #[inline]
1695 #[allow(clippy::wrong_self_convention)]
1696 fn from_little_endian(v: u8) -> Self {
1697 let b = u8::from_le(v);
1698 Self(b)
1699 }
1700}
1701
1702impl<'a> ::flatbuffers::Verifiable for SignalCommandParamValue {
1703 #[inline]
1704 fn run_verifier(
1705 v: &mut ::flatbuffers::Verifier, pos: usize
1706 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
1707 u8::run_verifier(v, pos)
1708 }
1709}
1710
1711impl ::flatbuffers::SimpleToVerifyInSlice for SignalCommandParamValue {}
1712pub struct SignalCommandParamValueUnionTableOffset {}
1713
1714#[allow(clippy::upper_case_acronyms)]
1715#[non_exhaustive]
1716#[derive(Debug, Clone, PartialEq)]
1717pub enum SignalCommandParamValueT {
1718 NONE,
1719 Bool(alloc::boxed::Box<BoolValueEntryT>),
1720 Index(alloc::boxed::Box<IntValueEntryT>),
1721 Integer(alloc::boxed::Box<IntValueEntryT>),
1722 Floating(alloc::boxed::Box<FloatValueEntryT>),
1723 Text(alloc::boxed::Box<StringValueEntryT>),
1724 None(alloc::boxed::Box<NoneValueEntryT>),
1725}
1726impl Default for SignalCommandParamValueT {
1727 fn default() -> Self {
1728 Self::NONE
1729 }
1730}
1731impl SignalCommandParamValueT {
1732 pub fn signal_command_param_value_type(&self) -> SignalCommandParamValue {
1733 match self {
1734 Self::NONE => SignalCommandParamValue::NONE,
1735 Self::Bool(_) => SignalCommandParamValue::Bool,
1736 Self::Index(_) => SignalCommandParamValue::Index,
1737 Self::Integer(_) => SignalCommandParamValue::Integer,
1738 Self::Floating(_) => SignalCommandParamValue::Floating,
1739 Self::Text(_) => SignalCommandParamValue::Text,
1740 Self::None(_) => SignalCommandParamValue::None,
1741 }
1742 }
1743 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(&self, fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>) -> Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>> {
1744 match self {
1745 Self::NONE => None,
1746 Self::Bool(v) => Some(v.pack(fbb).as_union_value()),
1747 Self::Index(v) => Some(v.pack(fbb).as_union_value()),
1748 Self::Integer(v) => Some(v.pack(fbb).as_union_value()),
1749 Self::Floating(v) => Some(v.pack(fbb).as_union_value()),
1750 Self::Text(v) => Some(v.pack(fbb).as_union_value()),
1751 Self::None(v) => Some(v.pack(fbb).as_union_value()),
1752 }
1753 }
1754 pub fn take_bool(&mut self) -> Option<alloc::boxed::Box<BoolValueEntryT>> {
1756 if let Self::Bool(_) = self {
1757 let v = ::core::mem::replace(self, Self::NONE);
1758 if let Self::Bool(w) = v {
1759 Some(w)
1760 } else {
1761 unreachable!()
1762 }
1763 } else {
1764 None
1765 }
1766 }
1767 pub fn as_bool(&self) -> Option<&BoolValueEntryT> {
1769 if let Self::Bool(v) = self { Some(v.as_ref()) } else { None }
1770 }
1771 pub fn as_bool_mut(&mut self) -> Option<&mut BoolValueEntryT> {
1773 if let Self::Bool(v) = self { Some(v.as_mut()) } else { None }
1774 }
1775 pub fn take_index(&mut self) -> Option<alloc::boxed::Box<IntValueEntryT>> {
1777 if let Self::Index(_) = self {
1778 let v = ::core::mem::replace(self, Self::NONE);
1779 if let Self::Index(w) = v {
1780 Some(w)
1781 } else {
1782 unreachable!()
1783 }
1784 } else {
1785 None
1786 }
1787 }
1788 pub fn as_index(&self) -> Option<&IntValueEntryT> {
1790 if let Self::Index(v) = self { Some(v.as_ref()) } else { None }
1791 }
1792 pub fn as_index_mut(&mut self) -> Option<&mut IntValueEntryT> {
1794 if let Self::Index(v) = self { Some(v.as_mut()) } else { None }
1795 }
1796 pub fn take_integer(&mut self) -> Option<alloc::boxed::Box<IntValueEntryT>> {
1798 if let Self::Integer(_) = self {
1799 let v = ::core::mem::replace(self, Self::NONE);
1800 if let Self::Integer(w) = v {
1801 Some(w)
1802 } else {
1803 unreachable!()
1804 }
1805 } else {
1806 None
1807 }
1808 }
1809 pub fn as_integer(&self) -> Option<&IntValueEntryT> {
1811 if let Self::Integer(v) = self { Some(v.as_ref()) } else { None }
1812 }
1813 pub fn as_integer_mut(&mut self) -> Option<&mut IntValueEntryT> {
1815 if let Self::Integer(v) = self { Some(v.as_mut()) } else { None }
1816 }
1817 pub fn take_floating(&mut self) -> Option<alloc::boxed::Box<FloatValueEntryT>> {
1819 if let Self::Floating(_) = self {
1820 let v = ::core::mem::replace(self, Self::NONE);
1821 if let Self::Floating(w) = v {
1822 Some(w)
1823 } else {
1824 unreachable!()
1825 }
1826 } else {
1827 None
1828 }
1829 }
1830 pub fn as_floating(&self) -> Option<&FloatValueEntryT> {
1832 if let Self::Floating(v) = self { Some(v.as_ref()) } else { None }
1833 }
1834 pub fn as_floating_mut(&mut self) -> Option<&mut FloatValueEntryT> {
1836 if let Self::Floating(v) = self { Some(v.as_mut()) } else { None }
1837 }
1838 pub fn take_text(&mut self) -> Option<alloc::boxed::Box<StringValueEntryT>> {
1840 if let Self::Text(_) = self {
1841 let v = ::core::mem::replace(self, Self::NONE);
1842 if let Self::Text(w) = v {
1843 Some(w)
1844 } else {
1845 unreachable!()
1846 }
1847 } else {
1848 None
1849 }
1850 }
1851 pub fn as_text(&self) -> Option<&StringValueEntryT> {
1853 if let Self::Text(v) = self { Some(v.as_ref()) } else { None }
1854 }
1855 pub fn as_text_mut(&mut self) -> Option<&mut StringValueEntryT> {
1857 if let Self::Text(v) = self { Some(v.as_mut()) } else { None }
1858 }
1859 pub fn take_none(&mut self) -> Option<alloc::boxed::Box<NoneValueEntryT>> {
1861 if let Self::None(_) = self {
1862 let v = ::core::mem::replace(self, Self::NONE);
1863 if let Self::None(w) = v {
1864 Some(w)
1865 } else {
1866 unreachable!()
1867 }
1868 } else {
1869 None
1870 }
1871 }
1872 pub fn as_none(&self) -> Option<&NoneValueEntryT> {
1874 if let Self::None(v) = self { Some(v.as_ref()) } else { None }
1875 }
1876 pub fn as_none_mut(&mut self) -> Option<&mut NoneValueEntryT> {
1878 if let Self::None(v) = self { Some(v.as_mut()) } else { None }
1879 }
1880}
1881#[allow(non_upper_case_globals)]
1882mod bitflags_part_attributes_update_flags {
1883 ::flatbuffers::bitflags::bitflags! {
1884 #[derive(Default, Debug, Clone, Copy, PartialEq)]
1885 pub struct PartAttributesUpdateFlags: u64 {
1886 const AttributeCell = 1;
1887 const AttributePosX = 2;
1888 const AttributePosY = 4;
1889 const AttributePosZ = 8;
1890 const AttributeRotX = 16;
1891 const AttributeRotY = 32;
1892 const AttributeRotZ = 64;
1893 const AttributeSclX = 128;
1894 const AttributeSclY = 256;
1895 const AttributeLosclX = 512;
1896 const AttributeLosclY = 1024;
1897 const AttributeAlpha = 2048;
1898 const AttributeLoAlpha = 4096;
1899 const AttributePrio = 8192;
1900 const AttributeFlipH = 16384;
1901 const AttributeFlipV = 32768;
1902 const AttributeHide = 65536;
1903 const AttributePartColor = 131072;
1904 const AttributeShader = 262144;
1905 const AttributeVertex = 524288;
1906 const AttributePivotX = 1048576;
1907 const AttributePivotY = 2097152;
1908 const AttributeAnchorX = 4194304;
1909 const AttributeAnchorY = 8388608;
1910 const AttributeSizeX = 16777216;
1911 const AttributeSizeY = 33554432;
1912 const AttributeImgFlipH = 67108864;
1913 const AttributeImgFlipV = 134217728;
1914 const AttributeUvtX = 268435456;
1915 const AttributeUvtY = 536870912;
1916 const AttributeUvrZ = 1073741824;
1917 const AttributeUvsX = 2147483648;
1918 const AttributeUvsY = 4294967296;
1919 const AttributeBoundr = 8589934592;
1920 const AttributeMask = 17179869184;
1921 const AttributeSkew = 34359738368;
1922 const AttributeDeform = 68719476736;
1923 const AttributeTexture = 137438953472;
1924 }
1925 }
1926}
1927pub use self::bitflags_part_attributes_update_flags::PartAttributesUpdateFlags;
1928
1929impl<'a> ::flatbuffers::Follow<'a> for PartAttributesUpdateFlags {
1930 type Inner = Self;
1931 #[inline]
1932 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1933 let b = unsafe { ::flatbuffers::read_scalar_at::<u64>(buf, loc) };
1934 Self::from_bits_retain(b)
1935 }
1936}
1937
1938impl ::flatbuffers::Push for PartAttributesUpdateFlags {
1939 type Output = PartAttributesUpdateFlags;
1940 #[inline]
1941 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1942 unsafe { ::flatbuffers::emplace_scalar::<u64>(dst, self.bits()) };
1943 }
1944}
1945
1946impl ::flatbuffers::EndianScalar for PartAttributesUpdateFlags {
1947 type Scalar = u64;
1948 #[inline]
1949 fn to_little_endian(self) -> u64 {
1950 self.bits().to_le()
1951 }
1952 #[inline]
1953 #[allow(clippy::wrong_self_convention)]
1954 fn from_little_endian(v: u64) -> Self {
1955 let b = u64::from_le(v);
1956 Self::from_bits_retain(b)
1957 }
1958}
1959
1960impl<'a> ::flatbuffers::Verifiable for PartAttributesUpdateFlags {
1961 #[inline]
1962 fn run_verifier(
1963 v: &mut ::flatbuffers::Verifier, pos: usize
1964 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
1965 u64::run_verifier(v, pos)
1966 }
1967}
1968
1969impl ::flatbuffers::SimpleToVerifyInSlice for PartAttributesUpdateFlags {}
1970#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1971pub const ENUM_MIN_SHAPE_TYPE: u8 = 0;
1972#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1973pub const ENUM_MAX_SHAPE_TYPE: u8 = 4;
1974#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1975#[allow(non_camel_case_types)]
1976pub const ENUM_VALUES_SHAPE_TYPE: [ShapeType; 5] = [
1977 ShapeType::Unknown,
1978 ShapeType::Triangle,
1979 ShapeType::Rectangle,
1980 ShapeType::Arrow,
1981 ShapeType::Star,
1982];
1983
1984#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1985#[repr(transparent)]
1986pub struct ShapeType(pub u8);
1987#[allow(non_upper_case_globals)]
1988impl ShapeType {
1989 pub const Unknown: Self = Self(0);
1990 pub const Triangle: Self = Self(1);
1991 pub const Rectangle: Self = Self(2);
1992 pub const Arrow: Self = Self(3);
1993 pub const Star: Self = Self(4);
1994
1995 pub const ENUM_MIN: u8 = 0;
1996 pub const ENUM_MAX: u8 = 4;
1997 pub const ENUM_VALUES: &'static [Self] = &[
1998 Self::Unknown,
1999 Self::Triangle,
2000 Self::Rectangle,
2001 Self::Arrow,
2002 Self::Star,
2003 ];
2004 pub fn variant_name(self) -> Option<&'static str> {
2006 match self {
2007 Self::Unknown => Some("Unknown"),
2008 Self::Triangle => Some("Triangle"),
2009 Self::Rectangle => Some("Rectangle"),
2010 Self::Arrow => Some("Arrow"),
2011 Self::Star => Some("Star"),
2012 _ => None,
2013 }
2014 }
2015}
2016impl ::core::fmt::Debug for ShapeType {
2017 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
2018 if let Some(name) = self.variant_name() {
2019 f.write_str(name)
2020 } else {
2021 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
2022 }
2023 }
2024}
2025impl<'a> ::flatbuffers::Follow<'a> for ShapeType {
2026 type Inner = Self;
2027 #[inline]
2028 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2029 let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
2030 Self(b)
2031 }
2032}
2033
2034impl ::flatbuffers::Push for ShapeType {
2035 type Output = ShapeType;
2036 #[inline]
2037 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
2038 unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
2039 }
2040}
2041
2042impl ::flatbuffers::EndianScalar for ShapeType {
2043 type Scalar = u8;
2044 #[inline]
2045 fn to_little_endian(self) -> u8 {
2046 self.0.to_le()
2047 }
2048 #[inline]
2049 #[allow(clippy::wrong_self_convention)]
2050 fn from_little_endian(v: u8) -> Self {
2051 let b = u8::from_le(v);
2052 Self(b)
2053 }
2054}
2055
2056impl<'a> ::flatbuffers::Verifiable for ShapeType {
2057 #[inline]
2058 fn run_verifier(
2059 v: &mut ::flatbuffers::Verifier, pos: usize
2060 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
2061 u8::run_verifier(v, pos)
2062 }
2063}
2064
2065impl ::flatbuffers::SimpleToVerifyInSlice for ShapeType {}
2066#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2067pub const ENUM_MIN_TEXT_ANCHOR: u8 = 0;
2068#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2069pub const ENUM_MAX_TEXT_ANCHOR: u8 = 255;
2070#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2071#[allow(non_camel_case_types)]
2072pub const ENUM_VALUES_TEXT_ANCHOR: [TextAnchor; 10] = [
2073 TextAnchor::LT,
2074 TextAnchor::LC,
2075 TextAnchor::LB,
2076 TextAnchor::CT,
2077 TextAnchor::CC,
2078 TextAnchor::CB,
2079 TextAnchor::RT,
2080 TextAnchor::RC,
2081 TextAnchor::RB,
2082 TextAnchor::NO,
2083];
2084
2085#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2086#[repr(transparent)]
2087pub struct TextAnchor(pub u8);
2088#[allow(non_upper_case_globals)]
2089impl TextAnchor {
2090 pub const LT: Self = Self(0);
2091 pub const LC: Self = Self(1);
2092 pub const LB: Self = Self(2);
2093 pub const CT: Self = Self(16);
2094 pub const CC: Self = Self(17);
2095 pub const CB: Self = Self(18);
2096 pub const RT: Self = Self(32);
2097 pub const RC: Self = Self(33);
2098 pub const RB: Self = Self(34);
2099 pub const NO: Self = Self(255);
2100
2101 pub const ENUM_MIN: u8 = 0;
2102 pub const ENUM_MAX: u8 = 255;
2103 pub const ENUM_VALUES: &'static [Self] = &[
2104 Self::LT,
2105 Self::LC,
2106 Self::LB,
2107 Self::CT,
2108 Self::CC,
2109 Self::CB,
2110 Self::RT,
2111 Self::RC,
2112 Self::RB,
2113 Self::NO,
2114 ];
2115 pub fn variant_name(self) -> Option<&'static str> {
2117 match self {
2118 Self::LT => Some("LT"),
2119 Self::LC => Some("LC"),
2120 Self::LB => Some("LB"),
2121 Self::CT => Some("CT"),
2122 Self::CC => Some("CC"),
2123 Self::CB => Some("CB"),
2124 Self::RT => Some("RT"),
2125 Self::RC => Some("RC"),
2126 Self::RB => Some("RB"),
2127 Self::NO => Some("NO"),
2128 _ => None,
2129 }
2130 }
2131}
2132impl ::core::fmt::Debug for TextAnchor {
2133 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
2134 if let Some(name) = self.variant_name() {
2135 f.write_str(name)
2136 } else {
2137 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
2138 }
2139 }
2140}
2141impl<'a> ::flatbuffers::Follow<'a> for TextAnchor {
2142 type Inner = Self;
2143 #[inline]
2144 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2145 let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
2146 Self(b)
2147 }
2148}
2149
2150impl ::flatbuffers::Push for TextAnchor {
2151 type Output = TextAnchor;
2152 #[inline]
2153 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
2154 unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
2155 }
2156}
2157
2158impl ::flatbuffers::EndianScalar for TextAnchor {
2159 type Scalar = u8;
2160 #[inline]
2161 fn to_little_endian(self) -> u8 {
2162 self.0.to_le()
2163 }
2164 #[inline]
2165 #[allow(clippy::wrong_self_convention)]
2166 fn from_little_endian(v: u8) -> Self {
2167 let b = u8::from_le(v);
2168 Self(b)
2169 }
2170}
2171
2172impl<'a> ::flatbuffers::Verifiable for TextAnchor {
2173 #[inline]
2174 fn run_verifier(
2175 v: &mut ::flatbuffers::Verifier, pos: usize
2176 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
2177 u8::run_verifier(v, pos)
2178 }
2179}
2180
2181impl ::flatbuffers::SimpleToVerifyInSlice for TextAnchor {}
2182#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2183pub const ENUM_MIN_PART_TYPE: u8 = 0;
2184#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2185pub const ENUM_MAX_PART_TYPE: u8 = 17;
2186#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2187#[allow(non_camel_case_types)]
2188pub const ENUM_VALUES_PART_TYPE: [PartType; 18] = [
2189 PartType::NONE,
2190 PartType::PartTypeNull,
2191 PartType::PartTypeNormal,
2192 PartType::PartTypeShape,
2193 PartType::PartTypeText,
2194 PartType::PartTypeNines,
2195 PartType::PartTypeInstance,
2196 PartType::PartTypeArmature,
2197 PartType::PartTypeEffect,
2198 PartType::PartTypeMesh,
2199 PartType::PartTypeMovenode,
2200 PartType::PartTypeConstraint,
2201 PartType::PartTypeMask,
2202 PartType::PartTypeJoint,
2203 PartType::PartTypeBonepoint,
2204 PartType::PartTypeTransformConstraint,
2205 PartType::PartTypeCamera,
2206 PartType::PartTypeAudio,
2207];
2208
2209#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2210#[repr(transparent)]
2211pub struct PartType(pub u8);
2212#[allow(non_upper_case_globals)]
2213impl PartType {
2214 pub const NONE: Self = Self(0);
2215 pub const PartTypeNull: Self = Self(1);
2216 pub const PartTypeNormal: Self = Self(2);
2217 pub const PartTypeShape: Self = Self(3);
2218 pub const PartTypeText: Self = Self(4);
2219 pub const PartTypeNines: Self = Self(5);
2220 pub const PartTypeInstance: Self = Self(6);
2221 pub const PartTypeArmature: Self = Self(7);
2222 pub const PartTypeEffect: Self = Self(8);
2223 pub const PartTypeMesh: Self = Self(9);
2224 pub const PartTypeMovenode: Self = Self(10);
2225 pub const PartTypeConstraint: Self = Self(11);
2226 pub const PartTypeMask: Self = Self(12);
2227 pub const PartTypeJoint: Self = Self(13);
2228 pub const PartTypeBonepoint: Self = Self(14);
2229 pub const PartTypeTransformConstraint: Self = Self(15);
2230 pub const PartTypeCamera: Self = Self(16);
2231 pub const PartTypeAudio: Self = Self(17);
2232
2233 pub const ENUM_MIN: u8 = 0;
2234 pub const ENUM_MAX: u8 = 17;
2235 pub const ENUM_VALUES: &'static [Self] = &[
2236 Self::NONE,
2237 Self::PartTypeNull,
2238 Self::PartTypeNormal,
2239 Self::PartTypeShape,
2240 Self::PartTypeText,
2241 Self::PartTypeNines,
2242 Self::PartTypeInstance,
2243 Self::PartTypeArmature,
2244 Self::PartTypeEffect,
2245 Self::PartTypeMesh,
2246 Self::PartTypeMovenode,
2247 Self::PartTypeConstraint,
2248 Self::PartTypeMask,
2249 Self::PartTypeJoint,
2250 Self::PartTypeBonepoint,
2251 Self::PartTypeTransformConstraint,
2252 Self::PartTypeCamera,
2253 Self::PartTypeAudio,
2254 ];
2255 pub fn variant_name(self) -> Option<&'static str> {
2257 match self {
2258 Self::NONE => Some("NONE"),
2259 Self::PartTypeNull => Some("PartTypeNull"),
2260 Self::PartTypeNormal => Some("PartTypeNormal"),
2261 Self::PartTypeShape => Some("PartTypeShape"),
2262 Self::PartTypeText => Some("PartTypeText"),
2263 Self::PartTypeNines => Some("PartTypeNines"),
2264 Self::PartTypeInstance => Some("PartTypeInstance"),
2265 Self::PartTypeArmature => Some("PartTypeArmature"),
2266 Self::PartTypeEffect => Some("PartTypeEffect"),
2267 Self::PartTypeMesh => Some("PartTypeMesh"),
2268 Self::PartTypeMovenode => Some("PartTypeMovenode"),
2269 Self::PartTypeConstraint => Some("PartTypeConstraint"),
2270 Self::PartTypeMask => Some("PartTypeMask"),
2271 Self::PartTypeJoint => Some("PartTypeJoint"),
2272 Self::PartTypeBonepoint => Some("PartTypeBonepoint"),
2273 Self::PartTypeTransformConstraint => Some("PartTypeTransformConstraint"),
2274 Self::PartTypeCamera => Some("PartTypeCamera"),
2275 Self::PartTypeAudio => Some("PartTypeAudio"),
2276 _ => None,
2277 }
2278 }
2279}
2280impl ::core::fmt::Debug for PartType {
2281 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
2282 if let Some(name) = self.variant_name() {
2283 f.write_str(name)
2284 } else {
2285 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
2286 }
2287 }
2288}
2289impl<'a> ::flatbuffers::Follow<'a> for PartType {
2290 type Inner = Self;
2291 #[inline]
2292 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2293 let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
2294 Self(b)
2295 }
2296}
2297
2298impl ::flatbuffers::Push for PartType {
2299 type Output = PartType;
2300 #[inline]
2301 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
2302 unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
2303 }
2304}
2305
2306impl ::flatbuffers::EndianScalar for PartType {
2307 type Scalar = u8;
2308 #[inline]
2309 fn to_little_endian(self) -> u8 {
2310 self.0.to_le()
2311 }
2312 #[inline]
2313 #[allow(clippy::wrong_self_convention)]
2314 fn from_little_endian(v: u8) -> Self {
2315 let b = u8::from_le(v);
2316 Self(b)
2317 }
2318}
2319
2320impl<'a> ::flatbuffers::Verifiable for PartType {
2321 #[inline]
2322 fn run_verifier(
2323 v: &mut ::flatbuffers::Verifier, pos: usize
2324 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
2325 u8::run_verifier(v, pos)
2326 }
2327}
2328
2329impl ::flatbuffers::SimpleToVerifyInSlice for PartType {}
2330pub struct PartTypeUnionTableOffset {}
2331
2332#[allow(clippy::upper_case_acronyms)]
2333#[non_exhaustive]
2334#[derive(Debug, Clone, PartialEq)]
2335pub enum PartTypeT {
2336 NONE,
2337 PartTypeNull(alloc::boxed::Box<NoneValueEntryT>),
2338 PartTypeNormal(alloc::boxed::Box<NoneValueEntryT>),
2339 PartTypeShape(alloc::boxed::Box<PartTypeShapeT>),
2340 PartTypeText(alloc::boxed::Box<PartTypeTextT>),
2341 PartTypeNines(alloc::boxed::Box<PartTypeNinesT>),
2342 PartTypeInstance(alloc::boxed::Box<PartTypeInstanceT>),
2343 PartTypeArmature(alloc::boxed::Box<NoneValueEntryT>),
2344 PartTypeEffect(alloc::boxed::Box<PartTypeEffectT>),
2345 PartTypeMesh(alloc::boxed::Box<NoneValueEntryT>),
2346 PartTypeMovenode(alloc::boxed::Box<NoneValueEntryT>),
2347 PartTypeConstraint(alloc::boxed::Box<NoneValueEntryT>),
2348 PartTypeMask(alloc::boxed::Box<NoneValueEntryT>),
2349 PartTypeJoint(alloc::boxed::Box<NoneValueEntryT>),
2350 PartTypeBonepoint(alloc::boxed::Box<NoneValueEntryT>),
2351 PartTypeTransformConstraint(alloc::boxed::Box<NoneValueEntryT>),
2352 PartTypeCamera(alloc::boxed::Box<NoneValueEntryT>),
2353 PartTypeAudio(alloc::boxed::Box<NoneValueEntryT>),
2354}
2355impl Default for PartTypeT {
2356 fn default() -> Self {
2357 Self::NONE
2358 }
2359}
2360impl PartTypeT {
2361 pub fn part_type_type(&self) -> PartType {
2362 match self {
2363 Self::NONE => PartType::NONE,
2364 Self::PartTypeNull(_) => PartType::PartTypeNull,
2365 Self::PartTypeNormal(_) => PartType::PartTypeNormal,
2366 Self::PartTypeShape(_) => PartType::PartTypeShape,
2367 Self::PartTypeText(_) => PartType::PartTypeText,
2368 Self::PartTypeNines(_) => PartType::PartTypeNines,
2369 Self::PartTypeInstance(_) => PartType::PartTypeInstance,
2370 Self::PartTypeArmature(_) => PartType::PartTypeArmature,
2371 Self::PartTypeEffect(_) => PartType::PartTypeEffect,
2372 Self::PartTypeMesh(_) => PartType::PartTypeMesh,
2373 Self::PartTypeMovenode(_) => PartType::PartTypeMovenode,
2374 Self::PartTypeConstraint(_) => PartType::PartTypeConstraint,
2375 Self::PartTypeMask(_) => PartType::PartTypeMask,
2376 Self::PartTypeJoint(_) => PartType::PartTypeJoint,
2377 Self::PartTypeBonepoint(_) => PartType::PartTypeBonepoint,
2378 Self::PartTypeTransformConstraint(_) => PartType::PartTypeTransformConstraint,
2379 Self::PartTypeCamera(_) => PartType::PartTypeCamera,
2380 Self::PartTypeAudio(_) => PartType::PartTypeAudio,
2381 }
2382 }
2383 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(&self, fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>) -> Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>> {
2384 match self {
2385 Self::NONE => None,
2386 Self::PartTypeNull(v) => Some(v.pack(fbb).as_union_value()),
2387 Self::PartTypeNormal(v) => Some(v.pack(fbb).as_union_value()),
2388 Self::PartTypeShape(v) => Some(v.pack(fbb).as_union_value()),
2389 Self::PartTypeText(v) => Some(v.pack(fbb).as_union_value()),
2390 Self::PartTypeNines(v) => Some(v.pack(fbb).as_union_value()),
2391 Self::PartTypeInstance(v) => Some(v.pack(fbb).as_union_value()),
2392 Self::PartTypeArmature(v) => Some(v.pack(fbb).as_union_value()),
2393 Self::PartTypeEffect(v) => Some(v.pack(fbb).as_union_value()),
2394 Self::PartTypeMesh(v) => Some(v.pack(fbb).as_union_value()),
2395 Self::PartTypeMovenode(v) => Some(v.pack(fbb).as_union_value()),
2396 Self::PartTypeConstraint(v) => Some(v.pack(fbb).as_union_value()),
2397 Self::PartTypeMask(v) => Some(v.pack(fbb).as_union_value()),
2398 Self::PartTypeJoint(v) => Some(v.pack(fbb).as_union_value()),
2399 Self::PartTypeBonepoint(v) => Some(v.pack(fbb).as_union_value()),
2400 Self::PartTypeTransformConstraint(v) => Some(v.pack(fbb).as_union_value()),
2401 Self::PartTypeCamera(v) => Some(v.pack(fbb).as_union_value()),
2402 Self::PartTypeAudio(v) => Some(v.pack(fbb).as_union_value()),
2403 }
2404 }
2405 pub fn take_part_type_null(&mut self) -> Option<alloc::boxed::Box<NoneValueEntryT>> {
2407 if let Self::PartTypeNull(_) = self {
2408 let v = ::core::mem::replace(self, Self::NONE);
2409 if let Self::PartTypeNull(w) = v {
2410 Some(w)
2411 } else {
2412 unreachable!()
2413 }
2414 } else {
2415 None
2416 }
2417 }
2418 pub fn as_part_type_null(&self) -> Option<&NoneValueEntryT> {
2420 if let Self::PartTypeNull(v) = self { Some(v.as_ref()) } else { None }
2421 }
2422 pub fn as_part_type_null_mut(&mut self) -> Option<&mut NoneValueEntryT> {
2424 if let Self::PartTypeNull(v) = self { Some(v.as_mut()) } else { None }
2425 }
2426 pub fn take_part_type_normal(&mut self) -> Option<alloc::boxed::Box<NoneValueEntryT>> {
2428 if let Self::PartTypeNormal(_) = self {
2429 let v = ::core::mem::replace(self, Self::NONE);
2430 if let Self::PartTypeNormal(w) = v {
2431 Some(w)
2432 } else {
2433 unreachable!()
2434 }
2435 } else {
2436 None
2437 }
2438 }
2439 pub fn as_part_type_normal(&self) -> Option<&NoneValueEntryT> {
2441 if let Self::PartTypeNormal(v) = self { Some(v.as_ref()) } else { None }
2442 }
2443 pub fn as_part_type_normal_mut(&mut self) -> Option<&mut NoneValueEntryT> {
2445 if let Self::PartTypeNormal(v) = self { Some(v.as_mut()) } else { None }
2446 }
2447 pub fn take_part_type_shape(&mut self) -> Option<alloc::boxed::Box<PartTypeShapeT>> {
2449 if let Self::PartTypeShape(_) = self {
2450 let v = ::core::mem::replace(self, Self::NONE);
2451 if let Self::PartTypeShape(w) = v {
2452 Some(w)
2453 } else {
2454 unreachable!()
2455 }
2456 } else {
2457 None
2458 }
2459 }
2460 pub fn as_part_type_shape(&self) -> Option<&PartTypeShapeT> {
2462 if let Self::PartTypeShape(v) = self { Some(v.as_ref()) } else { None }
2463 }
2464 pub fn as_part_type_shape_mut(&mut self) -> Option<&mut PartTypeShapeT> {
2466 if let Self::PartTypeShape(v) = self { Some(v.as_mut()) } else { None }
2467 }
2468 pub fn take_part_type_text(&mut self) -> Option<alloc::boxed::Box<PartTypeTextT>> {
2470 if let Self::PartTypeText(_) = self {
2471 let v = ::core::mem::replace(self, Self::NONE);
2472 if let Self::PartTypeText(w) = v {
2473 Some(w)
2474 } else {
2475 unreachable!()
2476 }
2477 } else {
2478 None
2479 }
2480 }
2481 pub fn as_part_type_text(&self) -> Option<&PartTypeTextT> {
2483 if let Self::PartTypeText(v) = self { Some(v.as_ref()) } else { None }
2484 }
2485 pub fn as_part_type_text_mut(&mut self) -> Option<&mut PartTypeTextT> {
2487 if let Self::PartTypeText(v) = self { Some(v.as_mut()) } else { None }
2488 }
2489 pub fn take_part_type_nines(&mut self) -> Option<alloc::boxed::Box<PartTypeNinesT>> {
2491 if let Self::PartTypeNines(_) = self {
2492 let v = ::core::mem::replace(self, Self::NONE);
2493 if let Self::PartTypeNines(w) = v {
2494 Some(w)
2495 } else {
2496 unreachable!()
2497 }
2498 } else {
2499 None
2500 }
2501 }
2502 pub fn as_part_type_nines(&self) -> Option<&PartTypeNinesT> {
2504 if let Self::PartTypeNines(v) = self { Some(v.as_ref()) } else { None }
2505 }
2506 pub fn as_part_type_nines_mut(&mut self) -> Option<&mut PartTypeNinesT> {
2508 if let Self::PartTypeNines(v) = self { Some(v.as_mut()) } else { None }
2509 }
2510 pub fn take_part_type_instance(&mut self) -> Option<alloc::boxed::Box<PartTypeInstanceT>> {
2512 if let Self::PartTypeInstance(_) = self {
2513 let v = ::core::mem::replace(self, Self::NONE);
2514 if let Self::PartTypeInstance(w) = v {
2515 Some(w)
2516 } else {
2517 unreachable!()
2518 }
2519 } else {
2520 None
2521 }
2522 }
2523 pub fn as_part_type_instance(&self) -> Option<&PartTypeInstanceT> {
2525 if let Self::PartTypeInstance(v) = self { Some(v.as_ref()) } else { None }
2526 }
2527 pub fn as_part_type_instance_mut(&mut self) -> Option<&mut PartTypeInstanceT> {
2529 if let Self::PartTypeInstance(v) = self { Some(v.as_mut()) } else { None }
2530 }
2531 pub fn take_part_type_armature(&mut self) -> Option<alloc::boxed::Box<NoneValueEntryT>> {
2533 if let Self::PartTypeArmature(_) = self {
2534 let v = ::core::mem::replace(self, Self::NONE);
2535 if let Self::PartTypeArmature(w) = v {
2536 Some(w)
2537 } else {
2538 unreachable!()
2539 }
2540 } else {
2541 None
2542 }
2543 }
2544 pub fn as_part_type_armature(&self) -> Option<&NoneValueEntryT> {
2546 if let Self::PartTypeArmature(v) = self { Some(v.as_ref()) } else { None }
2547 }
2548 pub fn as_part_type_armature_mut(&mut self) -> Option<&mut NoneValueEntryT> {
2550 if let Self::PartTypeArmature(v) = self { Some(v.as_mut()) } else { None }
2551 }
2552 pub fn take_part_type_effect(&mut self) -> Option<alloc::boxed::Box<PartTypeEffectT>> {
2554 if let Self::PartTypeEffect(_) = self {
2555 let v = ::core::mem::replace(self, Self::NONE);
2556 if let Self::PartTypeEffect(w) = v {
2557 Some(w)
2558 } else {
2559 unreachable!()
2560 }
2561 } else {
2562 None
2563 }
2564 }
2565 pub fn as_part_type_effect(&self) -> Option<&PartTypeEffectT> {
2567 if let Self::PartTypeEffect(v) = self { Some(v.as_ref()) } else { None }
2568 }
2569 pub fn as_part_type_effect_mut(&mut self) -> Option<&mut PartTypeEffectT> {
2571 if let Self::PartTypeEffect(v) = self { Some(v.as_mut()) } else { None }
2572 }
2573 pub fn take_part_type_mesh(&mut self) -> Option<alloc::boxed::Box<NoneValueEntryT>> {
2575 if let Self::PartTypeMesh(_) = self {
2576 let v = ::core::mem::replace(self, Self::NONE);
2577 if let Self::PartTypeMesh(w) = v {
2578 Some(w)
2579 } else {
2580 unreachable!()
2581 }
2582 } else {
2583 None
2584 }
2585 }
2586 pub fn as_part_type_mesh(&self) -> Option<&NoneValueEntryT> {
2588 if let Self::PartTypeMesh(v) = self { Some(v.as_ref()) } else { None }
2589 }
2590 pub fn as_part_type_mesh_mut(&mut self) -> Option<&mut NoneValueEntryT> {
2592 if let Self::PartTypeMesh(v) = self { Some(v.as_mut()) } else { None }
2593 }
2594 pub fn take_part_type_movenode(&mut self) -> Option<alloc::boxed::Box<NoneValueEntryT>> {
2596 if let Self::PartTypeMovenode(_) = self {
2597 let v = ::core::mem::replace(self, Self::NONE);
2598 if let Self::PartTypeMovenode(w) = v {
2599 Some(w)
2600 } else {
2601 unreachable!()
2602 }
2603 } else {
2604 None
2605 }
2606 }
2607 pub fn as_part_type_movenode(&self) -> Option<&NoneValueEntryT> {
2609 if let Self::PartTypeMovenode(v) = self { Some(v.as_ref()) } else { None }
2610 }
2611 pub fn as_part_type_movenode_mut(&mut self) -> Option<&mut NoneValueEntryT> {
2613 if let Self::PartTypeMovenode(v) = self { Some(v.as_mut()) } else { None }
2614 }
2615 pub fn take_part_type_constraint(&mut self) -> Option<alloc::boxed::Box<NoneValueEntryT>> {
2617 if let Self::PartTypeConstraint(_) = self {
2618 let v = ::core::mem::replace(self, Self::NONE);
2619 if let Self::PartTypeConstraint(w) = v {
2620 Some(w)
2621 } else {
2622 unreachable!()
2623 }
2624 } else {
2625 None
2626 }
2627 }
2628 pub fn as_part_type_constraint(&self) -> Option<&NoneValueEntryT> {
2630 if let Self::PartTypeConstraint(v) = self { Some(v.as_ref()) } else { None }
2631 }
2632 pub fn as_part_type_constraint_mut(&mut self) -> Option<&mut NoneValueEntryT> {
2634 if let Self::PartTypeConstraint(v) = self { Some(v.as_mut()) } else { None }
2635 }
2636 pub fn take_part_type_mask(&mut self) -> Option<alloc::boxed::Box<NoneValueEntryT>> {
2638 if let Self::PartTypeMask(_) = self {
2639 let v = ::core::mem::replace(self, Self::NONE);
2640 if let Self::PartTypeMask(w) = v {
2641 Some(w)
2642 } else {
2643 unreachable!()
2644 }
2645 } else {
2646 None
2647 }
2648 }
2649 pub fn as_part_type_mask(&self) -> Option<&NoneValueEntryT> {
2651 if let Self::PartTypeMask(v) = self { Some(v.as_ref()) } else { None }
2652 }
2653 pub fn as_part_type_mask_mut(&mut self) -> Option<&mut NoneValueEntryT> {
2655 if let Self::PartTypeMask(v) = self { Some(v.as_mut()) } else { None }
2656 }
2657 pub fn take_part_type_joint(&mut self) -> Option<alloc::boxed::Box<NoneValueEntryT>> {
2659 if let Self::PartTypeJoint(_) = self {
2660 let v = ::core::mem::replace(self, Self::NONE);
2661 if let Self::PartTypeJoint(w) = v {
2662 Some(w)
2663 } else {
2664 unreachable!()
2665 }
2666 } else {
2667 None
2668 }
2669 }
2670 pub fn as_part_type_joint(&self) -> Option<&NoneValueEntryT> {
2672 if let Self::PartTypeJoint(v) = self { Some(v.as_ref()) } else { None }
2673 }
2674 pub fn as_part_type_joint_mut(&mut self) -> Option<&mut NoneValueEntryT> {
2676 if let Self::PartTypeJoint(v) = self { Some(v.as_mut()) } else { None }
2677 }
2678 pub fn take_part_type_bonepoint(&mut self) -> Option<alloc::boxed::Box<NoneValueEntryT>> {
2680 if let Self::PartTypeBonepoint(_) = self {
2681 let v = ::core::mem::replace(self, Self::NONE);
2682 if let Self::PartTypeBonepoint(w) = v {
2683 Some(w)
2684 } else {
2685 unreachable!()
2686 }
2687 } else {
2688 None
2689 }
2690 }
2691 pub fn as_part_type_bonepoint(&self) -> Option<&NoneValueEntryT> {
2693 if let Self::PartTypeBonepoint(v) = self { Some(v.as_ref()) } else { None }
2694 }
2695 pub fn as_part_type_bonepoint_mut(&mut self) -> Option<&mut NoneValueEntryT> {
2697 if let Self::PartTypeBonepoint(v) = self { Some(v.as_mut()) } else { None }
2698 }
2699 pub fn take_part_type_transform_constraint(&mut self) -> Option<alloc::boxed::Box<NoneValueEntryT>> {
2701 if let Self::PartTypeTransformConstraint(_) = self {
2702 let v = ::core::mem::replace(self, Self::NONE);
2703 if let Self::PartTypeTransformConstraint(w) = v {
2704 Some(w)
2705 } else {
2706 unreachable!()
2707 }
2708 } else {
2709 None
2710 }
2711 }
2712 pub fn as_part_type_transform_constraint(&self) -> Option<&NoneValueEntryT> {
2714 if let Self::PartTypeTransformConstraint(v) = self { Some(v.as_ref()) } else { None }
2715 }
2716 pub fn as_part_type_transform_constraint_mut(&mut self) -> Option<&mut NoneValueEntryT> {
2718 if let Self::PartTypeTransformConstraint(v) = self { Some(v.as_mut()) } else { None }
2719 }
2720 pub fn take_part_type_camera(&mut self) -> Option<alloc::boxed::Box<NoneValueEntryT>> {
2722 if let Self::PartTypeCamera(_) = self {
2723 let v = ::core::mem::replace(self, Self::NONE);
2724 if let Self::PartTypeCamera(w) = v {
2725 Some(w)
2726 } else {
2727 unreachable!()
2728 }
2729 } else {
2730 None
2731 }
2732 }
2733 pub fn as_part_type_camera(&self) -> Option<&NoneValueEntryT> {
2735 if let Self::PartTypeCamera(v) = self { Some(v.as_ref()) } else { None }
2736 }
2737 pub fn as_part_type_camera_mut(&mut self) -> Option<&mut NoneValueEntryT> {
2739 if let Self::PartTypeCamera(v) = self { Some(v.as_mut()) } else { None }
2740 }
2741 pub fn take_part_type_audio(&mut self) -> Option<alloc::boxed::Box<NoneValueEntryT>> {
2743 if let Self::PartTypeAudio(_) = self {
2744 let v = ::core::mem::replace(self, Self::NONE);
2745 if let Self::PartTypeAudio(w) = v {
2746 Some(w)
2747 } else {
2748 unreachable!()
2749 }
2750 } else {
2751 None
2752 }
2753 }
2754 pub fn as_part_type_audio(&self) -> Option<&NoneValueEntryT> {
2756 if let Self::PartTypeAudio(v) = self { Some(v.as_ref()) } else { None }
2757 }
2758 pub fn as_part_type_audio_mut(&mut self) -> Option<&mut NoneValueEntryT> {
2760 if let Self::PartTypeAudio(v) = self { Some(v.as_mut()) } else { None }
2761 }
2762}
2763#[repr(transparent)]
2765#[derive(Clone, Copy, PartialEq)]
2766pub struct KeyCurve(pub [u8; 16]);
2767impl Default for KeyCurve {
2768 fn default() -> Self {
2769 Self([0; 16])
2770 }
2771}
2772impl ::core::fmt::Debug for KeyCurve {
2773 fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
2774 f.debug_struct("KeyCurve")
2775 .field("start_time", &self.start_time())
2776 .field("start_value", &self.start_value())
2777 .field("end_time", &self.end_time())
2778 .field("end_value", &self.end_value())
2779 .finish()
2780 }
2781}
2782
2783impl ::flatbuffers::SimpleToVerifyInSlice for KeyCurve {}
2784impl<'a> ::flatbuffers::Follow<'a> for KeyCurve {
2785 type Inner = &'a KeyCurve;
2786 #[inline]
2787 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2788 unsafe { <&'a KeyCurve>::follow(buf, loc) }
2789 }
2790}
2791impl<'a> ::flatbuffers::Follow<'a> for &'a KeyCurve {
2792 type Inner = &'a KeyCurve;
2793 #[inline]
2794 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2795 unsafe { ::flatbuffers::follow_cast_ref::<KeyCurve>(buf, loc) }
2796 }
2797}
2798impl<'b> ::flatbuffers::Push for KeyCurve {
2799 type Output = KeyCurve;
2800 #[inline]
2801 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
2802 let src = unsafe { ::core::slice::from_raw_parts(self as *const KeyCurve as *const u8, <Self as ::flatbuffers::Push>::size()) };
2803 dst.copy_from_slice(src);
2804 }
2805 #[inline]
2806 fn alignment() -> ::flatbuffers::PushAlignment {
2807 ::flatbuffers::PushAlignment::new(4)
2808 }
2809}
2810
2811impl<'a> ::flatbuffers::Verifiable for KeyCurve {
2812 #[inline]
2813 fn run_verifier(
2814 v: &mut ::flatbuffers::Verifier, pos: usize
2815 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
2816 v.in_buffer::<Self>(pos)
2817 }
2818}
2819
2820impl<'a> KeyCurve {
2821 #[allow(clippy::too_many_arguments)]
2822 pub fn new(
2823 start_time: f32,
2824 start_value: f32,
2825 end_time: f32,
2826 end_value: f32,
2827 ) -> Self {
2828 let mut s = Self([0; 16]);
2829 s.set_start_time(start_time);
2830 s.set_start_value(start_value);
2831 s.set_end_time(end_time);
2832 s.set_end_value(end_value);
2833 s
2834 }
2835
2836 pub fn start_time(&self) -> f32 {
2837 let mut mem = ::core::mem::MaybeUninit::<<f32 as ::flatbuffers::EndianScalar>::Scalar>::uninit();
2838 ::flatbuffers::EndianScalar::from_little_endian(unsafe {
2842 ::core::ptr::copy_nonoverlapping(
2843 self.0[0..].as_ptr(),
2844 mem.as_mut_ptr() as *mut u8,
2845 ::core::mem::size_of::<<f32 as ::flatbuffers::EndianScalar>::Scalar>(),
2846 );
2847 mem.assume_init()
2848 })
2849 }
2850
2851 pub fn set_start_time(&mut self, x: f32) {
2852 let x_le = ::flatbuffers::EndianScalar::to_little_endian(x);
2853 unsafe {
2857 ::core::ptr::copy_nonoverlapping(
2858 &x_le as *const _ as *const u8,
2859 self.0[0..].as_mut_ptr(),
2860 ::core::mem::size_of::<<f32 as ::flatbuffers::EndianScalar>::Scalar>(),
2861 );
2862 }
2863 }
2864
2865 pub fn start_value(&self) -> f32 {
2866 let mut mem = ::core::mem::MaybeUninit::<<f32 as ::flatbuffers::EndianScalar>::Scalar>::uninit();
2867 ::flatbuffers::EndianScalar::from_little_endian(unsafe {
2871 ::core::ptr::copy_nonoverlapping(
2872 self.0[4..].as_ptr(),
2873 mem.as_mut_ptr() as *mut u8,
2874 ::core::mem::size_of::<<f32 as ::flatbuffers::EndianScalar>::Scalar>(),
2875 );
2876 mem.assume_init()
2877 })
2878 }
2879
2880 pub fn set_start_value(&mut self, x: f32) {
2881 let x_le = ::flatbuffers::EndianScalar::to_little_endian(x);
2882 unsafe {
2886 ::core::ptr::copy_nonoverlapping(
2887 &x_le as *const _ as *const u8,
2888 self.0[4..].as_mut_ptr(),
2889 ::core::mem::size_of::<<f32 as ::flatbuffers::EndianScalar>::Scalar>(),
2890 );
2891 }
2892 }
2893
2894 pub fn end_time(&self) -> f32 {
2895 let mut mem = ::core::mem::MaybeUninit::<<f32 as ::flatbuffers::EndianScalar>::Scalar>::uninit();
2896 ::flatbuffers::EndianScalar::from_little_endian(unsafe {
2900 ::core::ptr::copy_nonoverlapping(
2901 self.0[8..].as_ptr(),
2902 mem.as_mut_ptr() as *mut u8,
2903 ::core::mem::size_of::<<f32 as ::flatbuffers::EndianScalar>::Scalar>(),
2904 );
2905 mem.assume_init()
2906 })
2907 }
2908
2909 pub fn set_end_time(&mut self, x: f32) {
2910 let x_le = ::flatbuffers::EndianScalar::to_little_endian(x);
2911 unsafe {
2915 ::core::ptr::copy_nonoverlapping(
2916 &x_le as *const _ as *const u8,
2917 self.0[8..].as_mut_ptr(),
2918 ::core::mem::size_of::<<f32 as ::flatbuffers::EndianScalar>::Scalar>(),
2919 );
2920 }
2921 }
2922
2923 pub fn end_value(&self) -> f32 {
2924 let mut mem = ::core::mem::MaybeUninit::<<f32 as ::flatbuffers::EndianScalar>::Scalar>::uninit();
2925 ::flatbuffers::EndianScalar::from_little_endian(unsafe {
2929 ::core::ptr::copy_nonoverlapping(
2930 self.0[12..].as_ptr(),
2931 mem.as_mut_ptr() as *mut u8,
2932 ::core::mem::size_of::<<f32 as ::flatbuffers::EndianScalar>::Scalar>(),
2933 );
2934 mem.assume_init()
2935 })
2936 }
2937
2938 pub fn set_end_value(&mut self, x: f32) {
2939 let x_le = ::flatbuffers::EndianScalar::to_little_endian(x);
2940 unsafe {
2944 ::core::ptr::copy_nonoverlapping(
2945 &x_le as *const _ as *const u8,
2946 self.0[12..].as_mut_ptr(),
2947 ::core::mem::size_of::<<f32 as ::flatbuffers::EndianScalar>::Scalar>(),
2948 );
2949 }
2950 }
2951
2952 pub fn unpack(&self) -> KeyCurveT {
2953 KeyCurveT {
2954 start_time: self.start_time(),
2955 start_value: self.start_value(),
2956 end_time: self.end_time(),
2957 end_value: self.end_value(),
2958 }
2959 }
2960}
2961
2962#[derive(Debug, Clone, PartialEq, Default)]
2963pub struct KeyCurveT {
2964 pub start_time: f32,
2965 pub start_value: f32,
2966 pub end_time: f32,
2967 pub end_value: f32,
2968}
2969impl KeyCurveT {
2970 pub fn pack(&self) -> KeyCurve {
2971 KeyCurve::new(
2972 self.start_time,
2973 self.start_value,
2974 self.end_time,
2975 self.end_value,
2976 )
2977 }
2978}
2979
2980pub enum Vec2Offset {}
2981#[derive(Copy, Clone, PartialEq)]
2982
2983pub struct Vec2<'a> {
2984 pub _tab: ::flatbuffers::Table<'a>,
2985}
2986
2987impl<'a> ::flatbuffers::Follow<'a> for Vec2<'a> {
2988 type Inner = Vec2<'a>;
2989 #[inline]
2990 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2991 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
2992 }
2993}
2994
2995impl<'a> Vec2<'a> {
2996 pub const VT_V1: ::flatbuffers::VOffsetT = 4;
2997 pub const VT_V2: ::flatbuffers::VOffsetT = 6;
2998
2999 #[inline]
3000 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
3001 Vec2 { _tab: table }
3002 }
3003 #[allow(unused_mut)]
3004 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
3005 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
3006 args: &'args Vec2Args
3007 ) -> ::flatbuffers::WIPOffset<Vec2<'bldr>> {
3008 let mut builder = Vec2Builder::new(_fbb);
3009 builder.add_v2(args.v2);
3010 builder.add_v1(args.v1);
3011 builder.finish()
3012 }
3013
3014 pub fn unpack(&self) -> Vec2T {
3015 let v1 = self.v1();
3016 let v2 = self.v2();
3017 Vec2T {
3018 v1,
3019 v2,
3020 }
3021 }
3022
3023 #[inline]
3024 pub fn v1(&self) -> f32 {
3025 unsafe { self._tab.get::<f32>(Vec2::VT_V1, Some(0.0)).unwrap()}
3029 }
3030 #[inline]
3031 pub fn v2(&self) -> f32 {
3032 unsafe { self._tab.get::<f32>(Vec2::VT_V2, Some(0.0)).unwrap()}
3036 }
3037}
3038
3039impl ::flatbuffers::Verifiable for Vec2<'_> {
3040 #[inline]
3041 fn run_verifier(
3042 v: &mut ::flatbuffers::Verifier, pos: usize
3043 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
3044 v.visit_table(pos)?
3045 .visit_field::<f32>("v1", Self::VT_V1, false)?
3046 .visit_field::<f32>("v2", Self::VT_V2, false)?
3047 .finish();
3048 Ok(())
3049 }
3050}
3051pub struct Vec2Args {
3052 pub v1: f32,
3053 pub v2: f32,
3054}
3055impl<'a> Default for Vec2Args {
3056 #[inline]
3057 fn default() -> Self {
3058 Vec2Args {
3059 v1: 0.0,
3060 v2: 0.0,
3061 }
3062 }
3063}
3064
3065pub struct Vec2Builder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
3066 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
3067 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
3068}
3069impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> Vec2Builder<'a, 'b, A> {
3070 #[inline]
3071 pub fn add_v1(&mut self, v1: f32) {
3072 self.fbb_.push_slot::<f32>(Vec2::VT_V1, v1, 0.0);
3073 }
3074 #[inline]
3075 pub fn add_v2(&mut self, v2: f32) {
3076 self.fbb_.push_slot::<f32>(Vec2::VT_V2, v2, 0.0);
3077 }
3078 #[inline]
3079 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> Vec2Builder<'a, 'b, A> {
3080 let start = _fbb.start_table();
3081 Vec2Builder {
3082 fbb_: _fbb,
3083 start_: start,
3084 }
3085 }
3086 #[inline]
3087 pub fn finish(self) -> ::flatbuffers::WIPOffset<Vec2<'a>> {
3088 let o = self.fbb_.end_table(self.start_);
3089 ::flatbuffers::WIPOffset::new(o.value())
3090 }
3091}
3092
3093impl ::core::fmt::Debug for Vec2<'_> {
3094 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3095 let mut ds = f.debug_struct("Vec2");
3096 ds.field("v1", &self.v1());
3097 ds.field("v2", &self.v2());
3098 ds.finish()
3099 }
3100}
3101#[non_exhaustive]
3102#[derive(Debug, Clone, PartialEq)]
3103pub struct Vec2T {
3104 pub v1: f32,
3105 pub v2: f32,
3106}
3107impl Default for Vec2T {
3108 fn default() -> Self {
3109 Self {
3110 v1: 0.0,
3111 v2: 0.0,
3112 }
3113 }
3114}
3115impl Vec2T {
3116 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
3117 &self,
3118 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
3119 ) -> ::flatbuffers::WIPOffset<Vec2<'b>> {
3120 let v1 = self.v1;
3121 let v2 = self.v2;
3122 Vec2::create(_fbb, &Vec2Args{
3123 v1,
3124 v2,
3125 })
3126 }
3127}
3128pub enum BoundsOffset {}
3129#[derive(Copy, Clone, PartialEq)]
3130
3131pub struct Bounds<'a> {
3132 pub _tab: ::flatbuffers::Table<'a>,
3133}
3134
3135impl<'a> ::flatbuffers::Follow<'a> for Bounds<'a> {
3136 type Inner = Bounds<'a>;
3137 #[inline]
3138 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3139 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
3140 }
3141}
3142
3143impl<'a> Bounds<'a> {
3144 pub const VT_LEFT: ::flatbuffers::VOffsetT = 4;
3145 pub const VT_TOP: ::flatbuffers::VOffsetT = 6;
3146 pub const VT_RIGHT: ::flatbuffers::VOffsetT = 8;
3147 pub const VT_BOTTOM: ::flatbuffers::VOffsetT = 10;
3148
3149 #[inline]
3150 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
3151 Bounds { _tab: table }
3152 }
3153 #[allow(unused_mut)]
3154 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
3155 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
3156 args: &'args BoundsArgs
3157 ) -> ::flatbuffers::WIPOffset<Bounds<'bldr>> {
3158 let mut builder = BoundsBuilder::new(_fbb);
3159 builder.add_bottom(args.bottom);
3160 builder.add_right(args.right);
3161 builder.add_top(args.top);
3162 builder.add_left(args.left);
3163 builder.finish()
3164 }
3165
3166 pub fn unpack(&self) -> BoundsT {
3167 let left = self.left();
3168 let top = self.top();
3169 let right = self.right();
3170 let bottom = self.bottom();
3171 BoundsT {
3172 left,
3173 top,
3174 right,
3175 bottom,
3176 }
3177 }
3178
3179 #[inline]
3180 pub fn left(&self) -> f32 {
3181 unsafe { self._tab.get::<f32>(Bounds::VT_LEFT, Some(0.0)).unwrap()}
3185 }
3186 #[inline]
3187 pub fn top(&self) -> f32 {
3188 unsafe { self._tab.get::<f32>(Bounds::VT_TOP, Some(0.0)).unwrap()}
3192 }
3193 #[inline]
3194 pub fn right(&self) -> f32 {
3195 unsafe { self._tab.get::<f32>(Bounds::VT_RIGHT, Some(0.0)).unwrap()}
3199 }
3200 #[inline]
3201 pub fn bottom(&self) -> f32 {
3202 unsafe { self._tab.get::<f32>(Bounds::VT_BOTTOM, Some(0.0)).unwrap()}
3206 }
3207}
3208
3209impl ::flatbuffers::Verifiable for Bounds<'_> {
3210 #[inline]
3211 fn run_verifier(
3212 v: &mut ::flatbuffers::Verifier, pos: usize
3213 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
3214 v.visit_table(pos)?
3215 .visit_field::<f32>("left", Self::VT_LEFT, false)?
3216 .visit_field::<f32>("top", Self::VT_TOP, false)?
3217 .visit_field::<f32>("right", Self::VT_RIGHT, false)?
3218 .visit_field::<f32>("bottom", Self::VT_BOTTOM, false)?
3219 .finish();
3220 Ok(())
3221 }
3222}
3223pub struct BoundsArgs {
3224 pub left: f32,
3225 pub top: f32,
3226 pub right: f32,
3227 pub bottom: f32,
3228}
3229impl<'a> Default for BoundsArgs {
3230 #[inline]
3231 fn default() -> Self {
3232 BoundsArgs {
3233 left: 0.0,
3234 top: 0.0,
3235 right: 0.0,
3236 bottom: 0.0,
3237 }
3238 }
3239}
3240
3241pub struct BoundsBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
3242 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
3243 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
3244}
3245impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> BoundsBuilder<'a, 'b, A> {
3246 #[inline]
3247 pub fn add_left(&mut self, left: f32) {
3248 self.fbb_.push_slot::<f32>(Bounds::VT_LEFT, left, 0.0);
3249 }
3250 #[inline]
3251 pub fn add_top(&mut self, top: f32) {
3252 self.fbb_.push_slot::<f32>(Bounds::VT_TOP, top, 0.0);
3253 }
3254 #[inline]
3255 pub fn add_right(&mut self, right: f32) {
3256 self.fbb_.push_slot::<f32>(Bounds::VT_RIGHT, right, 0.0);
3257 }
3258 #[inline]
3259 pub fn add_bottom(&mut self, bottom: f32) {
3260 self.fbb_.push_slot::<f32>(Bounds::VT_BOTTOM, bottom, 0.0);
3261 }
3262 #[inline]
3263 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> BoundsBuilder<'a, 'b, A> {
3264 let start = _fbb.start_table();
3265 BoundsBuilder {
3266 fbb_: _fbb,
3267 start_: start,
3268 }
3269 }
3270 #[inline]
3271 pub fn finish(self) -> ::flatbuffers::WIPOffset<Bounds<'a>> {
3272 let o = self.fbb_.end_table(self.start_);
3273 ::flatbuffers::WIPOffset::new(o.value())
3274 }
3275}
3276
3277impl ::core::fmt::Debug for Bounds<'_> {
3278 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3279 let mut ds = f.debug_struct("Bounds");
3280 ds.field("left", &self.left());
3281 ds.field("top", &self.top());
3282 ds.field("right", &self.right());
3283 ds.field("bottom", &self.bottom());
3284 ds.finish()
3285 }
3286}
3287#[non_exhaustive]
3288#[derive(Debug, Clone, PartialEq)]
3289pub struct BoundsT {
3290 pub left: f32,
3291 pub top: f32,
3292 pub right: f32,
3293 pub bottom: f32,
3294}
3295impl Default for BoundsT {
3296 fn default() -> Self {
3297 Self {
3298 left: 0.0,
3299 top: 0.0,
3300 right: 0.0,
3301 bottom: 0.0,
3302 }
3303 }
3304}
3305impl BoundsT {
3306 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
3307 &self,
3308 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
3309 ) -> ::flatbuffers::WIPOffset<Bounds<'b>> {
3310 let left = self.left;
3311 let top = self.top;
3312 let right = self.right;
3313 let bottom = self.bottom;
3314 Bounds::create(_fbb, &BoundsArgs{
3315 left,
3316 top,
3317 right,
3318 bottom,
3319 })
3320 }
3321}
3322pub enum RegionOffset {}
3323#[derive(Copy, Clone, PartialEq)]
3324
3325pub struct Region<'a> {
3326 pub _tab: ::flatbuffers::Table<'a>,
3327}
3328
3329impl<'a> ::flatbuffers::Follow<'a> for Region<'a> {
3330 type Inner = Region<'a>;
3331 #[inline]
3332 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3333 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
3334 }
3335}
3336
3337impl<'a> Region<'a> {
3338 pub const VT_X: ::flatbuffers::VOffsetT = 4;
3339 pub const VT_Y: ::flatbuffers::VOffsetT = 6;
3340 pub const VT_W: ::flatbuffers::VOffsetT = 8;
3341 pub const VT_H: ::flatbuffers::VOffsetT = 10;
3342
3343 #[inline]
3344 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
3345 Region { _tab: table }
3346 }
3347 #[allow(unused_mut)]
3348 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
3349 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
3350 args: &'args RegionArgs
3351 ) -> ::flatbuffers::WIPOffset<Region<'bldr>> {
3352 let mut builder = RegionBuilder::new(_fbb);
3353 builder.add_h(args.h);
3354 builder.add_w(args.w);
3355 builder.add_y(args.y);
3356 builder.add_x(args.x);
3357 builder.finish()
3358 }
3359
3360 pub fn unpack(&self) -> RegionT {
3361 let x = self.x();
3362 let y = self.y();
3363 let w = self.w();
3364 let h = self.h();
3365 RegionT {
3366 x,
3367 y,
3368 w,
3369 h,
3370 }
3371 }
3372
3373 #[inline]
3374 pub fn x(&self) -> f32 {
3375 unsafe { self._tab.get::<f32>(Region::VT_X, Some(0.0)).unwrap()}
3379 }
3380 #[inline]
3381 pub fn y(&self) -> f32 {
3382 unsafe { self._tab.get::<f32>(Region::VT_Y, Some(0.0)).unwrap()}
3386 }
3387 #[inline]
3388 pub fn w(&self) -> f32 {
3389 unsafe { self._tab.get::<f32>(Region::VT_W, Some(0.0)).unwrap()}
3393 }
3394 #[inline]
3395 pub fn h(&self) -> f32 {
3396 unsafe { self._tab.get::<f32>(Region::VT_H, Some(0.0)).unwrap()}
3400 }
3401}
3402
3403impl ::flatbuffers::Verifiable for Region<'_> {
3404 #[inline]
3405 fn run_verifier(
3406 v: &mut ::flatbuffers::Verifier, pos: usize
3407 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
3408 v.visit_table(pos)?
3409 .visit_field::<f32>("x", Self::VT_X, false)?
3410 .visit_field::<f32>("y", Self::VT_Y, false)?
3411 .visit_field::<f32>("w", Self::VT_W, false)?
3412 .visit_field::<f32>("h", Self::VT_H, false)?
3413 .finish();
3414 Ok(())
3415 }
3416}
3417pub struct RegionArgs {
3418 pub x: f32,
3419 pub y: f32,
3420 pub w: f32,
3421 pub h: f32,
3422}
3423impl<'a> Default for RegionArgs {
3424 #[inline]
3425 fn default() -> Self {
3426 RegionArgs {
3427 x: 0.0,
3428 y: 0.0,
3429 w: 0.0,
3430 h: 0.0,
3431 }
3432 }
3433}
3434
3435pub struct RegionBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
3436 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
3437 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
3438}
3439impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> RegionBuilder<'a, 'b, A> {
3440 #[inline]
3441 pub fn add_x(&mut self, x: f32) {
3442 self.fbb_.push_slot::<f32>(Region::VT_X, x, 0.0);
3443 }
3444 #[inline]
3445 pub fn add_y(&mut self, y: f32) {
3446 self.fbb_.push_slot::<f32>(Region::VT_Y, y, 0.0);
3447 }
3448 #[inline]
3449 pub fn add_w(&mut self, w: f32) {
3450 self.fbb_.push_slot::<f32>(Region::VT_W, w, 0.0);
3451 }
3452 #[inline]
3453 pub fn add_h(&mut self, h: f32) {
3454 self.fbb_.push_slot::<f32>(Region::VT_H, h, 0.0);
3455 }
3456 #[inline]
3457 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> RegionBuilder<'a, 'b, A> {
3458 let start = _fbb.start_table();
3459 RegionBuilder {
3460 fbb_: _fbb,
3461 start_: start,
3462 }
3463 }
3464 #[inline]
3465 pub fn finish(self) -> ::flatbuffers::WIPOffset<Region<'a>> {
3466 let o = self.fbb_.end_table(self.start_);
3467 ::flatbuffers::WIPOffset::new(o.value())
3468 }
3469}
3470
3471impl ::core::fmt::Debug for Region<'_> {
3472 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3473 let mut ds = f.debug_struct("Region");
3474 ds.field("x", &self.x());
3475 ds.field("y", &self.y());
3476 ds.field("w", &self.w());
3477 ds.field("h", &self.h());
3478 ds.finish()
3479 }
3480}
3481#[non_exhaustive]
3482#[derive(Debug, Clone, PartialEq)]
3483pub struct RegionT {
3484 pub x: f32,
3485 pub y: f32,
3486 pub w: f32,
3487 pub h: f32,
3488}
3489impl Default for RegionT {
3490 fn default() -> Self {
3491 Self {
3492 x: 0.0,
3493 y: 0.0,
3494 w: 0.0,
3495 h: 0.0,
3496 }
3497 }
3498}
3499impl RegionT {
3500 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
3501 &self,
3502 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
3503 ) -> ::flatbuffers::WIPOffset<Region<'b>> {
3504 let x = self.x;
3505 let y = self.y;
3506 let w = self.w;
3507 let h = self.h;
3508 Region::create(_fbb, &RegionArgs{
3509 x,
3510 y,
3511 w,
3512 h,
3513 })
3514 }
3515}
3516pub enum MinMax2Offset {}
3517#[derive(Copy, Clone, PartialEq)]
3518
3519pub struct MinMax2<'a> {
3520 pub _tab: ::flatbuffers::Table<'a>,
3521}
3522
3523impl<'a> ::flatbuffers::Follow<'a> for MinMax2<'a> {
3524 type Inner = MinMax2<'a>;
3525 #[inline]
3526 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3527 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
3528 }
3529}
3530
3531impl<'a> MinMax2<'a> {
3532 pub const VT_X_MIN: ::flatbuffers::VOffsetT = 4;
3533 pub const VT_Y_MIN: ::flatbuffers::VOffsetT = 6;
3534 pub const VT_X_MAX: ::flatbuffers::VOffsetT = 8;
3535 pub const VT_Y_MAX: ::flatbuffers::VOffsetT = 10;
3536
3537 #[inline]
3538 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
3539 MinMax2 { _tab: table }
3540 }
3541 #[allow(unused_mut)]
3542 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
3543 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
3544 args: &'args MinMax2Args
3545 ) -> ::flatbuffers::WIPOffset<MinMax2<'bldr>> {
3546 let mut builder = MinMax2Builder::new(_fbb);
3547 builder.add_y_max(args.y_max);
3548 builder.add_x_max(args.x_max);
3549 builder.add_y_min(args.y_min);
3550 builder.add_x_min(args.x_min);
3551 builder.finish()
3552 }
3553
3554 pub fn unpack(&self) -> MinMax2T {
3555 let x_min = self.x_min();
3556 let y_min = self.y_min();
3557 let x_max = self.x_max();
3558 let y_max = self.y_max();
3559 MinMax2T {
3560 x_min,
3561 y_min,
3562 x_max,
3563 y_max,
3564 }
3565 }
3566
3567 #[inline]
3568 pub fn x_min(&self) -> f32 {
3569 unsafe { self._tab.get::<f32>(MinMax2::VT_X_MIN, Some(0.0)).unwrap()}
3573 }
3574 #[inline]
3575 pub fn y_min(&self) -> f32 {
3576 unsafe { self._tab.get::<f32>(MinMax2::VT_Y_MIN, Some(0.0)).unwrap()}
3580 }
3581 #[inline]
3582 pub fn x_max(&self) -> f32 {
3583 unsafe { self._tab.get::<f32>(MinMax2::VT_X_MAX, Some(0.0)).unwrap()}
3587 }
3588 #[inline]
3589 pub fn y_max(&self) -> f32 {
3590 unsafe { self._tab.get::<f32>(MinMax2::VT_Y_MAX, Some(0.0)).unwrap()}
3594 }
3595}
3596
3597impl ::flatbuffers::Verifiable for MinMax2<'_> {
3598 #[inline]
3599 fn run_verifier(
3600 v: &mut ::flatbuffers::Verifier, pos: usize
3601 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
3602 v.visit_table(pos)?
3603 .visit_field::<f32>("x_min", Self::VT_X_MIN, false)?
3604 .visit_field::<f32>("y_min", Self::VT_Y_MIN, false)?
3605 .visit_field::<f32>("x_max", Self::VT_X_MAX, false)?
3606 .visit_field::<f32>("y_max", Self::VT_Y_MAX, false)?
3607 .finish();
3608 Ok(())
3609 }
3610}
3611pub struct MinMax2Args {
3612 pub x_min: f32,
3613 pub y_min: f32,
3614 pub x_max: f32,
3615 pub y_max: f32,
3616}
3617impl<'a> Default for MinMax2Args {
3618 #[inline]
3619 fn default() -> Self {
3620 MinMax2Args {
3621 x_min: 0.0,
3622 y_min: 0.0,
3623 x_max: 0.0,
3624 y_max: 0.0,
3625 }
3626 }
3627}
3628
3629pub struct MinMax2Builder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
3630 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
3631 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
3632}
3633impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> MinMax2Builder<'a, 'b, A> {
3634 #[inline]
3635 pub fn add_x_min(&mut self, x_min: f32) {
3636 self.fbb_.push_slot::<f32>(MinMax2::VT_X_MIN, x_min, 0.0);
3637 }
3638 #[inline]
3639 pub fn add_y_min(&mut self, y_min: f32) {
3640 self.fbb_.push_slot::<f32>(MinMax2::VT_Y_MIN, y_min, 0.0);
3641 }
3642 #[inline]
3643 pub fn add_x_max(&mut self, x_max: f32) {
3644 self.fbb_.push_slot::<f32>(MinMax2::VT_X_MAX, x_max, 0.0);
3645 }
3646 #[inline]
3647 pub fn add_y_max(&mut self, y_max: f32) {
3648 self.fbb_.push_slot::<f32>(MinMax2::VT_Y_MAX, y_max, 0.0);
3649 }
3650 #[inline]
3651 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> MinMax2Builder<'a, 'b, A> {
3652 let start = _fbb.start_table();
3653 MinMax2Builder {
3654 fbb_: _fbb,
3655 start_: start,
3656 }
3657 }
3658 #[inline]
3659 pub fn finish(self) -> ::flatbuffers::WIPOffset<MinMax2<'a>> {
3660 let o = self.fbb_.end_table(self.start_);
3661 ::flatbuffers::WIPOffset::new(o.value())
3662 }
3663}
3664
3665impl ::core::fmt::Debug for MinMax2<'_> {
3666 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3667 let mut ds = f.debug_struct("MinMax2");
3668 ds.field("x_min", &self.x_min());
3669 ds.field("y_min", &self.y_min());
3670 ds.field("x_max", &self.x_max());
3671 ds.field("y_max", &self.y_max());
3672 ds.finish()
3673 }
3674}
3675#[non_exhaustive]
3676#[derive(Debug, Clone, PartialEq)]
3677pub struct MinMax2T {
3678 pub x_min: f32,
3679 pub y_min: f32,
3680 pub x_max: f32,
3681 pub y_max: f32,
3682}
3683impl Default for MinMax2T {
3684 fn default() -> Self {
3685 Self {
3686 x_min: 0.0,
3687 y_min: 0.0,
3688 x_max: 0.0,
3689 y_max: 0.0,
3690 }
3691 }
3692}
3693impl MinMax2T {
3694 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
3695 &self,
3696 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
3697 ) -> ::flatbuffers::WIPOffset<MinMax2<'b>> {
3698 let x_min = self.x_min;
3699 let y_min = self.y_min;
3700 let x_max = self.x_max;
3701 let y_max = self.y_max;
3702 MinMax2::create(_fbb, &MinMax2Args{
3703 x_min,
3704 y_min,
3705 x_max,
3706 y_max,
3707 })
3708 }
3709}
3710pub enum U8ColorOffset {}
3711#[derive(Copy, Clone, PartialEq)]
3712
3713pub struct U8Color<'a> {
3714 pub _tab: ::flatbuffers::Table<'a>,
3715}
3716
3717impl<'a> ::flatbuffers::Follow<'a> for U8Color<'a> {
3718 type Inner = U8Color<'a>;
3719 #[inline]
3720 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3721 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
3722 }
3723}
3724
3725impl<'a> U8Color<'a> {
3726 pub const VT_A: ::flatbuffers::VOffsetT = 4;
3727 pub const VT_R: ::flatbuffers::VOffsetT = 6;
3728 pub const VT_G: ::flatbuffers::VOffsetT = 8;
3729 pub const VT_B: ::flatbuffers::VOffsetT = 10;
3730
3731 #[inline]
3732 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
3733 U8Color { _tab: table }
3734 }
3735 #[allow(unused_mut)]
3736 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
3737 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
3738 args: &'args U8ColorArgs
3739 ) -> ::flatbuffers::WIPOffset<U8Color<'bldr>> {
3740 let mut builder = U8ColorBuilder::new(_fbb);
3741 builder.add_b(args.b);
3742 builder.add_g(args.g);
3743 builder.add_r(args.r);
3744 builder.add_a(args.a);
3745 builder.finish()
3746 }
3747
3748 pub fn unpack(&self) -> U8ColorT {
3749 let a = self.a();
3750 let r = self.r();
3751 let g = self.g();
3752 let b = self.b();
3753 U8ColorT {
3754 a,
3755 r,
3756 g,
3757 b,
3758 }
3759 }
3760
3761 #[inline]
3762 pub fn a(&self) -> u8 {
3763 unsafe { self._tab.get::<u8>(U8Color::VT_A, Some(0)).unwrap()}
3767 }
3768 #[inline]
3769 pub fn r(&self) -> u8 {
3770 unsafe { self._tab.get::<u8>(U8Color::VT_R, Some(0)).unwrap()}
3774 }
3775 #[inline]
3776 pub fn g(&self) -> u8 {
3777 unsafe { self._tab.get::<u8>(U8Color::VT_G, Some(0)).unwrap()}
3781 }
3782 #[inline]
3783 pub fn b(&self) -> u8 {
3784 unsafe { self._tab.get::<u8>(U8Color::VT_B, Some(0)).unwrap()}
3788 }
3789}
3790
3791impl ::flatbuffers::Verifiable for U8Color<'_> {
3792 #[inline]
3793 fn run_verifier(
3794 v: &mut ::flatbuffers::Verifier, pos: usize
3795 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
3796 v.visit_table(pos)?
3797 .visit_field::<u8>("a", Self::VT_A, false)?
3798 .visit_field::<u8>("r", Self::VT_R, false)?
3799 .visit_field::<u8>("g", Self::VT_G, false)?
3800 .visit_field::<u8>("b", Self::VT_B, false)?
3801 .finish();
3802 Ok(())
3803 }
3804}
3805pub struct U8ColorArgs {
3806 pub a: u8,
3807 pub r: u8,
3808 pub g: u8,
3809 pub b: u8,
3810}
3811impl<'a> Default for U8ColorArgs {
3812 #[inline]
3813 fn default() -> Self {
3814 U8ColorArgs {
3815 a: 0,
3816 r: 0,
3817 g: 0,
3818 b: 0,
3819 }
3820 }
3821}
3822
3823pub struct U8ColorBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
3824 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
3825 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
3826}
3827impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> U8ColorBuilder<'a, 'b, A> {
3828 #[inline]
3829 pub fn add_a(&mut self, a: u8) {
3830 self.fbb_.push_slot::<u8>(U8Color::VT_A, a, 0);
3831 }
3832 #[inline]
3833 pub fn add_r(&mut self, r: u8) {
3834 self.fbb_.push_slot::<u8>(U8Color::VT_R, r, 0);
3835 }
3836 #[inline]
3837 pub fn add_g(&mut self, g: u8) {
3838 self.fbb_.push_slot::<u8>(U8Color::VT_G, g, 0);
3839 }
3840 #[inline]
3841 pub fn add_b(&mut self, b: u8) {
3842 self.fbb_.push_slot::<u8>(U8Color::VT_B, b, 0);
3843 }
3844 #[inline]
3845 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> U8ColorBuilder<'a, 'b, A> {
3846 let start = _fbb.start_table();
3847 U8ColorBuilder {
3848 fbb_: _fbb,
3849 start_: start,
3850 }
3851 }
3852 #[inline]
3853 pub fn finish(self) -> ::flatbuffers::WIPOffset<U8Color<'a>> {
3854 let o = self.fbb_.end_table(self.start_);
3855 ::flatbuffers::WIPOffset::new(o.value())
3856 }
3857}
3858
3859impl ::core::fmt::Debug for U8Color<'_> {
3860 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3861 let mut ds = f.debug_struct("U8Color");
3862 ds.field("a", &self.a());
3863 ds.field("r", &self.r());
3864 ds.field("g", &self.g());
3865 ds.field("b", &self.b());
3866 ds.finish()
3867 }
3868}
3869#[non_exhaustive]
3870#[derive(Debug, Clone, PartialEq)]
3871pub struct U8ColorT {
3872 pub a: u8,
3873 pub r: u8,
3874 pub g: u8,
3875 pub b: u8,
3876}
3877impl Default for U8ColorT {
3878 fn default() -> Self {
3879 Self {
3880 a: 0,
3881 r: 0,
3882 g: 0,
3883 b: 0,
3884 }
3885 }
3886}
3887impl U8ColorT {
3888 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
3889 &self,
3890 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
3891 ) -> ::flatbuffers::WIPOffset<U8Color<'b>> {
3892 let a = self.a;
3893 let r = self.r;
3894 let g = self.g;
3895 let b = self.b;
3896 U8Color::create(_fbb, &U8ColorArgs{
3897 a,
3898 r,
3899 g,
3900 b,
3901 })
3902 }
3903}
3904pub enum NoneValueEntryOffset {}
3905#[derive(Copy, Clone, PartialEq)]
3906
3907pub struct NoneValueEntry<'a> {
3908 pub _tab: ::flatbuffers::Table<'a>,
3909}
3910
3911impl<'a> ::flatbuffers::Follow<'a> for NoneValueEntry<'a> {
3912 type Inner = NoneValueEntry<'a>;
3913 #[inline]
3914 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3915 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
3916 }
3917}
3918
3919impl<'a> NoneValueEntry<'a> {
3920
3921 #[inline]
3922 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
3923 NoneValueEntry { _tab: table }
3924 }
3925 #[allow(unused_mut)]
3926 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
3927 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
3928 _args: &'args NoneValueEntryArgs
3929 ) -> ::flatbuffers::WIPOffset<NoneValueEntry<'bldr>> {
3930 let mut builder = NoneValueEntryBuilder::new(_fbb);
3931 builder.finish()
3932 }
3933
3934 pub fn unpack(&self) -> NoneValueEntryT {
3935 NoneValueEntryT {
3936 }
3937 }
3938}
3939
3940impl ::flatbuffers::Verifiable for NoneValueEntry<'_> {
3941 #[inline]
3942 fn run_verifier(
3943 v: &mut ::flatbuffers::Verifier, pos: usize
3944 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
3945 v.visit_table(pos)?
3946 .finish();
3947 Ok(())
3948 }
3949}
3950pub struct NoneValueEntryArgs {
3951}
3952impl<'a> Default for NoneValueEntryArgs {
3953 #[inline]
3954 fn default() -> Self {
3955 NoneValueEntryArgs {
3956 }
3957 }
3958}
3959
3960pub struct NoneValueEntryBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
3961 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
3962 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
3963}
3964impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> NoneValueEntryBuilder<'a, 'b, A> {
3965 #[inline]
3966 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> NoneValueEntryBuilder<'a, 'b, A> {
3967 let start = _fbb.start_table();
3968 NoneValueEntryBuilder {
3969 fbb_: _fbb,
3970 start_: start,
3971 }
3972 }
3973 #[inline]
3974 pub fn finish(self) -> ::flatbuffers::WIPOffset<NoneValueEntry<'a>> {
3975 let o = self.fbb_.end_table(self.start_);
3976 ::flatbuffers::WIPOffset::new(o.value())
3977 }
3978}
3979
3980impl ::core::fmt::Debug for NoneValueEntry<'_> {
3981 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3982 let mut ds = f.debug_struct("NoneValueEntry");
3983 ds.finish()
3984 }
3985}
3986#[non_exhaustive]
3987#[derive(Debug, Clone, PartialEq)]
3988pub struct NoneValueEntryT {
3989}
3990impl Default for NoneValueEntryT {
3991 fn default() -> Self {
3992 Self {
3993 }
3994 }
3995}
3996impl NoneValueEntryT {
3997 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
3998 &self,
3999 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
4000 ) -> ::flatbuffers::WIPOffset<NoneValueEntry<'b>> {
4001 NoneValueEntry::create(_fbb, &NoneValueEntryArgs{
4002 })
4003 }
4004}
4005pub enum BoolValueEntryOffset {}
4006#[derive(Copy, Clone, PartialEq)]
4007
4008pub struct BoolValueEntry<'a> {
4009 pub _tab: ::flatbuffers::Table<'a>,
4010}
4011
4012impl<'a> ::flatbuffers::Follow<'a> for BoolValueEntry<'a> {
4013 type Inner = BoolValueEntry<'a>;
4014 #[inline]
4015 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4016 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4017 }
4018}
4019
4020impl<'a> BoolValueEntry<'a> {
4021 pub const VT_VALUE: ::flatbuffers::VOffsetT = 4;
4022
4023 #[inline]
4024 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4025 BoolValueEntry { _tab: table }
4026 }
4027 #[allow(unused_mut)]
4028 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4029 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4030 args: &'args BoolValueEntryArgs
4031 ) -> ::flatbuffers::WIPOffset<BoolValueEntry<'bldr>> {
4032 let mut builder = BoolValueEntryBuilder::new(_fbb);
4033 builder.add_value(args.value);
4034 builder.finish()
4035 }
4036
4037 pub fn unpack(&self) -> BoolValueEntryT {
4038 let value = self.value();
4039 BoolValueEntryT {
4040 value,
4041 }
4042 }
4043
4044 #[inline]
4045 pub fn value(&self) -> bool {
4046 unsafe { self._tab.get::<bool>(BoolValueEntry::VT_VALUE, Some(false)).unwrap()}
4050 }
4051}
4052
4053impl ::flatbuffers::Verifiable for BoolValueEntry<'_> {
4054 #[inline]
4055 fn run_verifier(
4056 v: &mut ::flatbuffers::Verifier, pos: usize
4057 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4058 v.visit_table(pos)?
4059 .visit_field::<bool>("value", Self::VT_VALUE, false)?
4060 .finish();
4061 Ok(())
4062 }
4063}
4064pub struct BoolValueEntryArgs {
4065 pub value: bool,
4066}
4067impl<'a> Default for BoolValueEntryArgs {
4068 #[inline]
4069 fn default() -> Self {
4070 BoolValueEntryArgs {
4071 value: false,
4072 }
4073 }
4074}
4075
4076pub struct BoolValueEntryBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4077 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4078 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4079}
4080impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> BoolValueEntryBuilder<'a, 'b, A> {
4081 #[inline]
4082 pub fn add_value(&mut self, value: bool) {
4083 self.fbb_.push_slot::<bool>(BoolValueEntry::VT_VALUE, value, false);
4084 }
4085 #[inline]
4086 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> BoolValueEntryBuilder<'a, 'b, A> {
4087 let start = _fbb.start_table();
4088 BoolValueEntryBuilder {
4089 fbb_: _fbb,
4090 start_: start,
4091 }
4092 }
4093 #[inline]
4094 pub fn finish(self) -> ::flatbuffers::WIPOffset<BoolValueEntry<'a>> {
4095 let o = self.fbb_.end_table(self.start_);
4096 ::flatbuffers::WIPOffset::new(o.value())
4097 }
4098}
4099
4100impl ::core::fmt::Debug for BoolValueEntry<'_> {
4101 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4102 let mut ds = f.debug_struct("BoolValueEntry");
4103 ds.field("value", &self.value());
4104 ds.finish()
4105 }
4106}
4107#[non_exhaustive]
4108#[derive(Debug, Clone, PartialEq)]
4109pub struct BoolValueEntryT {
4110 pub value: bool,
4111}
4112impl Default for BoolValueEntryT {
4113 fn default() -> Self {
4114 Self {
4115 value: false,
4116 }
4117 }
4118}
4119impl BoolValueEntryT {
4120 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
4121 &self,
4122 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
4123 ) -> ::flatbuffers::WIPOffset<BoolValueEntry<'b>> {
4124 let value = self.value;
4125 BoolValueEntry::create(_fbb, &BoolValueEntryArgs{
4126 value,
4127 })
4128 }
4129}
4130pub enum IntValueEntryOffset {}
4131#[derive(Copy, Clone, PartialEq)]
4132
4133pub struct IntValueEntry<'a> {
4134 pub _tab: ::flatbuffers::Table<'a>,
4135}
4136
4137impl<'a> ::flatbuffers::Follow<'a> for IntValueEntry<'a> {
4138 type Inner = IntValueEntry<'a>;
4139 #[inline]
4140 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4141 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4142 }
4143}
4144
4145impl<'a> IntValueEntry<'a> {
4146 pub const VT_VALUE: ::flatbuffers::VOffsetT = 4;
4147
4148 #[inline]
4149 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4150 IntValueEntry { _tab: table }
4151 }
4152 #[allow(unused_mut)]
4153 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4154 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4155 args: &'args IntValueEntryArgs
4156 ) -> ::flatbuffers::WIPOffset<IntValueEntry<'bldr>> {
4157 let mut builder = IntValueEntryBuilder::new(_fbb);
4158 builder.add_value(args.value);
4159 builder.finish()
4160 }
4161
4162 pub fn unpack(&self) -> IntValueEntryT {
4163 let value = self.value();
4164 IntValueEntryT {
4165 value,
4166 }
4167 }
4168
4169 #[inline]
4170 pub fn value(&self) -> i32 {
4171 unsafe { self._tab.get::<i32>(IntValueEntry::VT_VALUE, Some(0)).unwrap()}
4175 }
4176}
4177
4178impl ::flatbuffers::Verifiable for IntValueEntry<'_> {
4179 #[inline]
4180 fn run_verifier(
4181 v: &mut ::flatbuffers::Verifier, pos: usize
4182 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4183 v.visit_table(pos)?
4184 .visit_field::<i32>("value", Self::VT_VALUE, false)?
4185 .finish();
4186 Ok(())
4187 }
4188}
4189pub struct IntValueEntryArgs {
4190 pub value: i32,
4191}
4192impl<'a> Default for IntValueEntryArgs {
4193 #[inline]
4194 fn default() -> Self {
4195 IntValueEntryArgs {
4196 value: 0,
4197 }
4198 }
4199}
4200
4201pub struct IntValueEntryBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4202 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4203 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4204}
4205impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> IntValueEntryBuilder<'a, 'b, A> {
4206 #[inline]
4207 pub fn add_value(&mut self, value: i32) {
4208 self.fbb_.push_slot::<i32>(IntValueEntry::VT_VALUE, value, 0);
4209 }
4210 #[inline]
4211 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> IntValueEntryBuilder<'a, 'b, A> {
4212 let start = _fbb.start_table();
4213 IntValueEntryBuilder {
4214 fbb_: _fbb,
4215 start_: start,
4216 }
4217 }
4218 #[inline]
4219 pub fn finish(self) -> ::flatbuffers::WIPOffset<IntValueEntry<'a>> {
4220 let o = self.fbb_.end_table(self.start_);
4221 ::flatbuffers::WIPOffset::new(o.value())
4222 }
4223}
4224
4225impl ::core::fmt::Debug for IntValueEntry<'_> {
4226 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4227 let mut ds = f.debug_struct("IntValueEntry");
4228 ds.field("value", &self.value());
4229 ds.finish()
4230 }
4231}
4232#[non_exhaustive]
4233#[derive(Debug, Clone, PartialEq)]
4234pub struct IntValueEntryT {
4235 pub value: i32,
4236}
4237impl Default for IntValueEntryT {
4238 fn default() -> Self {
4239 Self {
4240 value: 0,
4241 }
4242 }
4243}
4244impl IntValueEntryT {
4245 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
4246 &self,
4247 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
4248 ) -> ::flatbuffers::WIPOffset<IntValueEntry<'b>> {
4249 let value = self.value;
4250 IntValueEntry::create(_fbb, &IntValueEntryArgs{
4251 value,
4252 })
4253 }
4254}
4255pub enum FloatValueEntryOffset {}
4256#[derive(Copy, Clone, PartialEq)]
4257
4258pub struct FloatValueEntry<'a> {
4259 pub _tab: ::flatbuffers::Table<'a>,
4260}
4261
4262impl<'a> ::flatbuffers::Follow<'a> for FloatValueEntry<'a> {
4263 type Inner = FloatValueEntry<'a>;
4264 #[inline]
4265 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4266 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4267 }
4268}
4269
4270impl<'a> FloatValueEntry<'a> {
4271 pub const VT_VALUE: ::flatbuffers::VOffsetT = 4;
4272
4273 #[inline]
4274 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4275 FloatValueEntry { _tab: table }
4276 }
4277 #[allow(unused_mut)]
4278 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4279 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4280 args: &'args FloatValueEntryArgs
4281 ) -> ::flatbuffers::WIPOffset<FloatValueEntry<'bldr>> {
4282 let mut builder = FloatValueEntryBuilder::new(_fbb);
4283 builder.add_value(args.value);
4284 builder.finish()
4285 }
4286
4287 pub fn unpack(&self) -> FloatValueEntryT {
4288 let value = self.value();
4289 FloatValueEntryT {
4290 value,
4291 }
4292 }
4293
4294 #[inline]
4295 pub fn value(&self) -> f32 {
4296 unsafe { self._tab.get::<f32>(FloatValueEntry::VT_VALUE, Some(0.0)).unwrap()}
4300 }
4301}
4302
4303impl ::flatbuffers::Verifiable for FloatValueEntry<'_> {
4304 #[inline]
4305 fn run_verifier(
4306 v: &mut ::flatbuffers::Verifier, pos: usize
4307 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4308 v.visit_table(pos)?
4309 .visit_field::<f32>("value", Self::VT_VALUE, false)?
4310 .finish();
4311 Ok(())
4312 }
4313}
4314pub struct FloatValueEntryArgs {
4315 pub value: f32,
4316}
4317impl<'a> Default for FloatValueEntryArgs {
4318 #[inline]
4319 fn default() -> Self {
4320 FloatValueEntryArgs {
4321 value: 0.0,
4322 }
4323 }
4324}
4325
4326pub struct FloatValueEntryBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4327 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4328 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4329}
4330impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> FloatValueEntryBuilder<'a, 'b, A> {
4331 #[inline]
4332 pub fn add_value(&mut self, value: f32) {
4333 self.fbb_.push_slot::<f32>(FloatValueEntry::VT_VALUE, value, 0.0);
4334 }
4335 #[inline]
4336 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> FloatValueEntryBuilder<'a, 'b, A> {
4337 let start = _fbb.start_table();
4338 FloatValueEntryBuilder {
4339 fbb_: _fbb,
4340 start_: start,
4341 }
4342 }
4343 #[inline]
4344 pub fn finish(self) -> ::flatbuffers::WIPOffset<FloatValueEntry<'a>> {
4345 let o = self.fbb_.end_table(self.start_);
4346 ::flatbuffers::WIPOffset::new(o.value())
4347 }
4348}
4349
4350impl ::core::fmt::Debug for FloatValueEntry<'_> {
4351 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4352 let mut ds = f.debug_struct("FloatValueEntry");
4353 ds.field("value", &self.value());
4354 ds.finish()
4355 }
4356}
4357#[non_exhaustive]
4358#[derive(Debug, Clone, PartialEq)]
4359pub struct FloatValueEntryT {
4360 pub value: f32,
4361}
4362impl Default for FloatValueEntryT {
4363 fn default() -> Self {
4364 Self {
4365 value: 0.0,
4366 }
4367 }
4368}
4369impl FloatValueEntryT {
4370 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
4371 &self,
4372 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
4373 ) -> ::flatbuffers::WIPOffset<FloatValueEntry<'b>> {
4374 let value = self.value;
4375 FloatValueEntry::create(_fbb, &FloatValueEntryArgs{
4376 value,
4377 })
4378 }
4379}
4380pub enum StringValueEntryOffset {}
4381#[derive(Copy, Clone, PartialEq)]
4382
4383pub struct StringValueEntry<'a> {
4384 pub _tab: ::flatbuffers::Table<'a>,
4385}
4386
4387impl<'a> ::flatbuffers::Follow<'a> for StringValueEntry<'a> {
4388 type Inner = StringValueEntry<'a>;
4389 #[inline]
4390 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4391 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4392 }
4393}
4394
4395impl<'a> StringValueEntry<'a> {
4396 pub const VT_VALUE: ::flatbuffers::VOffsetT = 4;
4397
4398 #[inline]
4399 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4400 StringValueEntry { _tab: table }
4401 }
4402 #[allow(unused_mut)]
4403 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4404 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4405 args: &'args StringValueEntryArgs<'args>
4406 ) -> ::flatbuffers::WIPOffset<StringValueEntry<'bldr>> {
4407 let mut builder = StringValueEntryBuilder::new(_fbb);
4408 if let Some(x) = args.value { builder.add_value(x); }
4409 builder.finish()
4410 }
4411
4412 pub fn unpack(&self) -> StringValueEntryT {
4413 let value = {
4414 let x = self.value();
4415 alloc::string::ToString::to_string(x)
4416 };
4417 StringValueEntryT {
4418 value,
4419 }
4420 }
4421
4422 #[inline]
4423 pub fn value(&self) -> &'a str {
4424 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(StringValueEntry::VT_VALUE, None).unwrap()}
4428 }
4429}
4430
4431impl ::flatbuffers::Verifiable for StringValueEntry<'_> {
4432 #[inline]
4433 fn run_verifier(
4434 v: &mut ::flatbuffers::Verifier, pos: usize
4435 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4436 v.visit_table(pos)?
4437 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("value", Self::VT_VALUE, true)?
4438 .finish();
4439 Ok(())
4440 }
4441}
4442pub struct StringValueEntryArgs<'a> {
4443 pub value: Option<::flatbuffers::WIPOffset<&'a str>>,
4444}
4445impl<'a> Default for StringValueEntryArgs<'a> {
4446 #[inline]
4447 fn default() -> Self {
4448 StringValueEntryArgs {
4449 value: None, }
4451 }
4452}
4453
4454pub struct StringValueEntryBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4455 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4456 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4457}
4458impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> StringValueEntryBuilder<'a, 'b, A> {
4459 #[inline]
4460 pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<&'b str>) {
4461 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(StringValueEntry::VT_VALUE, value);
4462 }
4463 #[inline]
4464 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> StringValueEntryBuilder<'a, 'b, A> {
4465 let start = _fbb.start_table();
4466 StringValueEntryBuilder {
4467 fbb_: _fbb,
4468 start_: start,
4469 }
4470 }
4471 #[inline]
4472 pub fn finish(self) -> ::flatbuffers::WIPOffset<StringValueEntry<'a>> {
4473 let o = self.fbb_.end_table(self.start_);
4474 self.fbb_.required(o, StringValueEntry::VT_VALUE,"value");
4475 ::flatbuffers::WIPOffset::new(o.value())
4476 }
4477}
4478
4479impl ::core::fmt::Debug for StringValueEntry<'_> {
4480 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4481 let mut ds = f.debug_struct("StringValueEntry");
4482 ds.field("value", &self.value());
4483 ds.finish()
4484 }
4485}
4486#[non_exhaustive]
4487#[derive(Debug, Clone, PartialEq)]
4488pub struct StringValueEntryT {
4489 pub value: alloc::string::String,
4490}
4491impl Default for StringValueEntryT {
4492 fn default() -> Self {
4493 Self {
4494 value: alloc::string::ToString::to_string(""),
4495 }
4496 }
4497}
4498impl StringValueEntryT {
4499 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
4500 &self,
4501 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
4502 ) -> ::flatbuffers::WIPOffset<StringValueEntry<'b>> {
4503 let value = Some({
4504 let x = &self.value;
4505 _fbb.create_string(x)
4506 });
4507 StringValueEntry::create(_fbb, &StringValueEntryArgs{
4508 value,
4509 })
4510 }
4511}
4512pub enum Vec2ValueEntryOffset {}
4513#[derive(Copy, Clone, PartialEq)]
4514
4515pub struct Vec2ValueEntry<'a> {
4516 pub _tab: ::flatbuffers::Table<'a>,
4517}
4518
4519impl<'a> ::flatbuffers::Follow<'a> for Vec2ValueEntry<'a> {
4520 type Inner = Vec2ValueEntry<'a>;
4521 #[inline]
4522 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4523 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4524 }
4525}
4526
4527impl<'a> Vec2ValueEntry<'a> {
4528 pub const VT_VALUE: ::flatbuffers::VOffsetT = 4;
4529
4530 #[inline]
4531 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4532 Vec2ValueEntry { _tab: table }
4533 }
4534 #[allow(unused_mut)]
4535 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4536 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4537 args: &'args Vec2ValueEntryArgs<'args>
4538 ) -> ::flatbuffers::WIPOffset<Vec2ValueEntry<'bldr>> {
4539 let mut builder = Vec2ValueEntryBuilder::new(_fbb);
4540 if let Some(x) = args.value { builder.add_value(x); }
4541 builder.finish()
4542 }
4543
4544 pub fn unpack(&self) -> Vec2ValueEntryT {
4545 let value = {
4546 let x = self.value();
4547 alloc::boxed::Box::new(x.unpack())
4548 };
4549 Vec2ValueEntryT {
4550 value,
4551 }
4552 }
4553
4554 #[inline]
4555 pub fn value(&self) -> Vec2<'a> {
4556 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(Vec2ValueEntry::VT_VALUE, None).unwrap()}
4560 }
4561}
4562
4563impl ::flatbuffers::Verifiable for Vec2ValueEntry<'_> {
4564 #[inline]
4565 fn run_verifier(
4566 v: &mut ::flatbuffers::Verifier, pos: usize
4567 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4568 v.visit_table(pos)?
4569 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("value", Self::VT_VALUE, true)?
4570 .finish();
4571 Ok(())
4572 }
4573}
4574pub struct Vec2ValueEntryArgs<'a> {
4575 pub value: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
4576}
4577impl<'a> Default for Vec2ValueEntryArgs<'a> {
4578 #[inline]
4579 fn default() -> Self {
4580 Vec2ValueEntryArgs {
4581 value: None, }
4583 }
4584}
4585
4586pub struct Vec2ValueEntryBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4587 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4588 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4589}
4590impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> Vec2ValueEntryBuilder<'a, 'b, A> {
4591 #[inline]
4592 pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<Vec2<'b >>) {
4593 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(Vec2ValueEntry::VT_VALUE, value);
4594 }
4595 #[inline]
4596 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> Vec2ValueEntryBuilder<'a, 'b, A> {
4597 let start = _fbb.start_table();
4598 Vec2ValueEntryBuilder {
4599 fbb_: _fbb,
4600 start_: start,
4601 }
4602 }
4603 #[inline]
4604 pub fn finish(self) -> ::flatbuffers::WIPOffset<Vec2ValueEntry<'a>> {
4605 let o = self.fbb_.end_table(self.start_);
4606 self.fbb_.required(o, Vec2ValueEntry::VT_VALUE,"value");
4607 ::flatbuffers::WIPOffset::new(o.value())
4608 }
4609}
4610
4611impl ::core::fmt::Debug for Vec2ValueEntry<'_> {
4612 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4613 let mut ds = f.debug_struct("Vec2ValueEntry");
4614 ds.field("value", &self.value());
4615 ds.finish()
4616 }
4617}
4618#[non_exhaustive]
4619#[derive(Debug, Clone, PartialEq)]
4620pub struct Vec2ValueEntryT {
4621 pub value: alloc::boxed::Box<Vec2T>,
4622}
4623impl Default for Vec2ValueEntryT {
4624 fn default() -> Self {
4625 Self {
4626 value: Default::default(),
4627 }
4628 }
4629}
4630impl Vec2ValueEntryT {
4631 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
4632 &self,
4633 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
4634 ) -> ::flatbuffers::WIPOffset<Vec2ValueEntry<'b>> {
4635 let value = Some({
4636 let x = &self.value;
4637 x.pack(_fbb)
4638 });
4639 Vec2ValueEntry::create(_fbb, &Vec2ValueEntryArgs{
4640 value,
4641 })
4642 }
4643}
4644pub enum MinMax2ValueEntryOffset {}
4645#[derive(Copy, Clone, PartialEq)]
4646
4647pub struct MinMax2ValueEntry<'a> {
4648 pub _tab: ::flatbuffers::Table<'a>,
4649}
4650
4651impl<'a> ::flatbuffers::Follow<'a> for MinMax2ValueEntry<'a> {
4652 type Inner = MinMax2ValueEntry<'a>;
4653 #[inline]
4654 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4655 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4656 }
4657}
4658
4659impl<'a> MinMax2ValueEntry<'a> {
4660 pub const VT_VALUE: ::flatbuffers::VOffsetT = 4;
4661
4662 #[inline]
4663 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4664 MinMax2ValueEntry { _tab: table }
4665 }
4666 #[allow(unused_mut)]
4667 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4668 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4669 args: &'args MinMax2ValueEntryArgs<'args>
4670 ) -> ::flatbuffers::WIPOffset<MinMax2ValueEntry<'bldr>> {
4671 let mut builder = MinMax2ValueEntryBuilder::new(_fbb);
4672 if let Some(x) = args.value { builder.add_value(x); }
4673 builder.finish()
4674 }
4675
4676 pub fn unpack(&self) -> MinMax2ValueEntryT {
4677 let value = {
4678 let x = self.value();
4679 alloc::boxed::Box::new(x.unpack())
4680 };
4681 MinMax2ValueEntryT {
4682 value,
4683 }
4684 }
4685
4686 #[inline]
4687 pub fn value(&self) -> MinMax2<'a> {
4688 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<MinMax2>>(MinMax2ValueEntry::VT_VALUE, None).unwrap()}
4692 }
4693}
4694
4695impl ::flatbuffers::Verifiable for MinMax2ValueEntry<'_> {
4696 #[inline]
4697 fn run_verifier(
4698 v: &mut ::flatbuffers::Verifier, pos: usize
4699 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4700 v.visit_table(pos)?
4701 .visit_field::<::flatbuffers::ForwardsUOffset<MinMax2>>("value", Self::VT_VALUE, true)?
4702 .finish();
4703 Ok(())
4704 }
4705}
4706pub struct MinMax2ValueEntryArgs<'a> {
4707 pub value: Option<::flatbuffers::WIPOffset<MinMax2<'a>>>,
4708}
4709impl<'a> Default for MinMax2ValueEntryArgs<'a> {
4710 #[inline]
4711 fn default() -> Self {
4712 MinMax2ValueEntryArgs {
4713 value: None, }
4715 }
4716}
4717
4718pub struct MinMax2ValueEntryBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4719 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4720 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4721}
4722impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> MinMax2ValueEntryBuilder<'a, 'b, A> {
4723 #[inline]
4724 pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<MinMax2<'b >>) {
4725 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<MinMax2>>(MinMax2ValueEntry::VT_VALUE, value);
4726 }
4727 #[inline]
4728 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> MinMax2ValueEntryBuilder<'a, 'b, A> {
4729 let start = _fbb.start_table();
4730 MinMax2ValueEntryBuilder {
4731 fbb_: _fbb,
4732 start_: start,
4733 }
4734 }
4735 #[inline]
4736 pub fn finish(self) -> ::flatbuffers::WIPOffset<MinMax2ValueEntry<'a>> {
4737 let o = self.fbb_.end_table(self.start_);
4738 self.fbb_.required(o, MinMax2ValueEntry::VT_VALUE,"value");
4739 ::flatbuffers::WIPOffset::new(o.value())
4740 }
4741}
4742
4743impl ::core::fmt::Debug for MinMax2ValueEntry<'_> {
4744 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4745 let mut ds = f.debug_struct("MinMax2ValueEntry");
4746 ds.field("value", &self.value());
4747 ds.finish()
4748 }
4749}
4750#[non_exhaustive]
4751#[derive(Debug, Clone, PartialEq)]
4752pub struct MinMax2ValueEntryT {
4753 pub value: alloc::boxed::Box<MinMax2T>,
4754}
4755impl Default for MinMax2ValueEntryT {
4756 fn default() -> Self {
4757 Self {
4758 value: Default::default(),
4759 }
4760 }
4761}
4762impl MinMax2ValueEntryT {
4763 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
4764 &self,
4765 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
4766 ) -> ::flatbuffers::WIPOffset<MinMax2ValueEntry<'b>> {
4767 let value = Some({
4768 let x = &self.value;
4769 x.pack(_fbb)
4770 });
4771 MinMax2ValueEntry::create(_fbb, &MinMax2ValueEntryArgs{
4772 value,
4773 })
4774 }
4775}
4776pub enum EventUserDataOffset {}
4777#[derive(Copy, Clone, PartialEq)]
4778
4779pub struct EventUserData<'a> {
4780 pub _tab: ::flatbuffers::Table<'a>,
4781}
4782
4783impl<'a> ::flatbuffers::Follow<'a> for EventUserData<'a> {
4784 type Inner = EventUserData<'a>;
4785 #[inline]
4786 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4787 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4788 }
4789}
4790
4791impl<'a> EventUserData<'a> {
4792 pub const VT_PART_INDEX: ::flatbuffers::VOffsetT = 4;
4793 pub const VT_VALUE: ::flatbuffers::VOffsetT = 6;
4794
4795 #[inline]
4796 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4797 EventUserData { _tab: table }
4798 }
4799 #[allow(unused_mut)]
4800 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4801 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4802 args: &'args EventUserDataArgs<'args>
4803 ) -> ::flatbuffers::WIPOffset<EventUserData<'bldr>> {
4804 let mut builder = EventUserDataBuilder::new(_fbb);
4805 if let Some(x) = args.value { builder.add_value(x); }
4806 builder.add_part_index(args.part_index);
4807 builder.finish()
4808 }
4809
4810 pub fn unpack(&self) -> EventUserDataT {
4811 let part_index = self.part_index();
4812 let value = {
4813 let x = self.value();
4814 alloc::boxed::Box::new(x.unpack())
4815 };
4816 EventUserDataT {
4817 part_index,
4818 value,
4819 }
4820 }
4821
4822 #[inline]
4823 pub fn part_index(&self) -> u16 {
4824 unsafe { self._tab.get::<u16>(EventUserData::VT_PART_INDEX, Some(0)).unwrap()}
4828 }
4829 #[inline]
4830 pub fn key_compare_less_than(&self, o: &EventUserData) -> bool {
4831 self.part_index() < o.part_index()
4832 }
4833
4834 #[inline]
4835 pub fn key_compare_with_value(&self, val: u16) -> ::core::cmp::Ordering {
4836 let key = self.part_index();
4837 key.cmp(&val)
4838 }
4839 #[inline]
4840 pub fn value(&self) -> PartAttributeUserData<'a> {
4841 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartAttributeUserData>>(EventUserData::VT_VALUE, None).unwrap()}
4845 }
4846}
4847
4848impl ::flatbuffers::Verifiable for EventUserData<'_> {
4849 #[inline]
4850 fn run_verifier(
4851 v: &mut ::flatbuffers::Verifier, pos: usize
4852 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4853 v.visit_table(pos)?
4854 .visit_field::<u16>("part_index", Self::VT_PART_INDEX, false)?
4855 .visit_field::<::flatbuffers::ForwardsUOffset<PartAttributeUserData>>("value", Self::VT_VALUE, true)?
4856 .finish();
4857 Ok(())
4858 }
4859}
4860pub struct EventUserDataArgs<'a> {
4861 pub part_index: u16,
4862 pub value: Option<::flatbuffers::WIPOffset<PartAttributeUserData<'a>>>,
4863}
4864impl<'a> Default for EventUserDataArgs<'a> {
4865 #[inline]
4866 fn default() -> Self {
4867 EventUserDataArgs {
4868 part_index: 0,
4869 value: None, }
4871 }
4872}
4873
4874pub struct EventUserDataBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4875 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4876 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4877}
4878impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EventUserDataBuilder<'a, 'b, A> {
4879 #[inline]
4880 pub fn add_part_index(&mut self, part_index: u16) {
4881 self.fbb_.push_slot::<u16>(EventUserData::VT_PART_INDEX, part_index, 0);
4882 }
4883 #[inline]
4884 pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<PartAttributeUserData<'b >>) {
4885 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartAttributeUserData>>(EventUserData::VT_VALUE, value);
4886 }
4887 #[inline]
4888 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EventUserDataBuilder<'a, 'b, A> {
4889 let start = _fbb.start_table();
4890 EventUserDataBuilder {
4891 fbb_: _fbb,
4892 start_: start,
4893 }
4894 }
4895 #[inline]
4896 pub fn finish(self) -> ::flatbuffers::WIPOffset<EventUserData<'a>> {
4897 let o = self.fbb_.end_table(self.start_);
4898 self.fbb_.required(o, EventUserData::VT_VALUE,"value");
4899 ::flatbuffers::WIPOffset::new(o.value())
4900 }
4901}
4902
4903impl ::core::fmt::Debug for EventUserData<'_> {
4904 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4905 let mut ds = f.debug_struct("EventUserData");
4906 ds.field("part_index", &self.part_index());
4907 ds.field("value", &self.value());
4908 ds.finish()
4909 }
4910}
4911#[non_exhaustive]
4912#[derive(Debug, Clone, PartialEq)]
4913pub struct EventUserDataT {
4914 pub part_index: u16,
4915 pub value: alloc::boxed::Box<PartAttributeUserDataT>,
4916}
4917impl Default for EventUserDataT {
4918 fn default() -> Self {
4919 Self {
4920 part_index: 0,
4921 value: Default::default(),
4922 }
4923 }
4924}
4925impl EventUserDataT {
4926 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
4927 &self,
4928 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
4929 ) -> ::flatbuffers::WIPOffset<EventUserData<'b>> {
4930 let part_index = self.part_index;
4931 let value = Some({
4932 let x = &self.value;
4933 x.pack(_fbb)
4934 });
4935 EventUserData::create(_fbb, &EventUserDataArgs{
4936 part_index,
4937 value,
4938 })
4939 }
4940}
4941pub enum EventSignalOffset {}
4942#[derive(Copy, Clone, PartialEq)]
4943
4944pub struct EventSignal<'a> {
4945 pub _tab: ::flatbuffers::Table<'a>,
4946}
4947
4948impl<'a> ::flatbuffers::Follow<'a> for EventSignal<'a> {
4949 type Inner = EventSignal<'a>;
4950 #[inline]
4951 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4952 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4953 }
4954}
4955
4956impl<'a> EventSignal<'a> {
4957 pub const VT_PART_INDEX: ::flatbuffers::VOffsetT = 4;
4958 pub const VT_VALUE: ::flatbuffers::VOffsetT = 6;
4959
4960 #[inline]
4961 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4962 EventSignal { _tab: table }
4963 }
4964 #[allow(unused_mut)]
4965 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4966 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4967 args: &'args EventSignalArgs<'args>
4968 ) -> ::flatbuffers::WIPOffset<EventSignal<'bldr>> {
4969 let mut builder = EventSignalBuilder::new(_fbb);
4970 if let Some(x) = args.value { builder.add_value(x); }
4971 builder.add_part_index(args.part_index);
4972 builder.finish()
4973 }
4974
4975 pub fn unpack(&self) -> EventSignalT {
4976 let part_index = self.part_index();
4977 let value = {
4978 let x = self.value();
4979 alloc::boxed::Box::new(x.unpack())
4980 };
4981 EventSignalT {
4982 part_index,
4983 value,
4984 }
4985 }
4986
4987 #[inline]
4988 pub fn part_index(&self) -> u16 {
4989 unsafe { self._tab.get::<u16>(EventSignal::VT_PART_INDEX, Some(0)).unwrap()}
4993 }
4994 #[inline]
4995 pub fn key_compare_less_than(&self, o: &EventSignal) -> bool {
4996 self.part_index() < o.part_index()
4997 }
4998
4999 #[inline]
5000 pub fn key_compare_with_value(&self, val: u16) -> ::core::cmp::Ordering {
5001 let key = self.part_index();
5002 key.cmp(&val)
5003 }
5004 #[inline]
5005 pub fn value(&self) -> PartAttributeSignal<'a> {
5006 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartAttributeSignal>>(EventSignal::VT_VALUE, None).unwrap()}
5010 }
5011}
5012
5013impl ::flatbuffers::Verifiable for EventSignal<'_> {
5014 #[inline]
5015 fn run_verifier(
5016 v: &mut ::flatbuffers::Verifier, pos: usize
5017 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
5018 v.visit_table(pos)?
5019 .visit_field::<u16>("part_index", Self::VT_PART_INDEX, false)?
5020 .visit_field::<::flatbuffers::ForwardsUOffset<PartAttributeSignal>>("value", Self::VT_VALUE, true)?
5021 .finish();
5022 Ok(())
5023 }
5024}
5025pub struct EventSignalArgs<'a> {
5026 pub part_index: u16,
5027 pub value: Option<::flatbuffers::WIPOffset<PartAttributeSignal<'a>>>,
5028}
5029impl<'a> Default for EventSignalArgs<'a> {
5030 #[inline]
5031 fn default() -> Self {
5032 EventSignalArgs {
5033 part_index: 0,
5034 value: None, }
5036 }
5037}
5038
5039pub struct EventSignalBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
5040 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
5041 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
5042}
5043impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EventSignalBuilder<'a, 'b, A> {
5044 #[inline]
5045 pub fn add_part_index(&mut self, part_index: u16) {
5046 self.fbb_.push_slot::<u16>(EventSignal::VT_PART_INDEX, part_index, 0);
5047 }
5048 #[inline]
5049 pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<PartAttributeSignal<'b >>) {
5050 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartAttributeSignal>>(EventSignal::VT_VALUE, value);
5051 }
5052 #[inline]
5053 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EventSignalBuilder<'a, 'b, A> {
5054 let start = _fbb.start_table();
5055 EventSignalBuilder {
5056 fbb_: _fbb,
5057 start_: start,
5058 }
5059 }
5060 #[inline]
5061 pub fn finish(self) -> ::flatbuffers::WIPOffset<EventSignal<'a>> {
5062 let o = self.fbb_.end_table(self.start_);
5063 self.fbb_.required(o, EventSignal::VT_VALUE,"value");
5064 ::flatbuffers::WIPOffset::new(o.value())
5065 }
5066}
5067
5068impl ::core::fmt::Debug for EventSignal<'_> {
5069 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5070 let mut ds = f.debug_struct("EventSignal");
5071 ds.field("part_index", &self.part_index());
5072 ds.field("value", &self.value());
5073 ds.finish()
5074 }
5075}
5076#[non_exhaustive]
5077#[derive(Debug, Clone, PartialEq)]
5078pub struct EventSignalT {
5079 pub part_index: u16,
5080 pub value: alloc::boxed::Box<PartAttributeSignalT>,
5081}
5082impl Default for EventSignalT {
5083 fn default() -> Self {
5084 Self {
5085 part_index: 0,
5086 value: Default::default(),
5087 }
5088 }
5089}
5090impl EventSignalT {
5091 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
5092 &self,
5093 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
5094 ) -> ::flatbuffers::WIPOffset<EventSignal<'b>> {
5095 let part_index = self.part_index;
5096 let value = Some({
5097 let x = &self.value;
5098 x.pack(_fbb)
5099 });
5100 EventSignal::create(_fbb, &EventSignalArgs{
5101 part_index,
5102 value,
5103 })
5104 }
5105}
5106pub enum EventAudioOffset {}
5107#[derive(Copy, Clone, PartialEq)]
5108
5109pub struct EventAudio<'a> {
5110 pub _tab: ::flatbuffers::Table<'a>,
5111}
5112
5113impl<'a> ::flatbuffers::Follow<'a> for EventAudio<'a> {
5114 type Inner = EventAudio<'a>;
5115 #[inline]
5116 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5117 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
5118 }
5119}
5120
5121impl<'a> EventAudio<'a> {
5122 pub const VT_PART_INDEX: ::flatbuffers::VOffsetT = 4;
5123 pub const VT_VALUE: ::flatbuffers::VOffsetT = 6;
5124
5125 #[inline]
5126 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
5127 EventAudio { _tab: table }
5128 }
5129 #[allow(unused_mut)]
5130 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
5131 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
5132 args: &'args EventAudioArgs<'args>
5133 ) -> ::flatbuffers::WIPOffset<EventAudio<'bldr>> {
5134 let mut builder = EventAudioBuilder::new(_fbb);
5135 if let Some(x) = args.value { builder.add_value(x); }
5136 builder.add_part_index(args.part_index);
5137 builder.finish()
5138 }
5139
5140 pub fn unpack(&self) -> EventAudioT {
5141 let part_index = self.part_index();
5142 let value = {
5143 let x = self.value();
5144 alloc::boxed::Box::new(x.unpack())
5145 };
5146 EventAudioT {
5147 part_index,
5148 value,
5149 }
5150 }
5151
5152 #[inline]
5153 pub fn part_index(&self) -> u16 {
5154 unsafe { self._tab.get::<u16>(EventAudio::VT_PART_INDEX, Some(0)).unwrap()}
5158 }
5159 #[inline]
5160 pub fn key_compare_less_than(&self, o: &EventAudio) -> bool {
5161 self.part_index() < o.part_index()
5162 }
5163
5164 #[inline]
5165 pub fn key_compare_with_value(&self, val: u16) -> ::core::cmp::Ordering {
5166 let key = self.part_index();
5167 key.cmp(&val)
5168 }
5169 #[inline]
5170 pub fn value(&self) -> PartAttributeAudio<'a> {
5171 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartAttributeAudio>>(EventAudio::VT_VALUE, None).unwrap()}
5175 }
5176}
5177
5178impl ::flatbuffers::Verifiable for EventAudio<'_> {
5179 #[inline]
5180 fn run_verifier(
5181 v: &mut ::flatbuffers::Verifier, pos: usize
5182 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
5183 v.visit_table(pos)?
5184 .visit_field::<u16>("part_index", Self::VT_PART_INDEX, false)?
5185 .visit_field::<::flatbuffers::ForwardsUOffset<PartAttributeAudio>>("value", Self::VT_VALUE, true)?
5186 .finish();
5187 Ok(())
5188 }
5189}
5190pub struct EventAudioArgs<'a> {
5191 pub part_index: u16,
5192 pub value: Option<::flatbuffers::WIPOffset<PartAttributeAudio<'a>>>,
5193}
5194impl<'a> Default for EventAudioArgs<'a> {
5195 #[inline]
5196 fn default() -> Self {
5197 EventAudioArgs {
5198 part_index: 0,
5199 value: None, }
5201 }
5202}
5203
5204pub struct EventAudioBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
5205 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
5206 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
5207}
5208impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EventAudioBuilder<'a, 'b, A> {
5209 #[inline]
5210 pub fn add_part_index(&mut self, part_index: u16) {
5211 self.fbb_.push_slot::<u16>(EventAudio::VT_PART_INDEX, part_index, 0);
5212 }
5213 #[inline]
5214 pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<PartAttributeAudio<'b >>) {
5215 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartAttributeAudio>>(EventAudio::VT_VALUE, value);
5216 }
5217 #[inline]
5218 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EventAudioBuilder<'a, 'b, A> {
5219 let start = _fbb.start_table();
5220 EventAudioBuilder {
5221 fbb_: _fbb,
5222 start_: start,
5223 }
5224 }
5225 #[inline]
5226 pub fn finish(self) -> ::flatbuffers::WIPOffset<EventAudio<'a>> {
5227 let o = self.fbb_.end_table(self.start_);
5228 self.fbb_.required(o, EventAudio::VT_VALUE,"value");
5229 ::flatbuffers::WIPOffset::new(o.value())
5230 }
5231}
5232
5233impl ::core::fmt::Debug for EventAudio<'_> {
5234 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5235 let mut ds = f.debug_struct("EventAudio");
5236 ds.field("part_index", &self.part_index());
5237 ds.field("value", &self.value());
5238 ds.finish()
5239 }
5240}
5241#[non_exhaustive]
5242#[derive(Debug, Clone, PartialEq)]
5243pub struct EventAudioT {
5244 pub part_index: u16,
5245 pub value: alloc::boxed::Box<PartAttributeAudioT>,
5246}
5247impl Default for EventAudioT {
5248 fn default() -> Self {
5249 Self {
5250 part_index: 0,
5251 value: Default::default(),
5252 }
5253 }
5254}
5255impl EventAudioT {
5256 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
5257 &self,
5258 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
5259 ) -> ::flatbuffers::WIPOffset<EventAudio<'b>> {
5260 let part_index = self.part_index;
5261 let value = Some({
5262 let x = &self.value;
5263 x.pack(_fbb)
5264 });
5265 EventAudio::create(_fbb, &EventAudioArgs{
5266 part_index,
5267 value,
5268 })
5269 }
5270}
5271pub enum EventInstanceOffset {}
5272#[derive(Copy, Clone, PartialEq)]
5273
5274pub struct EventInstance<'a> {
5275 pub _tab: ::flatbuffers::Table<'a>,
5276}
5277
5278impl<'a> ::flatbuffers::Follow<'a> for EventInstance<'a> {
5279 type Inner = EventInstance<'a>;
5280 #[inline]
5281 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5282 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
5283 }
5284}
5285
5286impl<'a> EventInstance<'a> {
5287 pub const VT_PART_INDEX: ::flatbuffers::VOffsetT = 4;
5288 pub const VT_VALUE: ::flatbuffers::VOffsetT = 6;
5289
5290 #[inline]
5291 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
5292 EventInstance { _tab: table }
5293 }
5294 #[allow(unused_mut)]
5295 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
5296 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
5297 args: &'args EventInstanceArgs<'args>
5298 ) -> ::flatbuffers::WIPOffset<EventInstance<'bldr>> {
5299 let mut builder = EventInstanceBuilder::new(_fbb);
5300 if let Some(x) = args.value { builder.add_value(x); }
5301 builder.add_part_index(args.part_index);
5302 builder.finish()
5303 }
5304
5305 pub fn unpack(&self) -> EventInstanceT {
5306 let part_index = self.part_index();
5307 let value = {
5308 let x = self.value();
5309 alloc::boxed::Box::new(x.unpack())
5310 };
5311 EventInstanceT {
5312 part_index,
5313 value,
5314 }
5315 }
5316
5317 #[inline]
5318 pub fn part_index(&self) -> u16 {
5319 unsafe { self._tab.get::<u16>(EventInstance::VT_PART_INDEX, Some(0)).unwrap()}
5323 }
5324 #[inline]
5325 pub fn key_compare_less_than(&self, o: &EventInstance) -> bool {
5326 self.part_index() < o.part_index()
5327 }
5328
5329 #[inline]
5330 pub fn key_compare_with_value(&self, val: u16) -> ::core::cmp::Ordering {
5331 let key = self.part_index();
5332 key.cmp(&val)
5333 }
5334 #[inline]
5335 pub fn value(&self) -> PartAttributeInstance<'a> {
5336 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartAttributeInstance>>(EventInstance::VT_VALUE, None).unwrap()}
5340 }
5341}
5342
5343impl ::flatbuffers::Verifiable for EventInstance<'_> {
5344 #[inline]
5345 fn run_verifier(
5346 v: &mut ::flatbuffers::Verifier, pos: usize
5347 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
5348 v.visit_table(pos)?
5349 .visit_field::<u16>("part_index", Self::VT_PART_INDEX, false)?
5350 .visit_field::<::flatbuffers::ForwardsUOffset<PartAttributeInstance>>("value", Self::VT_VALUE, true)?
5351 .finish();
5352 Ok(())
5353 }
5354}
5355pub struct EventInstanceArgs<'a> {
5356 pub part_index: u16,
5357 pub value: Option<::flatbuffers::WIPOffset<PartAttributeInstance<'a>>>,
5358}
5359impl<'a> Default for EventInstanceArgs<'a> {
5360 #[inline]
5361 fn default() -> Self {
5362 EventInstanceArgs {
5363 part_index: 0,
5364 value: None, }
5366 }
5367}
5368
5369pub struct EventInstanceBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
5370 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
5371 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
5372}
5373impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EventInstanceBuilder<'a, 'b, A> {
5374 #[inline]
5375 pub fn add_part_index(&mut self, part_index: u16) {
5376 self.fbb_.push_slot::<u16>(EventInstance::VT_PART_INDEX, part_index, 0);
5377 }
5378 #[inline]
5379 pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<PartAttributeInstance<'b >>) {
5380 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartAttributeInstance>>(EventInstance::VT_VALUE, value);
5381 }
5382 #[inline]
5383 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EventInstanceBuilder<'a, 'b, A> {
5384 let start = _fbb.start_table();
5385 EventInstanceBuilder {
5386 fbb_: _fbb,
5387 start_: start,
5388 }
5389 }
5390 #[inline]
5391 pub fn finish(self) -> ::flatbuffers::WIPOffset<EventInstance<'a>> {
5392 let o = self.fbb_.end_table(self.start_);
5393 self.fbb_.required(o, EventInstance::VT_VALUE,"value");
5394 ::flatbuffers::WIPOffset::new(o.value())
5395 }
5396}
5397
5398impl ::core::fmt::Debug for EventInstance<'_> {
5399 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5400 let mut ds = f.debug_struct("EventInstance");
5401 ds.field("part_index", &self.part_index());
5402 ds.field("value", &self.value());
5403 ds.finish()
5404 }
5405}
5406#[non_exhaustive]
5407#[derive(Debug, Clone, PartialEq)]
5408pub struct EventInstanceT {
5409 pub part_index: u16,
5410 pub value: alloc::boxed::Box<PartAttributeInstanceT>,
5411}
5412impl Default for EventInstanceT {
5413 fn default() -> Self {
5414 Self {
5415 part_index: 0,
5416 value: Default::default(),
5417 }
5418 }
5419}
5420impl EventInstanceT {
5421 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
5422 &self,
5423 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
5424 ) -> ::flatbuffers::WIPOffset<EventInstance<'b>> {
5425 let part_index = self.part_index;
5426 let value = Some({
5427 let x = &self.value;
5428 x.pack(_fbb)
5429 });
5430 EventInstance::create(_fbb, &EventInstanceArgs{
5431 part_index,
5432 value,
5433 })
5434 }
5435}
5436pub enum EventEffectOffset {}
5437#[derive(Copy, Clone, PartialEq)]
5438
5439pub struct EventEffect<'a> {
5440 pub _tab: ::flatbuffers::Table<'a>,
5441}
5442
5443impl<'a> ::flatbuffers::Follow<'a> for EventEffect<'a> {
5444 type Inner = EventEffect<'a>;
5445 #[inline]
5446 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5447 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
5448 }
5449}
5450
5451impl<'a> EventEffect<'a> {
5452 pub const VT_PART_INDEX: ::flatbuffers::VOffsetT = 4;
5453 pub const VT_VALUE: ::flatbuffers::VOffsetT = 6;
5454
5455 #[inline]
5456 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
5457 EventEffect { _tab: table }
5458 }
5459 #[allow(unused_mut)]
5460 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
5461 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
5462 args: &'args EventEffectArgs<'args>
5463 ) -> ::flatbuffers::WIPOffset<EventEffect<'bldr>> {
5464 let mut builder = EventEffectBuilder::new(_fbb);
5465 if let Some(x) = args.value { builder.add_value(x); }
5466 builder.add_part_index(args.part_index);
5467 builder.finish()
5468 }
5469
5470 pub fn unpack(&self) -> EventEffectT {
5471 let part_index = self.part_index();
5472 let value = {
5473 let x = self.value();
5474 alloc::boxed::Box::new(x.unpack())
5475 };
5476 EventEffectT {
5477 part_index,
5478 value,
5479 }
5480 }
5481
5482 #[inline]
5483 pub fn part_index(&self) -> u16 {
5484 unsafe { self._tab.get::<u16>(EventEffect::VT_PART_INDEX, Some(0)).unwrap()}
5488 }
5489 #[inline]
5490 pub fn key_compare_less_than(&self, o: &EventEffect) -> bool {
5491 self.part_index() < o.part_index()
5492 }
5493
5494 #[inline]
5495 pub fn key_compare_with_value(&self, val: u16) -> ::core::cmp::Ordering {
5496 let key = self.part_index();
5497 key.cmp(&val)
5498 }
5499 #[inline]
5500 pub fn value(&self) -> PartAttributeEffect<'a> {
5501 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartAttributeEffect>>(EventEffect::VT_VALUE, None).unwrap()}
5505 }
5506}
5507
5508impl ::flatbuffers::Verifiable for EventEffect<'_> {
5509 #[inline]
5510 fn run_verifier(
5511 v: &mut ::flatbuffers::Verifier, pos: usize
5512 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
5513 v.visit_table(pos)?
5514 .visit_field::<u16>("part_index", Self::VT_PART_INDEX, false)?
5515 .visit_field::<::flatbuffers::ForwardsUOffset<PartAttributeEffect>>("value", Self::VT_VALUE, true)?
5516 .finish();
5517 Ok(())
5518 }
5519}
5520pub struct EventEffectArgs<'a> {
5521 pub part_index: u16,
5522 pub value: Option<::flatbuffers::WIPOffset<PartAttributeEffect<'a>>>,
5523}
5524impl<'a> Default for EventEffectArgs<'a> {
5525 #[inline]
5526 fn default() -> Self {
5527 EventEffectArgs {
5528 part_index: 0,
5529 value: None, }
5531 }
5532}
5533
5534pub struct EventEffectBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
5535 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
5536 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
5537}
5538impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EventEffectBuilder<'a, 'b, A> {
5539 #[inline]
5540 pub fn add_part_index(&mut self, part_index: u16) {
5541 self.fbb_.push_slot::<u16>(EventEffect::VT_PART_INDEX, part_index, 0);
5542 }
5543 #[inline]
5544 pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<PartAttributeEffect<'b >>) {
5545 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartAttributeEffect>>(EventEffect::VT_VALUE, value);
5546 }
5547 #[inline]
5548 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EventEffectBuilder<'a, 'b, A> {
5549 let start = _fbb.start_table();
5550 EventEffectBuilder {
5551 fbb_: _fbb,
5552 start_: start,
5553 }
5554 }
5555 #[inline]
5556 pub fn finish(self) -> ::flatbuffers::WIPOffset<EventEffect<'a>> {
5557 let o = self.fbb_.end_table(self.start_);
5558 self.fbb_.required(o, EventEffect::VT_VALUE,"value");
5559 ::flatbuffers::WIPOffset::new(o.value())
5560 }
5561}
5562
5563impl ::core::fmt::Debug for EventEffect<'_> {
5564 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5565 let mut ds = f.debug_struct("EventEffect");
5566 ds.field("part_index", &self.part_index());
5567 ds.field("value", &self.value());
5568 ds.finish()
5569 }
5570}
5571#[non_exhaustive]
5572#[derive(Debug, Clone, PartialEq)]
5573pub struct EventEffectT {
5574 pub part_index: u16,
5575 pub value: alloc::boxed::Box<PartAttributeEffectT>,
5576}
5577impl Default for EventEffectT {
5578 fn default() -> Self {
5579 Self {
5580 part_index: 0,
5581 value: Default::default(),
5582 }
5583 }
5584}
5585impl EventEffectT {
5586 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
5587 &self,
5588 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
5589 ) -> ::flatbuffers::WIPOffset<EventEffect<'b>> {
5590 let part_index = self.part_index;
5591 let value = Some({
5592 let x = &self.value;
5593 x.pack(_fbb)
5594 });
5595 EventEffect::create(_fbb, &EventEffectArgs{
5596 part_index,
5597 value,
5598 })
5599 }
5600}
5601pub enum EventsPerFrameOffset {}
5602#[derive(Copy, Clone, PartialEq)]
5603
5604pub struct EventsPerFrame<'a> {
5605 pub _tab: ::flatbuffers::Table<'a>,
5606}
5607
5608impl<'a> ::flatbuffers::Follow<'a> for EventsPerFrame<'a> {
5609 type Inner = EventsPerFrame<'a>;
5610 #[inline]
5611 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5612 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
5613 }
5614}
5615
5616impl<'a> EventsPerFrame<'a> {
5617 pub const VT_FRAME_INDEX: ::flatbuffers::VOffsetT = 4;
5618 pub const VT_USERS: ::flatbuffers::VOffsetT = 6;
5619 pub const VT_SIGNALS: ::flatbuffers::VOffsetT = 8;
5620 pub const VT_AUDIOS: ::flatbuffers::VOffsetT = 10;
5621 pub const VT_INSTANCES: ::flatbuffers::VOffsetT = 12;
5622 pub const VT_EFFECTS: ::flatbuffers::VOffsetT = 14;
5623
5624 #[inline]
5625 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
5626 EventsPerFrame { _tab: table }
5627 }
5628 #[allow(unused_mut)]
5629 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
5630 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
5631 args: &'args EventsPerFrameArgs<'args>
5632 ) -> ::flatbuffers::WIPOffset<EventsPerFrame<'bldr>> {
5633 let mut builder = EventsPerFrameBuilder::new(_fbb);
5634 if let Some(x) = args.effects { builder.add_effects(x); }
5635 if let Some(x) = args.instances { builder.add_instances(x); }
5636 if let Some(x) = args.audios { builder.add_audios(x); }
5637 if let Some(x) = args.signals { builder.add_signals(x); }
5638 if let Some(x) = args.users { builder.add_users(x); }
5639 builder.add_frame_index(args.frame_index);
5640 builder.finish()
5641 }
5642
5643 pub fn unpack(&self) -> EventsPerFrameT {
5644 let frame_index = self.frame_index();
5645 let users = self.users().map(|x| {
5646 x.iter().map(|t| t.unpack()).collect()
5647 });
5648 let signals = self.signals().map(|x| {
5649 x.iter().map(|t| t.unpack()).collect()
5650 });
5651 let audios = self.audios().map(|x| {
5652 x.iter().map(|t| t.unpack()).collect()
5653 });
5654 let instances = self.instances().map(|x| {
5655 x.iter().map(|t| t.unpack()).collect()
5656 });
5657 let effects = self.effects().map(|x| {
5658 x.iter().map(|t| t.unpack()).collect()
5659 });
5660 EventsPerFrameT {
5661 frame_index,
5662 users,
5663 signals,
5664 audios,
5665 instances,
5666 effects,
5667 }
5668 }
5669
5670 #[inline]
5671 pub fn frame_index(&self) -> u16 {
5672 unsafe { self._tab.get::<u16>(EventsPerFrame::VT_FRAME_INDEX, Some(0)).unwrap()}
5676 }
5677 #[inline]
5678 pub fn key_compare_less_than(&self, o: &EventsPerFrame) -> bool {
5679 self.frame_index() < o.frame_index()
5680 }
5681
5682 #[inline]
5683 pub fn key_compare_with_value(&self, val: u16) -> ::core::cmp::Ordering {
5684 let key = self.frame_index();
5685 key.cmp(&val)
5686 }
5687 #[inline]
5688 pub fn users(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventUserData<'a>>>> {
5689 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventUserData>>>>(EventsPerFrame::VT_USERS, None)}
5693 }
5694 #[inline]
5695 pub fn signals(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventSignal<'a>>>> {
5696 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventSignal>>>>(EventsPerFrame::VT_SIGNALS, None)}
5700 }
5701 #[inline]
5702 pub fn audios(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventAudio<'a>>>> {
5703 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventAudio>>>>(EventsPerFrame::VT_AUDIOS, None)}
5707 }
5708 #[inline]
5709 pub fn instances(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventInstance<'a>>>> {
5710 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventInstance>>>>(EventsPerFrame::VT_INSTANCES, None)}
5714 }
5715 #[inline]
5716 pub fn effects(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventEffect<'a>>>> {
5717 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventEffect>>>>(EventsPerFrame::VT_EFFECTS, None)}
5721 }
5722}
5723
5724impl ::flatbuffers::Verifiable for EventsPerFrame<'_> {
5725 #[inline]
5726 fn run_verifier(
5727 v: &mut ::flatbuffers::Verifier, pos: usize
5728 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
5729 v.visit_table(pos)?
5730 .visit_field::<u16>("frame_index", Self::VT_FRAME_INDEX, false)?
5731 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<EventUserData>>>>("users", Self::VT_USERS, false)?
5732 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<EventSignal>>>>("signals", Self::VT_SIGNALS, false)?
5733 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<EventAudio>>>>("audios", Self::VT_AUDIOS, false)?
5734 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<EventInstance>>>>("instances", Self::VT_INSTANCES, false)?
5735 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<EventEffect>>>>("effects", Self::VT_EFFECTS, false)?
5736 .finish();
5737 Ok(())
5738 }
5739}
5740pub struct EventsPerFrameArgs<'a> {
5741 pub frame_index: u16,
5742 pub users: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventUserData<'a>>>>>,
5743 pub signals: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventSignal<'a>>>>>,
5744 pub audios: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventAudio<'a>>>>>,
5745 pub instances: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventInstance<'a>>>>>,
5746 pub effects: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventEffect<'a>>>>>,
5747}
5748impl<'a> Default for EventsPerFrameArgs<'a> {
5749 #[inline]
5750 fn default() -> Self {
5751 EventsPerFrameArgs {
5752 frame_index: 0,
5753 users: None,
5754 signals: None,
5755 audios: None,
5756 instances: None,
5757 effects: None,
5758 }
5759 }
5760}
5761
5762pub struct EventsPerFrameBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
5763 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
5764 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
5765}
5766impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EventsPerFrameBuilder<'a, 'b, A> {
5767 #[inline]
5768 pub fn add_frame_index(&mut self, frame_index: u16) {
5769 self.fbb_.push_slot::<u16>(EventsPerFrame::VT_FRAME_INDEX, frame_index, 0);
5770 }
5771 #[inline]
5772 pub fn add_users(&mut self, users: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<EventUserData<'b >>>>) {
5773 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(EventsPerFrame::VT_USERS, users);
5774 }
5775 #[inline]
5776 pub fn add_signals(&mut self, signals: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<EventSignal<'b >>>>) {
5777 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(EventsPerFrame::VT_SIGNALS, signals);
5778 }
5779 #[inline]
5780 pub fn add_audios(&mut self, audios: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<EventAudio<'b >>>>) {
5781 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(EventsPerFrame::VT_AUDIOS, audios);
5782 }
5783 #[inline]
5784 pub fn add_instances(&mut self, instances: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<EventInstance<'b >>>>) {
5785 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(EventsPerFrame::VT_INSTANCES, instances);
5786 }
5787 #[inline]
5788 pub fn add_effects(&mut self, effects: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<EventEffect<'b >>>>) {
5789 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(EventsPerFrame::VT_EFFECTS, effects);
5790 }
5791 #[inline]
5792 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EventsPerFrameBuilder<'a, 'b, A> {
5793 let start = _fbb.start_table();
5794 EventsPerFrameBuilder {
5795 fbb_: _fbb,
5796 start_: start,
5797 }
5798 }
5799 #[inline]
5800 pub fn finish(self) -> ::flatbuffers::WIPOffset<EventsPerFrame<'a>> {
5801 let o = self.fbb_.end_table(self.start_);
5802 ::flatbuffers::WIPOffset::new(o.value())
5803 }
5804}
5805
5806impl ::core::fmt::Debug for EventsPerFrame<'_> {
5807 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5808 let mut ds = f.debug_struct("EventsPerFrame");
5809 ds.field("frame_index", &self.frame_index());
5810 ds.field("users", &self.users());
5811 ds.field("signals", &self.signals());
5812 ds.field("audios", &self.audios());
5813 ds.field("instances", &self.instances());
5814 ds.field("effects", &self.effects());
5815 ds.finish()
5816 }
5817}
5818#[non_exhaustive]
5819#[derive(Debug, Clone, PartialEq)]
5820pub struct EventsPerFrameT {
5821 pub frame_index: u16,
5822 pub users: Option<alloc::vec::Vec<EventUserDataT>>,
5823 pub signals: Option<alloc::vec::Vec<EventSignalT>>,
5824 pub audios: Option<alloc::vec::Vec<EventAudioT>>,
5825 pub instances: Option<alloc::vec::Vec<EventInstanceT>>,
5826 pub effects: Option<alloc::vec::Vec<EventEffectT>>,
5827}
5828impl Default for EventsPerFrameT {
5829 fn default() -> Self {
5830 Self {
5831 frame_index: 0,
5832 users: None,
5833 signals: None,
5834 audios: None,
5835 instances: None,
5836 effects: None,
5837 }
5838 }
5839}
5840impl EventsPerFrameT {
5841 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
5842 &self,
5843 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
5844 ) -> ::flatbuffers::WIPOffset<EventsPerFrame<'b>> {
5845 let frame_index = self.frame_index;
5846 let users = self.users.as_ref().map(|x|{
5847 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
5848 });
5849 let signals = self.signals.as_ref().map(|x|{
5850 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
5851 });
5852 let audios = self.audios.as_ref().map(|x|{
5853 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
5854 });
5855 let instances = self.instances.as_ref().map(|x|{
5856 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
5857 });
5858 let effects = self.effects.as_ref().map(|x|{
5859 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
5860 });
5861 EventsPerFrame::create(_fbb, &EventsPerFrameArgs{
5862 frame_index,
5863 users,
5864 signals,
5865 audios,
5866 instances,
5867 effects,
5868 })
5869 }
5870}
5871pub enum CellOffset {}
5872#[derive(Copy, Clone, PartialEq)]
5873
5874pub struct Cell<'a> {
5875 pub _tab: ::flatbuffers::Table<'a>,
5876}
5877
5878impl<'a> ::flatbuffers::Follow<'a> for Cell<'a> {
5879 type Inner = Cell<'a>;
5880 #[inline]
5881 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5882 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
5883 }
5884}
5885
5886impl<'a> Cell<'a> {
5887 pub const VT_NAME_HASH: ::flatbuffers::VOffsetT = 4;
5888 pub const VT_NAME: ::flatbuffers::VOffsetT = 6;
5889 pub const VT_REGION: ::flatbuffers::VOffsetT = 8;
5890 pub const VT_PIVOT: ::flatbuffers::VOffsetT = 10;
5891 pub const VT_ROTATED: ::flatbuffers::VOffsetT = 12;
5892 pub const VT_TABLE_COORD_X: ::flatbuffers::VOffsetT = 14;
5893 pub const VT_TABLE_COORD_Y: ::flatbuffers::VOffsetT = 16;
5894 pub const VT_TABLE_INDEX_VERTEX: ::flatbuffers::VOffsetT = 18;
5895
5896 #[inline]
5897 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
5898 Cell { _tab: table }
5899 }
5900 #[allow(unused_mut)]
5901 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
5902 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
5903 args: &'args CellArgs<'args>
5904 ) -> ::flatbuffers::WIPOffset<Cell<'bldr>> {
5905 let mut builder = CellBuilder::new(_fbb);
5906 if let Some(x) = args.table_index_vertex { builder.add_table_index_vertex(x); }
5907 if let Some(x) = args.table_coord_y { builder.add_table_coord_y(x); }
5908 if let Some(x) = args.table_coord_x { builder.add_table_coord_x(x); }
5909 if let Some(x) = args.pivot { builder.add_pivot(x); }
5910 if let Some(x) = args.region { builder.add_region(x); }
5911 if let Some(x) = args.name { builder.add_name(x); }
5912 builder.add_name_hash(args.name_hash);
5913 builder.add_rotated(args.rotated);
5914 builder.finish()
5915 }
5916
5917 pub fn unpack(&self) -> CellT {
5918 let name_hash = self.name_hash();
5919 let name = {
5920 let x = self.name();
5921 alloc::string::ToString::to_string(x)
5922 };
5923 let region = {
5924 let x = self.region();
5925 alloc::boxed::Box::new(x.unpack())
5926 };
5927 let pivot = {
5928 let x = self.pivot();
5929 alloc::boxed::Box::new(x.unpack())
5930 };
5931 let rotated = self.rotated();
5932 let table_coord_x = self.table_coord_x().map(|x| {
5933 x.into_iter().collect()
5934 });
5935 let table_coord_y = self.table_coord_y().map(|x| {
5936 x.into_iter().collect()
5937 });
5938 let table_index_vertex = self.table_index_vertex().map(|x| {
5939 x.into_iter().collect()
5940 });
5941 CellT {
5942 name_hash,
5943 name,
5944 region,
5945 pivot,
5946 rotated,
5947 table_coord_x,
5948 table_coord_y,
5949 table_index_vertex,
5950 }
5951 }
5952
5953 #[inline]
5954 pub fn name_hash(&self) -> u32 {
5955 unsafe { self._tab.get::<u32>(Cell::VT_NAME_HASH, Some(0)).unwrap()}
5959 }
5960 #[inline]
5961 pub fn key_compare_less_than(&self, o: &Cell) -> bool {
5962 self.name_hash() < o.name_hash()
5963 }
5964
5965 #[inline]
5966 pub fn key_compare_with_value(&self, val: u32) -> ::core::cmp::Ordering {
5967 let key = self.name_hash();
5968 key.cmp(&val)
5969 }
5970 #[inline]
5971 pub fn name(&self) -> &'a str {
5972 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Cell::VT_NAME, None).unwrap()}
5976 }
5977 #[inline]
5978 pub fn region(&self) -> Region<'a> {
5979 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Region>>(Cell::VT_REGION, None).unwrap()}
5983 }
5984 #[inline]
5985 pub fn pivot(&self) -> Vec2<'a> {
5986 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(Cell::VT_PIVOT, None).unwrap()}
5990 }
5991 #[inline]
5992 pub fn rotated(&self) -> bool {
5993 unsafe { self._tab.get::<bool>(Cell::VT_ROTATED, Some(false)).unwrap()}
5997 }
5998 #[inline]
5999 pub fn table_coord_x(&self) -> Option<::flatbuffers::Vector<'a, f32>> {
6000 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, f32>>>(Cell::VT_TABLE_COORD_X, None)}
6004 }
6005 #[inline]
6006 pub fn table_coord_y(&self) -> Option<::flatbuffers::Vector<'a, f32>> {
6007 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, f32>>>(Cell::VT_TABLE_COORD_Y, None)}
6011 }
6012 #[inline]
6013 pub fn table_index_vertex(&self) -> Option<::flatbuffers::Vector<'a, u16>> {
6014 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u16>>>(Cell::VT_TABLE_INDEX_VERTEX, None)}
6018 }
6019}
6020
6021impl ::flatbuffers::Verifiable for Cell<'_> {
6022 #[inline]
6023 fn run_verifier(
6024 v: &mut ::flatbuffers::Verifier, pos: usize
6025 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
6026 v.visit_table(pos)?
6027 .visit_field::<u32>("name_hash", Self::VT_NAME_HASH, false)?
6028 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
6029 .visit_field::<::flatbuffers::ForwardsUOffset<Region>>("region", Self::VT_REGION, true)?
6030 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("pivot", Self::VT_PIVOT, true)?
6031 .visit_field::<bool>("rotated", Self::VT_ROTATED, false)?
6032 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, f32>>>("table_coord_x", Self::VT_TABLE_COORD_X, false)?
6033 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, f32>>>("table_coord_y", Self::VT_TABLE_COORD_Y, false)?
6034 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u16>>>("table_index_vertex", Self::VT_TABLE_INDEX_VERTEX, false)?
6035 .finish();
6036 Ok(())
6037 }
6038}
6039pub struct CellArgs<'a> {
6040 pub name_hash: u32,
6041 pub name: Option<::flatbuffers::WIPOffset<&'a str>>,
6042 pub region: Option<::flatbuffers::WIPOffset<Region<'a>>>,
6043 pub pivot: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
6044 pub rotated: bool,
6045 pub table_coord_x: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, f32>>>,
6046 pub table_coord_y: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, f32>>>,
6047 pub table_index_vertex: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u16>>>,
6048}
6049impl<'a> Default for CellArgs<'a> {
6050 #[inline]
6051 fn default() -> Self {
6052 CellArgs {
6053 name_hash: 0,
6054 name: None, region: None, pivot: None, rotated: false,
6058 table_coord_x: None,
6059 table_coord_y: None,
6060 table_index_vertex: None,
6061 }
6062 }
6063}
6064
6065pub struct CellBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
6066 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
6067 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
6068}
6069impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> CellBuilder<'a, 'b, A> {
6070 #[inline]
6071 pub fn add_name_hash(&mut self, name_hash: u32) {
6072 self.fbb_.push_slot::<u32>(Cell::VT_NAME_HASH, name_hash, 0);
6073 }
6074 #[inline]
6075 pub fn add_name(&mut self, name: ::flatbuffers::WIPOffset<&'b str>) {
6076 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Cell::VT_NAME, name);
6077 }
6078 #[inline]
6079 pub fn add_region(&mut self, region: ::flatbuffers::WIPOffset<Region<'b >>) {
6080 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Region>>(Cell::VT_REGION, region);
6081 }
6082 #[inline]
6083 pub fn add_pivot(&mut self, pivot: ::flatbuffers::WIPOffset<Vec2<'b >>) {
6084 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(Cell::VT_PIVOT, pivot);
6085 }
6086 #[inline]
6087 pub fn add_rotated(&mut self, rotated: bool) {
6088 self.fbb_.push_slot::<bool>(Cell::VT_ROTATED, rotated, false);
6089 }
6090 #[inline]
6091 pub fn add_table_coord_x(&mut self, table_coord_x: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , f32>>) {
6092 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Cell::VT_TABLE_COORD_X, table_coord_x);
6093 }
6094 #[inline]
6095 pub fn add_table_coord_y(&mut self, table_coord_y: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , f32>>) {
6096 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Cell::VT_TABLE_COORD_Y, table_coord_y);
6097 }
6098 #[inline]
6099 pub fn add_table_index_vertex(&mut self, table_index_vertex: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , u16>>) {
6100 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Cell::VT_TABLE_INDEX_VERTEX, table_index_vertex);
6101 }
6102 #[inline]
6103 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> CellBuilder<'a, 'b, A> {
6104 let start = _fbb.start_table();
6105 CellBuilder {
6106 fbb_: _fbb,
6107 start_: start,
6108 }
6109 }
6110 #[inline]
6111 pub fn finish(self) -> ::flatbuffers::WIPOffset<Cell<'a>> {
6112 let o = self.fbb_.end_table(self.start_);
6113 self.fbb_.required(o, Cell::VT_NAME,"name");
6114 self.fbb_.required(o, Cell::VT_REGION,"region");
6115 self.fbb_.required(o, Cell::VT_PIVOT,"pivot");
6116 ::flatbuffers::WIPOffset::new(o.value())
6117 }
6118}
6119
6120impl ::core::fmt::Debug for Cell<'_> {
6121 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6122 let mut ds = f.debug_struct("Cell");
6123 ds.field("name_hash", &self.name_hash());
6124 ds.field("name", &self.name());
6125 ds.field("region", &self.region());
6126 ds.field("pivot", &self.pivot());
6127 ds.field("rotated", &self.rotated());
6128 ds.field("table_coord_x", &self.table_coord_x());
6129 ds.field("table_coord_y", &self.table_coord_y());
6130 ds.field("table_index_vertex", &self.table_index_vertex());
6131 ds.finish()
6132 }
6133}
6134#[non_exhaustive]
6135#[derive(Debug, Clone, PartialEq)]
6136pub struct CellT {
6137 pub name_hash: u32,
6138 pub name: alloc::string::String,
6139 pub region: alloc::boxed::Box<RegionT>,
6140 pub pivot: alloc::boxed::Box<Vec2T>,
6141 pub rotated: bool,
6142 pub table_coord_x: Option<alloc::vec::Vec<f32>>,
6143 pub table_coord_y: Option<alloc::vec::Vec<f32>>,
6144 pub table_index_vertex: Option<alloc::vec::Vec<u16>>,
6145}
6146impl Default for CellT {
6147 fn default() -> Self {
6148 Self {
6149 name_hash: 0,
6150 name: alloc::string::ToString::to_string(""),
6151 region: Default::default(),
6152 pivot: Default::default(),
6153 rotated: false,
6154 table_coord_x: None,
6155 table_coord_y: None,
6156 table_index_vertex: None,
6157 }
6158 }
6159}
6160impl CellT {
6161 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
6162 &self,
6163 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
6164 ) -> ::flatbuffers::WIPOffset<Cell<'b>> {
6165 let name_hash = self.name_hash;
6166 let name = Some({
6167 let x = &self.name;
6168 _fbb.create_string(x)
6169 });
6170 let region = Some({
6171 let x = &self.region;
6172 x.pack(_fbb)
6173 });
6174 let pivot = Some({
6175 let x = &self.pivot;
6176 x.pack(_fbb)
6177 });
6178 let rotated = self.rotated;
6179 let table_coord_x = self.table_coord_x.as_ref().map(|x|{
6180 _fbb.create_vector(x)
6181 });
6182 let table_coord_y = self.table_coord_y.as_ref().map(|x|{
6183 _fbb.create_vector(x)
6184 });
6185 let table_index_vertex = self.table_index_vertex.as_ref().map(|x|{
6186 _fbb.create_vector(x)
6187 });
6188 Cell::create(_fbb, &CellArgs{
6189 name_hash,
6190 name,
6191 region,
6192 pivot,
6193 rotated,
6194 table_coord_x,
6195 table_coord_y,
6196 table_index_vertex,
6197 })
6198 }
6199}
6200pub enum CellMapOffset {}
6201#[derive(Copy, Clone, PartialEq)]
6202
6203pub struct CellMap<'a> {
6204 pub _tab: ::flatbuffers::Table<'a>,
6205}
6206
6207impl<'a> ::flatbuffers::Follow<'a> for CellMap<'a> {
6208 type Inner = CellMap<'a>;
6209 #[inline]
6210 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6211 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
6212 }
6213}
6214
6215impl<'a> CellMap<'a> {
6216 pub const VT_NAME_HASH: ::flatbuffers::VOffsetT = 4;
6217 pub const VT_NAME: ::flatbuffers::VOffsetT = 6;
6218 pub const VT_IMAGE_PATH: ::flatbuffers::VOffsetT = 8;
6219 pub const VT_IMAGE_PATH_HASH: ::flatbuffers::VOffsetT = 10;
6220 pub const VT_SIZE_ORIGINAL: ::flatbuffers::VOffsetT = 12;
6221 pub const VT_WRAP_MODE: ::flatbuffers::VOffsetT = 14;
6222 pub const VT_FILTER_MODE: ::flatbuffers::VOffsetT = 16;
6223 pub const VT_CELLS: ::flatbuffers::VOffsetT = 18;
6224
6225 #[inline]
6226 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
6227 CellMap { _tab: table }
6228 }
6229 #[allow(unused_mut)]
6230 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
6231 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
6232 args: &'args CellMapArgs<'args>
6233 ) -> ::flatbuffers::WIPOffset<CellMap<'bldr>> {
6234 let mut builder = CellMapBuilder::new(_fbb);
6235 if let Some(x) = args.cells { builder.add_cells(x); }
6236 if let Some(x) = args.size_original { builder.add_size_original(x); }
6237 builder.add_image_path_hash(args.image_path_hash);
6238 if let Some(x) = args.image_path { builder.add_image_path(x); }
6239 if let Some(x) = args.name { builder.add_name(x); }
6240 builder.add_name_hash(args.name_hash);
6241 builder.add_filter_mode(args.filter_mode);
6242 builder.add_wrap_mode(args.wrap_mode);
6243 builder.finish()
6244 }
6245
6246 pub fn unpack(&self) -> CellMapT {
6247 let name_hash = self.name_hash();
6248 let name = {
6249 let x = self.name();
6250 alloc::string::ToString::to_string(x)
6251 };
6252 let image_path = {
6253 let x = self.image_path();
6254 alloc::string::ToString::to_string(x)
6255 };
6256 let image_path_hash = self.image_path_hash();
6257 let size_original = {
6258 let x = self.size_original();
6259 alloc::boxed::Box::new(x.unpack())
6260 };
6261 let wrap_mode = self.wrap_mode();
6262 let filter_mode = self.filter_mode();
6263 let cells = self.cells().map(|x| {
6264 x.iter().map(|t| t.unpack()).collect()
6265 });
6266 CellMapT {
6267 name_hash,
6268 name,
6269 image_path,
6270 image_path_hash,
6271 size_original,
6272 wrap_mode,
6273 filter_mode,
6274 cells,
6275 }
6276 }
6277
6278 #[inline]
6279 pub fn name_hash(&self) -> u32 {
6280 unsafe { self._tab.get::<u32>(CellMap::VT_NAME_HASH, Some(0)).unwrap()}
6284 }
6285 #[inline]
6286 pub fn key_compare_less_than(&self, o: &CellMap) -> bool {
6287 self.name_hash() < o.name_hash()
6288 }
6289
6290 #[inline]
6291 pub fn key_compare_with_value(&self, val: u32) -> ::core::cmp::Ordering {
6292 let key = self.name_hash();
6293 key.cmp(&val)
6294 }
6295 #[inline]
6296 pub fn name(&self) -> &'a str {
6297 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(CellMap::VT_NAME, None).unwrap()}
6301 }
6302 #[inline]
6303 pub fn image_path(&self) -> &'a str {
6304 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(CellMap::VT_IMAGE_PATH, None).unwrap()}
6308 }
6309 #[inline]
6310 pub fn image_path_hash(&self) -> u32 {
6311 unsafe { self._tab.get::<u32>(CellMap::VT_IMAGE_PATH_HASH, Some(0)).unwrap()}
6315 }
6316 #[inline]
6317 pub fn size_original(&self) -> Vec2<'a> {
6318 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(CellMap::VT_SIZE_ORIGINAL, None).unwrap()}
6322 }
6323 #[inline]
6324 pub fn wrap_mode(&self) -> TexWrapMode {
6325 unsafe { self._tab.get::<TexWrapMode>(CellMap::VT_WRAP_MODE, Some(TexWrapMode::Clamp)).unwrap()}
6329 }
6330 #[inline]
6331 pub fn filter_mode(&self) -> TexFilterMode {
6332 unsafe { self._tab.get::<TexFilterMode>(CellMap::VT_FILTER_MODE, Some(TexFilterMode::Nearest)).unwrap()}
6336 }
6337 #[inline]
6338 pub fn cells(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Cell<'a>>>> {
6339 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Cell>>>>(CellMap::VT_CELLS, None)}
6343 }
6344}
6345
6346impl ::flatbuffers::Verifiable for CellMap<'_> {
6347 #[inline]
6348 fn run_verifier(
6349 v: &mut ::flatbuffers::Verifier, pos: usize
6350 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
6351 v.visit_table(pos)?
6352 .visit_field::<u32>("name_hash", Self::VT_NAME_HASH, false)?
6353 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
6354 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("image_path", Self::VT_IMAGE_PATH, true)?
6355 .visit_field::<u32>("image_path_hash", Self::VT_IMAGE_PATH_HASH, false)?
6356 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("size_original", Self::VT_SIZE_ORIGINAL, true)?
6357 .visit_field::<TexWrapMode>("wrap_mode", Self::VT_WRAP_MODE, false)?
6358 .visit_field::<TexFilterMode>("filter_mode", Self::VT_FILTER_MODE, false)?
6359 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Cell>>>>("cells", Self::VT_CELLS, false)?
6360 .finish();
6361 Ok(())
6362 }
6363}
6364pub struct CellMapArgs<'a> {
6365 pub name_hash: u32,
6366 pub name: Option<::flatbuffers::WIPOffset<&'a str>>,
6367 pub image_path: Option<::flatbuffers::WIPOffset<&'a str>>,
6368 pub image_path_hash: u32,
6369 pub size_original: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
6370 pub wrap_mode: TexWrapMode,
6371 pub filter_mode: TexFilterMode,
6372 pub cells: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Cell<'a>>>>>,
6373}
6374impl<'a> Default for CellMapArgs<'a> {
6375 #[inline]
6376 fn default() -> Self {
6377 CellMapArgs {
6378 name_hash: 0,
6379 name: None, image_path: None, image_path_hash: 0,
6382 size_original: None, wrap_mode: TexWrapMode::Clamp,
6384 filter_mode: TexFilterMode::Nearest,
6385 cells: None,
6386 }
6387 }
6388}
6389
6390pub struct CellMapBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
6391 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
6392 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
6393}
6394impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> CellMapBuilder<'a, 'b, A> {
6395 #[inline]
6396 pub fn add_name_hash(&mut self, name_hash: u32) {
6397 self.fbb_.push_slot::<u32>(CellMap::VT_NAME_HASH, name_hash, 0);
6398 }
6399 #[inline]
6400 pub fn add_name(&mut self, name: ::flatbuffers::WIPOffset<&'b str>) {
6401 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(CellMap::VT_NAME, name);
6402 }
6403 #[inline]
6404 pub fn add_image_path(&mut self, image_path: ::flatbuffers::WIPOffset<&'b str>) {
6405 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(CellMap::VT_IMAGE_PATH, image_path);
6406 }
6407 #[inline]
6408 pub fn add_image_path_hash(&mut self, image_path_hash: u32) {
6409 self.fbb_.push_slot::<u32>(CellMap::VT_IMAGE_PATH_HASH, image_path_hash, 0);
6410 }
6411 #[inline]
6412 pub fn add_size_original(&mut self, size_original: ::flatbuffers::WIPOffset<Vec2<'b >>) {
6413 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(CellMap::VT_SIZE_ORIGINAL, size_original);
6414 }
6415 #[inline]
6416 pub fn add_wrap_mode(&mut self, wrap_mode: TexWrapMode) {
6417 self.fbb_.push_slot::<TexWrapMode>(CellMap::VT_WRAP_MODE, wrap_mode, TexWrapMode::Clamp);
6418 }
6419 #[inline]
6420 pub fn add_filter_mode(&mut self, filter_mode: TexFilterMode) {
6421 self.fbb_.push_slot::<TexFilterMode>(CellMap::VT_FILTER_MODE, filter_mode, TexFilterMode::Nearest);
6422 }
6423 #[inline]
6424 pub fn add_cells(&mut self, cells: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Cell<'b >>>>) {
6425 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(CellMap::VT_CELLS, cells);
6426 }
6427 #[inline]
6428 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> CellMapBuilder<'a, 'b, A> {
6429 let start = _fbb.start_table();
6430 CellMapBuilder {
6431 fbb_: _fbb,
6432 start_: start,
6433 }
6434 }
6435 #[inline]
6436 pub fn finish(self) -> ::flatbuffers::WIPOffset<CellMap<'a>> {
6437 let o = self.fbb_.end_table(self.start_);
6438 self.fbb_.required(o, CellMap::VT_NAME,"name");
6439 self.fbb_.required(o, CellMap::VT_IMAGE_PATH,"image_path");
6440 self.fbb_.required(o, CellMap::VT_SIZE_ORIGINAL,"size_original");
6441 ::flatbuffers::WIPOffset::new(o.value())
6442 }
6443}
6444
6445impl ::core::fmt::Debug for CellMap<'_> {
6446 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6447 let mut ds = f.debug_struct("CellMap");
6448 ds.field("name_hash", &self.name_hash());
6449 ds.field("name", &self.name());
6450 ds.field("image_path", &self.image_path());
6451 ds.field("image_path_hash", &self.image_path_hash());
6452 ds.field("size_original", &self.size_original());
6453 ds.field("wrap_mode", &self.wrap_mode());
6454 ds.field("filter_mode", &self.filter_mode());
6455 ds.field("cells", &self.cells());
6456 ds.finish()
6457 }
6458}
6459#[non_exhaustive]
6460#[derive(Debug, Clone, PartialEq)]
6461pub struct CellMapT {
6462 pub name_hash: u32,
6463 pub name: alloc::string::String,
6464 pub image_path: alloc::string::String,
6465 pub image_path_hash: u32,
6466 pub size_original: alloc::boxed::Box<Vec2T>,
6467 pub wrap_mode: TexWrapMode,
6468 pub filter_mode: TexFilterMode,
6469 pub cells: Option<alloc::vec::Vec<CellT>>,
6470}
6471impl Default for CellMapT {
6472 fn default() -> Self {
6473 Self {
6474 name_hash: 0,
6475 name: alloc::string::ToString::to_string(""),
6476 image_path: alloc::string::ToString::to_string(""),
6477 image_path_hash: 0,
6478 size_original: Default::default(),
6479 wrap_mode: TexWrapMode::Clamp,
6480 filter_mode: TexFilterMode::Nearest,
6481 cells: None,
6482 }
6483 }
6484}
6485impl CellMapT {
6486 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
6487 &self,
6488 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
6489 ) -> ::flatbuffers::WIPOffset<CellMap<'b>> {
6490 let name_hash = self.name_hash;
6491 let name = Some({
6492 let x = &self.name;
6493 _fbb.create_string(x)
6494 });
6495 let image_path = Some({
6496 let x = &self.image_path;
6497 _fbb.create_string(x)
6498 });
6499 let image_path_hash = self.image_path_hash;
6500 let size_original = Some({
6501 let x = &self.size_original;
6502 x.pack(_fbb)
6503 });
6504 let wrap_mode = self.wrap_mode;
6505 let filter_mode = self.filter_mode;
6506 let cells = self.cells.as_ref().map(|x|{
6507 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
6508 });
6509 CellMap::create(_fbb, &CellMapArgs{
6510 name_hash,
6511 name,
6512 image_path,
6513 image_path_hash,
6514 size_original,
6515 wrap_mode,
6516 filter_mode,
6517 cells,
6518 })
6519 }
6520}
6521pub enum EffectParticlePointGravityOffset {}
6522#[derive(Copy, Clone, PartialEq)]
6523
6524pub struct EffectParticlePointGravity<'a> {
6525 pub _tab: ::flatbuffers::Table<'a>,
6526}
6527
6528impl<'a> ::flatbuffers::Follow<'a> for EffectParticlePointGravity<'a> {
6529 type Inner = EffectParticlePointGravity<'a>;
6530 #[inline]
6531 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6532 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
6533 }
6534}
6535
6536impl<'a> EffectParticlePointGravity<'a> {
6537 pub const VT_POSITION: ::flatbuffers::VOffsetT = 4;
6538 pub const VT_POWER: ::flatbuffers::VOffsetT = 6;
6539
6540 #[inline]
6541 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
6542 EffectParticlePointGravity { _tab: table }
6543 }
6544 #[allow(unused_mut)]
6545 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
6546 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
6547 args: &'args EffectParticlePointGravityArgs<'args>
6548 ) -> ::flatbuffers::WIPOffset<EffectParticlePointGravity<'bldr>> {
6549 let mut builder = EffectParticlePointGravityBuilder::new(_fbb);
6550 builder.add_power(args.power);
6551 if let Some(x) = args.position { builder.add_position(x); }
6552 builder.finish()
6553 }
6554
6555 pub fn unpack(&self) -> EffectParticlePointGravityT {
6556 let position = {
6557 let x = self.position();
6558 alloc::boxed::Box::new(x.unpack())
6559 };
6560 let power = self.power();
6561 EffectParticlePointGravityT {
6562 position,
6563 power,
6564 }
6565 }
6566
6567 #[inline]
6568 pub fn position(&self) -> Vec2<'a> {
6569 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(EffectParticlePointGravity::VT_POSITION, None).unwrap()}
6573 }
6574 #[inline]
6575 pub fn power(&self) -> f32 {
6576 unsafe { self._tab.get::<f32>(EffectParticlePointGravity::VT_POWER, Some(0.0)).unwrap()}
6580 }
6581}
6582
6583impl ::flatbuffers::Verifiable for EffectParticlePointGravity<'_> {
6584 #[inline]
6585 fn run_verifier(
6586 v: &mut ::flatbuffers::Verifier, pos: usize
6587 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
6588 v.visit_table(pos)?
6589 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("position", Self::VT_POSITION, true)?
6590 .visit_field::<f32>("power", Self::VT_POWER, false)?
6591 .finish();
6592 Ok(())
6593 }
6594}
6595pub struct EffectParticlePointGravityArgs<'a> {
6596 pub position: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
6597 pub power: f32,
6598}
6599impl<'a> Default for EffectParticlePointGravityArgs<'a> {
6600 #[inline]
6601 fn default() -> Self {
6602 EffectParticlePointGravityArgs {
6603 position: None, power: 0.0,
6605 }
6606 }
6607}
6608
6609pub struct EffectParticlePointGravityBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
6610 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
6611 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
6612}
6613impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EffectParticlePointGravityBuilder<'a, 'b, A> {
6614 #[inline]
6615 pub fn add_position(&mut self, position: ::flatbuffers::WIPOffset<Vec2<'b >>) {
6616 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(EffectParticlePointGravity::VT_POSITION, position);
6617 }
6618 #[inline]
6619 pub fn add_power(&mut self, power: f32) {
6620 self.fbb_.push_slot::<f32>(EffectParticlePointGravity::VT_POWER, power, 0.0);
6621 }
6622 #[inline]
6623 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EffectParticlePointGravityBuilder<'a, 'b, A> {
6624 let start = _fbb.start_table();
6625 EffectParticlePointGravityBuilder {
6626 fbb_: _fbb,
6627 start_: start,
6628 }
6629 }
6630 #[inline]
6631 pub fn finish(self) -> ::flatbuffers::WIPOffset<EffectParticlePointGravity<'a>> {
6632 let o = self.fbb_.end_table(self.start_);
6633 self.fbb_.required(o, EffectParticlePointGravity::VT_POSITION,"position");
6634 ::flatbuffers::WIPOffset::new(o.value())
6635 }
6636}
6637
6638impl ::core::fmt::Debug for EffectParticlePointGravity<'_> {
6639 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6640 let mut ds = f.debug_struct("EffectParticlePointGravity");
6641 ds.field("position", &self.position());
6642 ds.field("power", &self.power());
6643 ds.finish()
6644 }
6645}
6646#[non_exhaustive]
6647#[derive(Debug, Clone, PartialEq)]
6648pub struct EffectParticlePointGravityT {
6649 pub position: alloc::boxed::Box<Vec2T>,
6650 pub power: f32,
6651}
6652impl Default for EffectParticlePointGravityT {
6653 fn default() -> Self {
6654 Self {
6655 position: Default::default(),
6656 power: 0.0,
6657 }
6658 }
6659}
6660impl EffectParticlePointGravityT {
6661 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
6662 &self,
6663 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
6664 ) -> ::flatbuffers::WIPOffset<EffectParticlePointGravity<'b>> {
6665 let position = Some({
6666 let x = &self.position;
6667 x.pack(_fbb)
6668 });
6669 let power = self.power;
6670 EffectParticlePointGravity::create(_fbb, &EffectParticlePointGravityArgs{
6671 position,
6672 power,
6673 })
6674 }
6675}
6676pub enum MinMax2AndVec2ValueTableOffset {}
6677#[derive(Copy, Clone, PartialEq)]
6678
6679pub struct MinMax2AndVec2ValueTable<'a> {
6680 pub _tab: ::flatbuffers::Table<'a>,
6681}
6682
6683impl<'a> ::flatbuffers::Follow<'a> for MinMax2AndVec2ValueTable<'a> {
6684 type Inner = MinMax2AndVec2ValueTable<'a>;
6685 #[inline]
6686 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6687 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
6688 }
6689}
6690
6691impl<'a> MinMax2AndVec2ValueTable<'a> {
6692 pub const VT_SIZE: ::flatbuffers::VOffsetT = 4;
6693 pub const VT_SCALE_FACTOR_VALUE: ::flatbuffers::VOffsetT = 6;
6694
6695 #[inline]
6696 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
6697 MinMax2AndVec2ValueTable { _tab: table }
6698 }
6699 #[allow(unused_mut)]
6700 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
6701 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
6702 args: &'args MinMax2AndVec2ValueTableArgs<'args>
6703 ) -> ::flatbuffers::WIPOffset<MinMax2AndVec2ValueTable<'bldr>> {
6704 let mut builder = MinMax2AndVec2ValueTableBuilder::new(_fbb);
6705 if let Some(x) = args.scale_factor_value { builder.add_scale_factor_value(x); }
6706 if let Some(x) = args.size { builder.add_size(x); }
6707 builder.finish()
6708 }
6709
6710 pub fn unpack(&self) -> MinMax2AndVec2ValueTableT {
6711 let size = self.size().map(|x| {
6712 alloc::boxed::Box::new(x.unpack())
6713 });
6714 let scale_factor_value = {
6715 let x = self.scale_factor_value();
6716 alloc::boxed::Box::new(x.unpack())
6717 };
6718 MinMax2AndVec2ValueTableT {
6719 size,
6720 scale_factor_value,
6721 }
6722 }
6723
6724 #[inline]
6725 pub fn size(&self) -> Option<MinMax2<'a>> {
6726 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<MinMax2>>(MinMax2AndVec2ValueTable::VT_SIZE, None)}
6730 }
6731 #[inline]
6732 pub fn scale_factor_value(&self) -> Vec2<'a> {
6733 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(MinMax2AndVec2ValueTable::VT_SCALE_FACTOR_VALUE, None).unwrap()}
6737 }
6738}
6739
6740impl ::flatbuffers::Verifiable for MinMax2AndVec2ValueTable<'_> {
6741 #[inline]
6742 fn run_verifier(
6743 v: &mut ::flatbuffers::Verifier, pos: usize
6744 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
6745 v.visit_table(pos)?
6746 .visit_field::<::flatbuffers::ForwardsUOffset<MinMax2>>("size", Self::VT_SIZE, false)?
6747 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("scale_factor_value", Self::VT_SCALE_FACTOR_VALUE, true)?
6748 .finish();
6749 Ok(())
6750 }
6751}
6752pub struct MinMax2AndVec2ValueTableArgs<'a> {
6753 pub size: Option<::flatbuffers::WIPOffset<MinMax2<'a>>>,
6754 pub scale_factor_value: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
6755}
6756impl<'a> Default for MinMax2AndVec2ValueTableArgs<'a> {
6757 #[inline]
6758 fn default() -> Self {
6759 MinMax2AndVec2ValueTableArgs {
6760 size: None,
6761 scale_factor_value: None, }
6763 }
6764}
6765
6766pub struct MinMax2AndVec2ValueTableBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
6767 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
6768 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
6769}
6770impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> MinMax2AndVec2ValueTableBuilder<'a, 'b, A> {
6771 #[inline]
6772 pub fn add_size(&mut self, size: ::flatbuffers::WIPOffset<MinMax2<'b >>) {
6773 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<MinMax2>>(MinMax2AndVec2ValueTable::VT_SIZE, size);
6774 }
6775 #[inline]
6776 pub fn add_scale_factor_value(&mut self, scale_factor_value: ::flatbuffers::WIPOffset<Vec2<'b >>) {
6777 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(MinMax2AndVec2ValueTable::VT_SCALE_FACTOR_VALUE, scale_factor_value);
6778 }
6779 #[inline]
6780 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> MinMax2AndVec2ValueTableBuilder<'a, 'b, A> {
6781 let start = _fbb.start_table();
6782 MinMax2AndVec2ValueTableBuilder {
6783 fbb_: _fbb,
6784 start_: start,
6785 }
6786 }
6787 #[inline]
6788 pub fn finish(self) -> ::flatbuffers::WIPOffset<MinMax2AndVec2ValueTable<'a>> {
6789 let o = self.fbb_.end_table(self.start_);
6790 self.fbb_.required(o, MinMax2AndVec2ValueTable::VT_SCALE_FACTOR_VALUE,"scale_factor_value");
6791 ::flatbuffers::WIPOffset::new(o.value())
6792 }
6793}
6794
6795impl ::core::fmt::Debug for MinMax2AndVec2ValueTable<'_> {
6796 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6797 let mut ds = f.debug_struct("MinMax2AndVec2ValueTable");
6798 ds.field("size", &self.size());
6799 ds.field("scale_factor_value", &self.scale_factor_value());
6800 ds.finish()
6801 }
6802}
6803#[non_exhaustive]
6804#[derive(Debug, Clone, PartialEq)]
6805pub struct MinMax2AndVec2ValueTableT {
6806 pub size: Option<alloc::boxed::Box<MinMax2T>>,
6807 pub scale_factor_value: alloc::boxed::Box<Vec2T>,
6808}
6809impl Default for MinMax2AndVec2ValueTableT {
6810 fn default() -> Self {
6811 Self {
6812 size: None,
6813 scale_factor_value: Default::default(),
6814 }
6815 }
6816}
6817impl MinMax2AndVec2ValueTableT {
6818 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
6819 &self,
6820 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
6821 ) -> ::flatbuffers::WIPOffset<MinMax2AndVec2ValueTable<'b>> {
6822 let size = self.size.as_ref().map(|x|{
6823 x.pack(_fbb)
6824 });
6825 let scale_factor_value = Some({
6826 let x = &self.scale_factor_value;
6827 x.pack(_fbb)
6828 });
6829 MinMax2AndVec2ValueTable::create(_fbb, &MinMax2AndVec2ValueTableArgs{
6830 size,
6831 scale_factor_value,
6832 })
6833 }
6834}
6835pub enum EffectParticleElementTransColorOffset {}
6836#[derive(Copy, Clone, PartialEq)]
6837
6838pub struct EffectParticleElementTransColor<'a> {
6839 pub _tab: ::flatbuffers::Table<'a>,
6840}
6841
6842impl<'a> ::flatbuffers::Follow<'a> for EffectParticleElementTransColor<'a> {
6843 type Inner = EffectParticleElementTransColor<'a>;
6844 #[inline]
6845 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6846 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
6847 }
6848}
6849
6850impl<'a> EffectParticleElementTransColor<'a> {
6851 pub const VT_COLOR_MIN_VALUE: ::flatbuffers::VOffsetT = 4;
6852 pub const VT_COLOR_MAX_VALUE: ::flatbuffers::VOffsetT = 6;
6853
6854 #[inline]
6855 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
6856 EffectParticleElementTransColor { _tab: table }
6857 }
6858 #[allow(unused_mut)]
6859 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
6860 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
6861 args: &'args EffectParticleElementTransColorArgs
6862 ) -> ::flatbuffers::WIPOffset<EffectParticleElementTransColor<'bldr>> {
6863 let mut builder = EffectParticleElementTransColorBuilder::new(_fbb);
6864 builder.add_color_max_value(args.color_max_value);
6865 builder.add_color_min_value(args.color_min_value);
6866 builder.finish()
6867 }
6868
6869 pub fn unpack(&self) -> EffectParticleElementTransColorT {
6870 let color_min_value = self.color_min_value();
6871 let color_max_value = self.color_max_value();
6872 EffectParticleElementTransColorT {
6873 color_min_value,
6874 color_max_value,
6875 }
6876 }
6877
6878 #[inline]
6879 pub fn color_min_value(&self) -> u32 {
6880 unsafe { self._tab.get::<u32>(EffectParticleElementTransColor::VT_COLOR_MIN_VALUE, Some(0)).unwrap()}
6884 }
6885 #[inline]
6886 pub fn color_max_value(&self) -> u32 {
6887 unsafe { self._tab.get::<u32>(EffectParticleElementTransColor::VT_COLOR_MAX_VALUE, Some(0)).unwrap()}
6891 }
6892}
6893
6894impl ::flatbuffers::Verifiable for EffectParticleElementTransColor<'_> {
6895 #[inline]
6896 fn run_verifier(
6897 v: &mut ::flatbuffers::Verifier, pos: usize
6898 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
6899 v.visit_table(pos)?
6900 .visit_field::<u32>("color_min_value", Self::VT_COLOR_MIN_VALUE, false)?
6901 .visit_field::<u32>("color_max_value", Self::VT_COLOR_MAX_VALUE, false)?
6902 .finish();
6903 Ok(())
6904 }
6905}
6906pub struct EffectParticleElementTransColorArgs {
6907 pub color_min_value: u32,
6908 pub color_max_value: u32,
6909}
6910impl<'a> Default for EffectParticleElementTransColorArgs {
6911 #[inline]
6912 fn default() -> Self {
6913 EffectParticleElementTransColorArgs {
6914 color_min_value: 0,
6915 color_max_value: 0,
6916 }
6917 }
6918}
6919
6920pub struct EffectParticleElementTransColorBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
6921 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
6922 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
6923}
6924impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EffectParticleElementTransColorBuilder<'a, 'b, A> {
6925 #[inline]
6926 pub fn add_color_min_value(&mut self, color_min_value: u32) {
6927 self.fbb_.push_slot::<u32>(EffectParticleElementTransColor::VT_COLOR_MIN_VALUE, color_min_value, 0);
6928 }
6929 #[inline]
6930 pub fn add_color_max_value(&mut self, color_max_value: u32) {
6931 self.fbb_.push_slot::<u32>(EffectParticleElementTransColor::VT_COLOR_MAX_VALUE, color_max_value, 0);
6932 }
6933 #[inline]
6934 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EffectParticleElementTransColorBuilder<'a, 'b, A> {
6935 let start = _fbb.start_table();
6936 EffectParticleElementTransColorBuilder {
6937 fbb_: _fbb,
6938 start_: start,
6939 }
6940 }
6941 #[inline]
6942 pub fn finish(self) -> ::flatbuffers::WIPOffset<EffectParticleElementTransColor<'a>> {
6943 let o = self.fbb_.end_table(self.start_);
6944 ::flatbuffers::WIPOffset::new(o.value())
6945 }
6946}
6947
6948impl ::core::fmt::Debug for EffectParticleElementTransColor<'_> {
6949 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6950 let mut ds = f.debug_struct("EffectParticleElementTransColor");
6951 ds.field("color_min_value", &self.color_min_value());
6952 ds.field("color_max_value", &self.color_max_value());
6953 ds.finish()
6954 }
6955}
6956#[non_exhaustive]
6957#[derive(Debug, Clone, PartialEq)]
6958pub struct EffectParticleElementTransColorT {
6959 pub color_min_value: u32,
6960 pub color_max_value: u32,
6961}
6962impl Default for EffectParticleElementTransColorT {
6963 fn default() -> Self {
6964 Self {
6965 color_min_value: 0,
6966 color_max_value: 0,
6967 }
6968 }
6969}
6970impl EffectParticleElementTransColorT {
6971 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
6972 &self,
6973 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
6974 ) -> ::flatbuffers::WIPOffset<EffectParticleElementTransColor<'b>> {
6975 let color_min_value = self.color_min_value;
6976 let color_max_value = self.color_max_value;
6977 EffectParticleElementTransColor::create(_fbb, &EffectParticleElementTransColorArgs{
6978 color_min_value,
6979 color_max_value,
6980 })
6981 }
6982}
6983pub enum EffectParticleElementInitColorOffset {}
6984#[derive(Copy, Clone, PartialEq)]
6985
6986pub struct EffectParticleElementInitColor<'a> {
6987 pub _tab: ::flatbuffers::Table<'a>,
6988}
6989
6990impl<'a> ::flatbuffers::Follow<'a> for EffectParticleElementInitColor<'a> {
6991 type Inner = EffectParticleElementInitColor<'a>;
6992 #[inline]
6993 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6994 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
6995 }
6996}
6997
6998impl<'a> EffectParticleElementInitColor<'a> {
6999 pub const VT_COLOR_MIN_VALUE: ::flatbuffers::VOffsetT = 4;
7000 pub const VT_COLOR_MAX_VALUE: ::flatbuffers::VOffsetT = 6;
7001
7002 #[inline]
7003 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
7004 EffectParticleElementInitColor { _tab: table }
7005 }
7006 #[allow(unused_mut)]
7007 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
7008 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
7009 args: &'args EffectParticleElementInitColorArgs
7010 ) -> ::flatbuffers::WIPOffset<EffectParticleElementInitColor<'bldr>> {
7011 let mut builder = EffectParticleElementInitColorBuilder::new(_fbb);
7012 builder.add_color_max_value(args.color_max_value);
7013 builder.add_color_min_value(args.color_min_value);
7014 builder.finish()
7015 }
7016
7017 pub fn unpack(&self) -> EffectParticleElementInitColorT {
7018 let color_min_value = self.color_min_value();
7019 let color_max_value = self.color_max_value();
7020 EffectParticleElementInitColorT {
7021 color_min_value,
7022 color_max_value,
7023 }
7024 }
7025
7026 #[inline]
7027 pub fn color_min_value(&self) -> u32 {
7028 unsafe { self._tab.get::<u32>(EffectParticleElementInitColor::VT_COLOR_MIN_VALUE, Some(0)).unwrap()}
7032 }
7033 #[inline]
7034 pub fn color_max_value(&self) -> u32 {
7035 unsafe { self._tab.get::<u32>(EffectParticleElementInitColor::VT_COLOR_MAX_VALUE, Some(0)).unwrap()}
7039 }
7040}
7041
7042impl ::flatbuffers::Verifiable for EffectParticleElementInitColor<'_> {
7043 #[inline]
7044 fn run_verifier(
7045 v: &mut ::flatbuffers::Verifier, pos: usize
7046 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
7047 v.visit_table(pos)?
7048 .visit_field::<u32>("color_min_value", Self::VT_COLOR_MIN_VALUE, false)?
7049 .visit_field::<u32>("color_max_value", Self::VT_COLOR_MAX_VALUE, false)?
7050 .finish();
7051 Ok(())
7052 }
7053}
7054pub struct EffectParticleElementInitColorArgs {
7055 pub color_min_value: u32,
7056 pub color_max_value: u32,
7057}
7058impl<'a> Default for EffectParticleElementInitColorArgs {
7059 #[inline]
7060 fn default() -> Self {
7061 EffectParticleElementInitColorArgs {
7062 color_min_value: 0,
7063 color_max_value: 0,
7064 }
7065 }
7066}
7067
7068pub struct EffectParticleElementInitColorBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
7069 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
7070 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
7071}
7072impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EffectParticleElementInitColorBuilder<'a, 'b, A> {
7073 #[inline]
7074 pub fn add_color_min_value(&mut self, color_min_value: u32) {
7075 self.fbb_.push_slot::<u32>(EffectParticleElementInitColor::VT_COLOR_MIN_VALUE, color_min_value, 0);
7076 }
7077 #[inline]
7078 pub fn add_color_max_value(&mut self, color_max_value: u32) {
7079 self.fbb_.push_slot::<u32>(EffectParticleElementInitColor::VT_COLOR_MAX_VALUE, color_max_value, 0);
7080 }
7081 #[inline]
7082 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EffectParticleElementInitColorBuilder<'a, 'b, A> {
7083 let start = _fbb.start_table();
7084 EffectParticleElementInitColorBuilder {
7085 fbb_: _fbb,
7086 start_: start,
7087 }
7088 }
7089 #[inline]
7090 pub fn finish(self) -> ::flatbuffers::WIPOffset<EffectParticleElementInitColor<'a>> {
7091 let o = self.fbb_.end_table(self.start_);
7092 ::flatbuffers::WIPOffset::new(o.value())
7093 }
7094}
7095
7096impl ::core::fmt::Debug for EffectParticleElementInitColor<'_> {
7097 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7098 let mut ds = f.debug_struct("EffectParticleElementInitColor");
7099 ds.field("color_min_value", &self.color_min_value());
7100 ds.field("color_max_value", &self.color_max_value());
7101 ds.finish()
7102 }
7103}
7104#[non_exhaustive]
7105#[derive(Debug, Clone, PartialEq)]
7106pub struct EffectParticleElementInitColorT {
7107 pub color_min_value: u32,
7108 pub color_max_value: u32,
7109}
7110impl Default for EffectParticleElementInitColorT {
7111 fn default() -> Self {
7112 Self {
7113 color_min_value: 0,
7114 color_max_value: 0,
7115 }
7116 }
7117}
7118impl EffectParticleElementInitColorT {
7119 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
7120 &self,
7121 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
7122 ) -> ::flatbuffers::WIPOffset<EffectParticleElementInitColor<'b>> {
7123 let color_min_value = self.color_min_value;
7124 let color_max_value = self.color_max_value;
7125 EffectParticleElementInitColor::create(_fbb, &EffectParticleElementInitColorArgs{
7126 color_min_value,
7127 color_max_value,
7128 })
7129 }
7130}
7131pub enum EffectParticleElementRotationTransOffset {}
7132#[derive(Copy, Clone, PartialEq)]
7133
7134pub struct EffectParticleElementRotationTrans<'a> {
7135 pub _tab: ::flatbuffers::Table<'a>,
7136}
7137
7138impl<'a> ::flatbuffers::Follow<'a> for EffectParticleElementRotationTrans<'a> {
7139 type Inner = EffectParticleElementRotationTrans<'a>;
7140 #[inline]
7141 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7142 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
7143 }
7144}
7145
7146impl<'a> EffectParticleElementRotationTrans<'a> {
7147 pub const VT_ROTATION_FACTOR: ::flatbuffers::VOffsetT = 4;
7148 pub const VT_END_LIFE_TIME_PER: ::flatbuffers::VOffsetT = 6;
7149
7150 #[inline]
7151 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
7152 EffectParticleElementRotationTrans { _tab: table }
7153 }
7154 #[allow(unused_mut)]
7155 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
7156 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
7157 args: &'args EffectParticleElementRotationTransArgs
7158 ) -> ::flatbuffers::WIPOffset<EffectParticleElementRotationTrans<'bldr>> {
7159 let mut builder = EffectParticleElementRotationTransBuilder::new(_fbb);
7160 builder.add_end_life_time_per(args.end_life_time_per);
7161 builder.add_rotation_factor(args.rotation_factor);
7162 builder.finish()
7163 }
7164
7165 pub fn unpack(&self) -> EffectParticleElementRotationTransT {
7166 let rotation_factor = self.rotation_factor();
7167 let end_life_time_per = self.end_life_time_per();
7168 EffectParticleElementRotationTransT {
7169 rotation_factor,
7170 end_life_time_per,
7171 }
7172 }
7173
7174 #[inline]
7175 pub fn rotation_factor(&self) -> f32 {
7176 unsafe { self._tab.get::<f32>(EffectParticleElementRotationTrans::VT_ROTATION_FACTOR, Some(0.0)).unwrap()}
7180 }
7181 #[inline]
7182 pub fn end_life_time_per(&self) -> f32 {
7183 unsafe { self._tab.get::<f32>(EffectParticleElementRotationTrans::VT_END_LIFE_TIME_PER, Some(0.0)).unwrap()}
7187 }
7188}
7189
7190impl ::flatbuffers::Verifiable for EffectParticleElementRotationTrans<'_> {
7191 #[inline]
7192 fn run_verifier(
7193 v: &mut ::flatbuffers::Verifier, pos: usize
7194 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
7195 v.visit_table(pos)?
7196 .visit_field::<f32>("rotation_factor", Self::VT_ROTATION_FACTOR, false)?
7197 .visit_field::<f32>("end_life_time_per", Self::VT_END_LIFE_TIME_PER, false)?
7198 .finish();
7199 Ok(())
7200 }
7201}
7202pub struct EffectParticleElementRotationTransArgs {
7203 pub rotation_factor: f32,
7204 pub end_life_time_per: f32,
7205}
7206impl<'a> Default for EffectParticleElementRotationTransArgs {
7207 #[inline]
7208 fn default() -> Self {
7209 EffectParticleElementRotationTransArgs {
7210 rotation_factor: 0.0,
7211 end_life_time_per: 0.0,
7212 }
7213 }
7214}
7215
7216pub struct EffectParticleElementRotationTransBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
7217 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
7218 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
7219}
7220impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EffectParticleElementRotationTransBuilder<'a, 'b, A> {
7221 #[inline]
7222 pub fn add_rotation_factor(&mut self, rotation_factor: f32) {
7223 self.fbb_.push_slot::<f32>(EffectParticleElementRotationTrans::VT_ROTATION_FACTOR, rotation_factor, 0.0);
7224 }
7225 #[inline]
7226 pub fn add_end_life_time_per(&mut self, end_life_time_per: f32) {
7227 self.fbb_.push_slot::<f32>(EffectParticleElementRotationTrans::VT_END_LIFE_TIME_PER, end_life_time_per, 0.0);
7228 }
7229 #[inline]
7230 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EffectParticleElementRotationTransBuilder<'a, 'b, A> {
7231 let start = _fbb.start_table();
7232 EffectParticleElementRotationTransBuilder {
7233 fbb_: _fbb,
7234 start_: start,
7235 }
7236 }
7237 #[inline]
7238 pub fn finish(self) -> ::flatbuffers::WIPOffset<EffectParticleElementRotationTrans<'a>> {
7239 let o = self.fbb_.end_table(self.start_);
7240 ::flatbuffers::WIPOffset::new(o.value())
7241 }
7242}
7243
7244impl ::core::fmt::Debug for EffectParticleElementRotationTrans<'_> {
7245 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7246 let mut ds = f.debug_struct("EffectParticleElementRotationTrans");
7247 ds.field("rotation_factor", &self.rotation_factor());
7248 ds.field("end_life_time_per", &self.end_life_time_per());
7249 ds.finish()
7250 }
7251}
7252#[non_exhaustive]
7253#[derive(Debug, Clone, PartialEq)]
7254pub struct EffectParticleElementRotationTransT {
7255 pub rotation_factor: f32,
7256 pub end_life_time_per: f32,
7257}
7258impl Default for EffectParticleElementRotationTransT {
7259 fn default() -> Self {
7260 Self {
7261 rotation_factor: 0.0,
7262 end_life_time_per: 0.0,
7263 }
7264 }
7265}
7266impl EffectParticleElementRotationTransT {
7267 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
7268 &self,
7269 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
7270 ) -> ::flatbuffers::WIPOffset<EffectParticleElementRotationTrans<'b>> {
7271 let rotation_factor = self.rotation_factor;
7272 let end_life_time_per = self.end_life_time_per;
7273 EffectParticleElementRotationTrans::create(_fbb, &EffectParticleElementRotationTransArgs{
7274 rotation_factor,
7275 end_life_time_per,
7276 })
7277 }
7278}
7279pub enum EffectParticleElementRotationOffset {}
7280#[derive(Copy, Clone, PartialEq)]
7281
7282pub struct EffectParticleElementRotation<'a> {
7283 pub _tab: ::flatbuffers::Table<'a>,
7284}
7285
7286impl<'a> ::flatbuffers::Follow<'a> for EffectParticleElementRotation<'a> {
7287 type Inner = EffectParticleElementRotation<'a>;
7288 #[inline]
7289 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7290 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
7291 }
7292}
7293
7294impl<'a> EffectParticleElementRotation<'a> {
7295 pub const VT_ROTATION_VALUE: ::flatbuffers::VOffsetT = 4;
7296 pub const VT_ROTATION_ADD_VALUE: ::flatbuffers::VOffsetT = 6;
7297
7298 #[inline]
7299 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
7300 EffectParticleElementRotation { _tab: table }
7301 }
7302 #[allow(unused_mut)]
7303 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
7304 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
7305 args: &'args EffectParticleElementRotationArgs<'args>
7306 ) -> ::flatbuffers::WIPOffset<EffectParticleElementRotation<'bldr>> {
7307 let mut builder = EffectParticleElementRotationBuilder::new(_fbb);
7308 if let Some(x) = args.rotation_add_value { builder.add_rotation_add_value(x); }
7309 if let Some(x) = args.rotation_value { builder.add_rotation_value(x); }
7310 builder.finish()
7311 }
7312
7313 pub fn unpack(&self) -> EffectParticleElementRotationT {
7314 let rotation_value = {
7315 let x = self.rotation_value();
7316 alloc::boxed::Box::new(x.unpack())
7317 };
7318 let rotation_add_value = {
7319 let x = self.rotation_add_value();
7320 alloc::boxed::Box::new(x.unpack())
7321 };
7322 EffectParticleElementRotationT {
7323 rotation_value,
7324 rotation_add_value,
7325 }
7326 }
7327
7328 #[inline]
7329 pub fn rotation_value(&self) -> Vec2<'a> {
7330 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(EffectParticleElementRotation::VT_ROTATION_VALUE, None).unwrap()}
7334 }
7335 #[inline]
7336 pub fn rotation_add_value(&self) -> Vec2<'a> {
7337 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(EffectParticleElementRotation::VT_ROTATION_ADD_VALUE, None).unwrap()}
7341 }
7342}
7343
7344impl ::flatbuffers::Verifiable for EffectParticleElementRotation<'_> {
7345 #[inline]
7346 fn run_verifier(
7347 v: &mut ::flatbuffers::Verifier, pos: usize
7348 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
7349 v.visit_table(pos)?
7350 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("rotation_value", Self::VT_ROTATION_VALUE, true)?
7351 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("rotation_add_value", Self::VT_ROTATION_ADD_VALUE, true)?
7352 .finish();
7353 Ok(())
7354 }
7355}
7356pub struct EffectParticleElementRotationArgs<'a> {
7357 pub rotation_value: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
7358 pub rotation_add_value: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
7359}
7360impl<'a> Default for EffectParticleElementRotationArgs<'a> {
7361 #[inline]
7362 fn default() -> Self {
7363 EffectParticleElementRotationArgs {
7364 rotation_value: None, rotation_add_value: None, }
7367 }
7368}
7369
7370pub struct EffectParticleElementRotationBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
7371 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
7372 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
7373}
7374impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EffectParticleElementRotationBuilder<'a, 'b, A> {
7375 #[inline]
7376 pub fn add_rotation_value(&mut self, rotation_value: ::flatbuffers::WIPOffset<Vec2<'b >>) {
7377 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(EffectParticleElementRotation::VT_ROTATION_VALUE, rotation_value);
7378 }
7379 #[inline]
7380 pub fn add_rotation_add_value(&mut self, rotation_add_value: ::flatbuffers::WIPOffset<Vec2<'b >>) {
7381 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(EffectParticleElementRotation::VT_ROTATION_ADD_VALUE, rotation_add_value);
7382 }
7383 #[inline]
7384 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EffectParticleElementRotationBuilder<'a, 'b, A> {
7385 let start = _fbb.start_table();
7386 EffectParticleElementRotationBuilder {
7387 fbb_: _fbb,
7388 start_: start,
7389 }
7390 }
7391 #[inline]
7392 pub fn finish(self) -> ::flatbuffers::WIPOffset<EffectParticleElementRotation<'a>> {
7393 let o = self.fbb_.end_table(self.start_);
7394 self.fbb_.required(o, EffectParticleElementRotation::VT_ROTATION_VALUE,"rotation_value");
7395 self.fbb_.required(o, EffectParticleElementRotation::VT_ROTATION_ADD_VALUE,"rotation_add_value");
7396 ::flatbuffers::WIPOffset::new(o.value())
7397 }
7398}
7399
7400impl ::core::fmt::Debug for EffectParticleElementRotation<'_> {
7401 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7402 let mut ds = f.debug_struct("EffectParticleElementRotation");
7403 ds.field("rotation_value", &self.rotation_value());
7404 ds.field("rotation_add_value", &self.rotation_add_value());
7405 ds.finish()
7406 }
7407}
7408#[non_exhaustive]
7409#[derive(Debug, Clone, PartialEq)]
7410pub struct EffectParticleElementRotationT {
7411 pub rotation_value: alloc::boxed::Box<Vec2T>,
7412 pub rotation_add_value: alloc::boxed::Box<Vec2T>,
7413}
7414impl Default for EffectParticleElementRotationT {
7415 fn default() -> Self {
7416 Self {
7417 rotation_value: Default::default(),
7418 rotation_add_value: Default::default(),
7419 }
7420 }
7421}
7422impl EffectParticleElementRotationT {
7423 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
7424 &self,
7425 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
7426 ) -> ::flatbuffers::WIPOffset<EffectParticleElementRotation<'b>> {
7427 let rotation_value = Some({
7428 let x = &self.rotation_value;
7429 x.pack(_fbb)
7430 });
7431 let rotation_add_value = Some({
7432 let x = &self.rotation_add_value;
7433 x.pack(_fbb)
7434 });
7435 EffectParticleElementRotation::create(_fbb, &EffectParticleElementRotationArgs{
7436 rotation_value,
7437 rotation_add_value,
7438 })
7439 }
7440}
7441pub enum EffectParticleElementBasicOffset {}
7442#[derive(Copy, Clone, PartialEq)]
7443
7444pub struct EffectParticleElementBasic<'a> {
7445 pub _tab: ::flatbuffers::Table<'a>,
7446}
7447
7448impl<'a> ::flatbuffers::Follow<'a> for EffectParticleElementBasic<'a> {
7449 type Inner = EffectParticleElementBasic<'a>;
7450 #[inline]
7451 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7452 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
7453 }
7454}
7455
7456impl<'a> EffectParticleElementBasic<'a> {
7457 pub const VT_PRIORITY: ::flatbuffers::VOffsetT = 4;
7458 pub const VT_MAXIMUM_PARTICLE: ::flatbuffers::VOffsetT = 6;
7459 pub const VT_ATTIME_CREATE: ::flatbuffers::VOffsetT = 8;
7460 pub const VT_INTERVAL: ::flatbuffers::VOffsetT = 10;
7461 pub const VT_LIFETIME: ::flatbuffers::VOffsetT = 12;
7462 pub const VT_SPEED_MIN_VALUE: ::flatbuffers::VOffsetT = 14;
7463 pub const VT_SPEED_MAX_VALUE: ::flatbuffers::VOffsetT = 16;
7464 pub const VT_LIFESPAN_MIN_VALUE: ::flatbuffers::VOffsetT = 18;
7465 pub const VT_LIFESPAN_MAX_VALUE: ::flatbuffers::VOffsetT = 20;
7466 pub const VT_ANGLE: ::flatbuffers::VOffsetT = 22;
7467 pub const VT_ANGLE_VARIANCE: ::flatbuffers::VOffsetT = 24;
7468
7469 #[inline]
7470 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
7471 EffectParticleElementBasic { _tab: table }
7472 }
7473 #[allow(unused_mut)]
7474 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
7475 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
7476 args: &'args EffectParticleElementBasicArgs
7477 ) -> ::flatbuffers::WIPOffset<EffectParticleElementBasic<'bldr>> {
7478 let mut builder = EffectParticleElementBasicBuilder::new(_fbb);
7479 builder.add_angle_variance(args.angle_variance);
7480 builder.add_angle(args.angle);
7481 builder.add_lifespan_max_value(args.lifespan_max_value);
7482 builder.add_lifespan_min_value(args.lifespan_min_value);
7483 builder.add_speed_max_value(args.speed_max_value);
7484 builder.add_speed_min_value(args.speed_min_value);
7485 builder.add_lifetime(args.lifetime);
7486 builder.add_interval(args.interval);
7487 builder.add_attime_create(args.attime_create);
7488 builder.add_maximum_particle(args.maximum_particle);
7489 builder.add_priority(args.priority);
7490 builder.finish()
7491 }
7492
7493 pub fn unpack(&self) -> EffectParticleElementBasicT {
7494 let priority = self.priority();
7495 let maximum_particle = self.maximum_particle();
7496 let attime_create = self.attime_create();
7497 let interval = self.interval();
7498 let lifetime = self.lifetime();
7499 let speed_min_value = self.speed_min_value();
7500 let speed_max_value = self.speed_max_value();
7501 let lifespan_min_value = self.lifespan_min_value();
7502 let lifespan_max_value = self.lifespan_max_value();
7503 let angle = self.angle();
7504 let angle_variance = self.angle_variance();
7505 EffectParticleElementBasicT {
7506 priority,
7507 maximum_particle,
7508 attime_create,
7509 interval,
7510 lifetime,
7511 speed_min_value,
7512 speed_max_value,
7513 lifespan_min_value,
7514 lifespan_max_value,
7515 angle,
7516 angle_variance,
7517 }
7518 }
7519
7520 #[inline]
7521 pub fn priority(&self) -> i32 {
7522 unsafe { self._tab.get::<i32>(EffectParticleElementBasic::VT_PRIORITY, Some(0)).unwrap()}
7526 }
7527 #[inline]
7528 pub fn maximum_particle(&self) -> i32 {
7529 unsafe { self._tab.get::<i32>(EffectParticleElementBasic::VT_MAXIMUM_PARTICLE, Some(0)).unwrap()}
7533 }
7534 #[inline]
7535 pub fn attime_create(&self) -> i32 {
7536 unsafe { self._tab.get::<i32>(EffectParticleElementBasic::VT_ATTIME_CREATE, Some(0)).unwrap()}
7540 }
7541 #[inline]
7542 pub fn interval(&self) -> i32 {
7543 unsafe { self._tab.get::<i32>(EffectParticleElementBasic::VT_INTERVAL, Some(0)).unwrap()}
7547 }
7548 #[inline]
7549 pub fn lifetime(&self) -> i32 {
7550 unsafe { self._tab.get::<i32>(EffectParticleElementBasic::VT_LIFETIME, Some(0)).unwrap()}
7554 }
7555 #[inline]
7556 pub fn speed_min_value(&self) -> f32 {
7557 unsafe { self._tab.get::<f32>(EffectParticleElementBasic::VT_SPEED_MIN_VALUE, Some(0.0)).unwrap()}
7561 }
7562 #[inline]
7563 pub fn speed_max_value(&self) -> f32 {
7564 unsafe { self._tab.get::<f32>(EffectParticleElementBasic::VT_SPEED_MAX_VALUE, Some(0.0)).unwrap()}
7568 }
7569 #[inline]
7570 pub fn lifespan_min_value(&self) -> i32 {
7571 unsafe { self._tab.get::<i32>(EffectParticleElementBasic::VT_LIFESPAN_MIN_VALUE, Some(0)).unwrap()}
7575 }
7576 #[inline]
7577 pub fn lifespan_max_value(&self) -> i32 {
7578 unsafe { self._tab.get::<i32>(EffectParticleElementBasic::VT_LIFESPAN_MAX_VALUE, Some(0)).unwrap()}
7582 }
7583 #[inline]
7584 pub fn angle(&self) -> f32 {
7585 unsafe { self._tab.get::<f32>(EffectParticleElementBasic::VT_ANGLE, Some(0.0)).unwrap()}
7589 }
7590 #[inline]
7591 pub fn angle_variance(&self) -> f32 {
7592 unsafe { self._tab.get::<f32>(EffectParticleElementBasic::VT_ANGLE_VARIANCE, Some(0.0)).unwrap()}
7596 }
7597}
7598
7599impl ::flatbuffers::Verifiable for EffectParticleElementBasic<'_> {
7600 #[inline]
7601 fn run_verifier(
7602 v: &mut ::flatbuffers::Verifier, pos: usize
7603 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
7604 v.visit_table(pos)?
7605 .visit_field::<i32>("priority", Self::VT_PRIORITY, false)?
7606 .visit_field::<i32>("maximum_particle", Self::VT_MAXIMUM_PARTICLE, false)?
7607 .visit_field::<i32>("attime_create", Self::VT_ATTIME_CREATE, false)?
7608 .visit_field::<i32>("interval", Self::VT_INTERVAL, false)?
7609 .visit_field::<i32>("lifetime", Self::VT_LIFETIME, false)?
7610 .visit_field::<f32>("speed_min_value", Self::VT_SPEED_MIN_VALUE, false)?
7611 .visit_field::<f32>("speed_max_value", Self::VT_SPEED_MAX_VALUE, false)?
7612 .visit_field::<i32>("lifespan_min_value", Self::VT_LIFESPAN_MIN_VALUE, false)?
7613 .visit_field::<i32>("lifespan_max_value", Self::VT_LIFESPAN_MAX_VALUE, false)?
7614 .visit_field::<f32>("angle", Self::VT_ANGLE, false)?
7615 .visit_field::<f32>("angle_variance", Self::VT_ANGLE_VARIANCE, false)?
7616 .finish();
7617 Ok(())
7618 }
7619}
7620pub struct EffectParticleElementBasicArgs {
7621 pub priority: i32,
7622 pub maximum_particle: i32,
7623 pub attime_create: i32,
7624 pub interval: i32,
7625 pub lifetime: i32,
7626 pub speed_min_value: f32,
7627 pub speed_max_value: f32,
7628 pub lifespan_min_value: i32,
7629 pub lifespan_max_value: i32,
7630 pub angle: f32,
7631 pub angle_variance: f32,
7632}
7633impl<'a> Default for EffectParticleElementBasicArgs {
7634 #[inline]
7635 fn default() -> Self {
7636 EffectParticleElementBasicArgs {
7637 priority: 0,
7638 maximum_particle: 0,
7639 attime_create: 0,
7640 interval: 0,
7641 lifetime: 0,
7642 speed_min_value: 0.0,
7643 speed_max_value: 0.0,
7644 lifespan_min_value: 0,
7645 lifespan_max_value: 0,
7646 angle: 0.0,
7647 angle_variance: 0.0,
7648 }
7649 }
7650}
7651
7652pub struct EffectParticleElementBasicBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
7653 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
7654 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
7655}
7656impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EffectParticleElementBasicBuilder<'a, 'b, A> {
7657 #[inline]
7658 pub fn add_priority(&mut self, priority: i32) {
7659 self.fbb_.push_slot::<i32>(EffectParticleElementBasic::VT_PRIORITY, priority, 0);
7660 }
7661 #[inline]
7662 pub fn add_maximum_particle(&mut self, maximum_particle: i32) {
7663 self.fbb_.push_slot::<i32>(EffectParticleElementBasic::VT_MAXIMUM_PARTICLE, maximum_particle, 0);
7664 }
7665 #[inline]
7666 pub fn add_attime_create(&mut self, attime_create: i32) {
7667 self.fbb_.push_slot::<i32>(EffectParticleElementBasic::VT_ATTIME_CREATE, attime_create, 0);
7668 }
7669 #[inline]
7670 pub fn add_interval(&mut self, interval: i32) {
7671 self.fbb_.push_slot::<i32>(EffectParticleElementBasic::VT_INTERVAL, interval, 0);
7672 }
7673 #[inline]
7674 pub fn add_lifetime(&mut self, lifetime: i32) {
7675 self.fbb_.push_slot::<i32>(EffectParticleElementBasic::VT_LIFETIME, lifetime, 0);
7676 }
7677 #[inline]
7678 pub fn add_speed_min_value(&mut self, speed_min_value: f32) {
7679 self.fbb_.push_slot::<f32>(EffectParticleElementBasic::VT_SPEED_MIN_VALUE, speed_min_value, 0.0);
7680 }
7681 #[inline]
7682 pub fn add_speed_max_value(&mut self, speed_max_value: f32) {
7683 self.fbb_.push_slot::<f32>(EffectParticleElementBasic::VT_SPEED_MAX_VALUE, speed_max_value, 0.0);
7684 }
7685 #[inline]
7686 pub fn add_lifespan_min_value(&mut self, lifespan_min_value: i32) {
7687 self.fbb_.push_slot::<i32>(EffectParticleElementBasic::VT_LIFESPAN_MIN_VALUE, lifespan_min_value, 0);
7688 }
7689 #[inline]
7690 pub fn add_lifespan_max_value(&mut self, lifespan_max_value: i32) {
7691 self.fbb_.push_slot::<i32>(EffectParticleElementBasic::VT_LIFESPAN_MAX_VALUE, lifespan_max_value, 0);
7692 }
7693 #[inline]
7694 pub fn add_angle(&mut self, angle: f32) {
7695 self.fbb_.push_slot::<f32>(EffectParticleElementBasic::VT_ANGLE, angle, 0.0);
7696 }
7697 #[inline]
7698 pub fn add_angle_variance(&mut self, angle_variance: f32) {
7699 self.fbb_.push_slot::<f32>(EffectParticleElementBasic::VT_ANGLE_VARIANCE, angle_variance, 0.0);
7700 }
7701 #[inline]
7702 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EffectParticleElementBasicBuilder<'a, 'b, A> {
7703 let start = _fbb.start_table();
7704 EffectParticleElementBasicBuilder {
7705 fbb_: _fbb,
7706 start_: start,
7707 }
7708 }
7709 #[inline]
7710 pub fn finish(self) -> ::flatbuffers::WIPOffset<EffectParticleElementBasic<'a>> {
7711 let o = self.fbb_.end_table(self.start_);
7712 ::flatbuffers::WIPOffset::new(o.value())
7713 }
7714}
7715
7716impl ::core::fmt::Debug for EffectParticleElementBasic<'_> {
7717 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7718 let mut ds = f.debug_struct("EffectParticleElementBasic");
7719 ds.field("priority", &self.priority());
7720 ds.field("maximum_particle", &self.maximum_particle());
7721 ds.field("attime_create", &self.attime_create());
7722 ds.field("interval", &self.interval());
7723 ds.field("lifetime", &self.lifetime());
7724 ds.field("speed_min_value", &self.speed_min_value());
7725 ds.field("speed_max_value", &self.speed_max_value());
7726 ds.field("lifespan_min_value", &self.lifespan_min_value());
7727 ds.field("lifespan_max_value", &self.lifespan_max_value());
7728 ds.field("angle", &self.angle());
7729 ds.field("angle_variance", &self.angle_variance());
7730 ds.finish()
7731 }
7732}
7733#[non_exhaustive]
7734#[derive(Debug, Clone, PartialEq)]
7735pub struct EffectParticleElementBasicT {
7736 pub priority: i32,
7737 pub maximum_particle: i32,
7738 pub attime_create: i32,
7739 pub interval: i32,
7740 pub lifetime: i32,
7741 pub speed_min_value: f32,
7742 pub speed_max_value: f32,
7743 pub lifespan_min_value: i32,
7744 pub lifespan_max_value: i32,
7745 pub angle: f32,
7746 pub angle_variance: f32,
7747}
7748impl Default for EffectParticleElementBasicT {
7749 fn default() -> Self {
7750 Self {
7751 priority: 0,
7752 maximum_particle: 0,
7753 attime_create: 0,
7754 interval: 0,
7755 lifetime: 0,
7756 speed_min_value: 0.0,
7757 speed_max_value: 0.0,
7758 lifespan_min_value: 0,
7759 lifespan_max_value: 0,
7760 angle: 0.0,
7761 angle_variance: 0.0,
7762 }
7763 }
7764}
7765impl EffectParticleElementBasicT {
7766 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
7767 &self,
7768 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
7769 ) -> ::flatbuffers::WIPOffset<EffectParticleElementBasic<'b>> {
7770 let priority = self.priority;
7771 let maximum_particle = self.maximum_particle;
7772 let attime_create = self.attime_create;
7773 let interval = self.interval;
7774 let lifetime = self.lifetime;
7775 let speed_min_value = self.speed_min_value;
7776 let speed_max_value = self.speed_max_value;
7777 let lifespan_min_value = self.lifespan_min_value;
7778 let lifespan_max_value = self.lifespan_max_value;
7779 let angle = self.angle;
7780 let angle_variance = self.angle_variance;
7781 EffectParticleElementBasic::create(_fbb, &EffectParticleElementBasicArgs{
7782 priority,
7783 maximum_particle,
7784 attime_create,
7785 interval,
7786 lifetime,
7787 speed_min_value,
7788 speed_max_value,
7789 lifespan_min_value,
7790 lifespan_max_value,
7791 angle,
7792 angle_variance,
7793 })
7794 }
7795}
7796pub enum EffectNodeBehaviorWrapperOffset {}
7797#[derive(Copy, Clone, PartialEq)]
7798
7799pub struct EffectNodeBehaviorWrapper<'a> {
7800 pub _tab: ::flatbuffers::Table<'a>,
7801}
7802
7803impl<'a> ::flatbuffers::Follow<'a> for EffectNodeBehaviorWrapper<'a> {
7804 type Inner = EffectNodeBehaviorWrapper<'a>;
7805 #[inline]
7806 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7807 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
7808 }
7809}
7810
7811impl<'a> EffectNodeBehaviorWrapper<'a> {
7812 pub const VT_VALUE_TYPE: ::flatbuffers::VOffsetT = 4;
7813 pub const VT_VALUE: ::flatbuffers::VOffsetT = 6;
7814
7815 #[inline]
7816 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
7817 EffectNodeBehaviorWrapper { _tab: table }
7818 }
7819 #[allow(unused_mut)]
7820 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
7821 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
7822 args: &'args EffectNodeBehaviorWrapperArgs
7823 ) -> ::flatbuffers::WIPOffset<EffectNodeBehaviorWrapper<'bldr>> {
7824 let mut builder = EffectNodeBehaviorWrapperBuilder::new(_fbb);
7825 if let Some(x) = args.value { builder.add_value(x); }
7826 builder.add_value_type(args.value_type);
7827 builder.finish()
7828 }
7829
7830 pub fn unpack(&self) -> EffectNodeBehaviorWrapperT {
7831 let value = match self.value_type() {
7832 EffectNodeBehavior::NONE => EffectNodeBehaviorT::NONE,
7833 EffectNodeBehavior::EffectParticleElementBasic => EffectNodeBehaviorT::EffectParticleElementBasic(alloc::boxed::Box::new(
7834 self.value_as_effect_particle_element_basic()
7835 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleElementBasic`.")
7836 .unpack()
7837 )),
7838 EffectNodeBehavior::EffectParticleElementRndSeedChange => EffectNodeBehaviorT::EffectParticleElementRndSeedChange(alloc::boxed::Box::new(
7839 self.value_as_effect_particle_element_rnd_seed_change()
7840 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleElementRndSeedChange`.")
7841 .unpack()
7842 )),
7843 EffectNodeBehavior::EffectParticleElementDelay => EffectNodeBehaviorT::EffectParticleElementDelay(alloc::boxed::Box::new(
7844 self.value_as_effect_particle_element_delay()
7845 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleElementDelay`.")
7846 .unpack()
7847 )),
7848 EffectNodeBehavior::EffectParticleElementGravity => EffectNodeBehaviorT::EffectParticleElementGravity(alloc::boxed::Box::new(
7849 self.value_as_effect_particle_element_gravity()
7850 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleElementGravity`.")
7851 .unpack()
7852 )),
7853 EffectNodeBehavior::EffectParticleElementPosition => EffectNodeBehaviorT::EffectParticleElementPosition(alloc::boxed::Box::new(
7854 self.value_as_effect_particle_element_position()
7855 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleElementPosition`.")
7856 .unpack()
7857 )),
7858 EffectNodeBehavior::EffectParticleElementRotation => EffectNodeBehaviorT::EffectParticleElementRotation(alloc::boxed::Box::new(
7859 self.value_as_effect_particle_element_rotation()
7860 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleElementRotation`.")
7861 .unpack()
7862 )),
7863 EffectNodeBehavior::EffectParticleElementRotationTrans => EffectNodeBehaviorT::EffectParticleElementRotationTrans(alloc::boxed::Box::new(
7864 self.value_as_effect_particle_element_rotation_trans()
7865 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleElementRotationTrans`.")
7866 .unpack()
7867 )),
7868 EffectNodeBehavior::EffectParticleElementTransSpeed => EffectNodeBehaviorT::EffectParticleElementTransSpeed(alloc::boxed::Box::new(
7869 self.value_as_effect_particle_element_trans_speed()
7870 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleElementTransSpeed`.")
7871 .unpack()
7872 )),
7873 EffectNodeBehavior::EffectParticleElementTangentialAcceleration => EffectNodeBehaviorT::EffectParticleElementTangentialAcceleration(alloc::boxed::Box::new(
7874 self.value_as_effect_particle_element_tangential_acceleration()
7875 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleElementTangentialAcceleration`.")
7876 .unpack()
7877 )),
7878 EffectNodeBehavior::EffectParticleElementInitColor => EffectNodeBehaviorT::EffectParticleElementInitColor(alloc::boxed::Box::new(
7879 self.value_as_effect_particle_element_init_color()
7880 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleElementInitColor`.")
7881 .unpack()
7882 )),
7883 EffectNodeBehavior::EffectParticleElementTransColor => EffectNodeBehaviorT::EffectParticleElementTransColor(alloc::boxed::Box::new(
7884 self.value_as_effect_particle_element_trans_color()
7885 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleElementTransColor`.")
7886 .unpack()
7887 )),
7888 EffectNodeBehavior::EffectParticleElementAlphaFade => EffectNodeBehaviorT::EffectParticleElementAlphaFade(alloc::boxed::Box::new(
7889 self.value_as_effect_particle_element_alpha_fade()
7890 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleElementAlphaFade`.")
7891 .unpack()
7892 )),
7893 EffectNodeBehavior::EffectParticleElementSize => EffectNodeBehaviorT::EffectParticleElementSize(alloc::boxed::Box::new(
7894 self.value_as_effect_particle_element_size()
7895 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleElementSize`.")
7896 .unpack()
7897 )),
7898 EffectNodeBehavior::EffectParticleElementTransSize => EffectNodeBehaviorT::EffectParticleElementTransSize(alloc::boxed::Box::new(
7899 self.value_as_effect_particle_element_trans_size()
7900 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleElementTransSize`.")
7901 .unpack()
7902 )),
7903 EffectNodeBehavior::EffectParticlePointGravity => EffectNodeBehaviorT::EffectParticlePointGravity(alloc::boxed::Box::new(
7904 self.value_as_effect_particle_point_gravity()
7905 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticlePointGravity`.")
7906 .unpack()
7907 )),
7908 EffectNodeBehavior::EffectParticleTurnToDirectionEnabled => EffectNodeBehaviorT::EffectParticleTurnToDirectionEnabled(alloc::boxed::Box::new(
7909 self.value_as_effect_particle_turn_to_direction_enabled()
7910 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleTurnToDirectionEnabled`.")
7911 .unpack()
7912 )),
7913 EffectNodeBehavior::EffectParticleInfiniteEmitEnabled => EffectNodeBehaviorT::EffectParticleInfiniteEmitEnabled(alloc::boxed::Box::new(
7914 self.value_as_effect_particle_infinite_emit_enabled()
7915 .expect("Invalid union table, expected `EffectNodeBehavior::EffectParticleInfiniteEmitEnabled`.")
7916 .unpack()
7917 )),
7918 _ => EffectNodeBehaviorT::NONE,
7919 };
7920 EffectNodeBehaviorWrapperT {
7921 value,
7922 }
7923 }
7924
7925 #[inline]
7926 pub fn value_type(&self) -> EffectNodeBehavior {
7927 unsafe { self._tab.get::<EffectNodeBehavior>(EffectNodeBehaviorWrapper::VT_VALUE_TYPE, Some(EffectNodeBehavior::NONE)).unwrap()}
7931 }
7932 #[inline]
7933 pub fn value(&self) -> Option<::flatbuffers::Table<'a>> {
7934 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>(EffectNodeBehaviorWrapper::VT_VALUE, None)}
7938 }
7939 #[inline]
7940 #[allow(non_snake_case)]
7941 pub fn value_as_effect_particle_element_basic(&self) -> Option<EffectParticleElementBasic<'a>> {
7942 if self.value_type() == EffectNodeBehavior::EffectParticleElementBasic {
7943 self.value().map(|t| {
7944 unsafe { EffectParticleElementBasic::init_from_table(t) }
7948 })
7949 } else {
7950 None
7951 }
7952 }
7953
7954 #[inline]
7955 #[allow(non_snake_case)]
7956 pub fn value_as_effect_particle_element_rnd_seed_change(&self) -> Option<IntValueEntry<'a>> {
7957 if self.value_type() == EffectNodeBehavior::EffectParticleElementRndSeedChange {
7958 self.value().map(|t| {
7959 unsafe { IntValueEntry::init_from_table(t) }
7963 })
7964 } else {
7965 None
7966 }
7967 }
7968
7969 #[inline]
7970 #[allow(non_snake_case)]
7971 pub fn value_as_effect_particle_element_delay(&self) -> Option<IntValueEntry<'a>> {
7972 if self.value_type() == EffectNodeBehavior::EffectParticleElementDelay {
7973 self.value().map(|t| {
7974 unsafe { IntValueEntry::init_from_table(t) }
7978 })
7979 } else {
7980 None
7981 }
7982 }
7983
7984 #[inline]
7985 #[allow(non_snake_case)]
7986 pub fn value_as_effect_particle_element_gravity(&self) -> Option<Vec2ValueEntry<'a>> {
7987 if self.value_type() == EffectNodeBehavior::EffectParticleElementGravity {
7988 self.value().map(|t| {
7989 unsafe { Vec2ValueEntry::init_from_table(t) }
7993 })
7994 } else {
7995 None
7996 }
7997 }
7998
7999 #[inline]
8000 #[allow(non_snake_case)]
8001 pub fn value_as_effect_particle_element_position(&self) -> Option<MinMax2ValueEntry<'a>> {
8002 if self.value_type() == EffectNodeBehavior::EffectParticleElementPosition {
8003 self.value().map(|t| {
8004 unsafe { MinMax2ValueEntry::init_from_table(t) }
8008 })
8009 } else {
8010 None
8011 }
8012 }
8013
8014 #[inline]
8015 #[allow(non_snake_case)]
8016 pub fn value_as_effect_particle_element_rotation(&self) -> Option<EffectParticleElementRotation<'a>> {
8017 if self.value_type() == EffectNodeBehavior::EffectParticleElementRotation {
8018 self.value().map(|t| {
8019 unsafe { EffectParticleElementRotation::init_from_table(t) }
8023 })
8024 } else {
8025 None
8026 }
8027 }
8028
8029 #[inline]
8030 #[allow(non_snake_case)]
8031 pub fn value_as_effect_particle_element_rotation_trans(&self) -> Option<EffectParticleElementRotationTrans<'a>> {
8032 if self.value_type() == EffectNodeBehavior::EffectParticleElementRotationTrans {
8033 self.value().map(|t| {
8034 unsafe { EffectParticleElementRotationTrans::init_from_table(t) }
8038 })
8039 } else {
8040 None
8041 }
8042 }
8043
8044 #[inline]
8045 #[allow(non_snake_case)]
8046 pub fn value_as_effect_particle_element_trans_speed(&self) -> Option<Vec2ValueEntry<'a>> {
8047 if self.value_type() == EffectNodeBehavior::EffectParticleElementTransSpeed {
8048 self.value().map(|t| {
8049 unsafe { Vec2ValueEntry::init_from_table(t) }
8053 })
8054 } else {
8055 None
8056 }
8057 }
8058
8059 #[inline]
8060 #[allow(non_snake_case)]
8061 pub fn value_as_effect_particle_element_tangential_acceleration(&self) -> Option<Vec2ValueEntry<'a>> {
8062 if self.value_type() == EffectNodeBehavior::EffectParticleElementTangentialAcceleration {
8063 self.value().map(|t| {
8064 unsafe { Vec2ValueEntry::init_from_table(t) }
8068 })
8069 } else {
8070 None
8071 }
8072 }
8073
8074 #[inline]
8075 #[allow(non_snake_case)]
8076 pub fn value_as_effect_particle_element_init_color(&self) -> Option<EffectParticleElementInitColor<'a>> {
8077 if self.value_type() == EffectNodeBehavior::EffectParticleElementInitColor {
8078 self.value().map(|t| {
8079 unsafe { EffectParticleElementInitColor::init_from_table(t) }
8083 })
8084 } else {
8085 None
8086 }
8087 }
8088
8089 #[inline]
8090 #[allow(non_snake_case)]
8091 pub fn value_as_effect_particle_element_trans_color(&self) -> Option<EffectParticleElementTransColor<'a>> {
8092 if self.value_type() == EffectNodeBehavior::EffectParticleElementTransColor {
8093 self.value().map(|t| {
8094 unsafe { EffectParticleElementTransColor::init_from_table(t) }
8098 })
8099 } else {
8100 None
8101 }
8102 }
8103
8104 #[inline]
8105 #[allow(non_snake_case)]
8106 pub fn value_as_effect_particle_element_alpha_fade(&self) -> Option<Vec2ValueEntry<'a>> {
8107 if self.value_type() == EffectNodeBehavior::EffectParticleElementAlphaFade {
8108 self.value().map(|t| {
8109 unsafe { Vec2ValueEntry::init_from_table(t) }
8113 })
8114 } else {
8115 None
8116 }
8117 }
8118
8119 #[inline]
8120 #[allow(non_snake_case)]
8121 pub fn value_as_effect_particle_element_size(&self) -> Option<MinMax2AndVec2ValueTable<'a>> {
8122 if self.value_type() == EffectNodeBehavior::EffectParticleElementSize {
8123 self.value().map(|t| {
8124 unsafe { MinMax2AndVec2ValueTable::init_from_table(t) }
8128 })
8129 } else {
8130 None
8131 }
8132 }
8133
8134 #[inline]
8135 #[allow(non_snake_case)]
8136 pub fn value_as_effect_particle_element_trans_size(&self) -> Option<MinMax2AndVec2ValueTable<'a>> {
8137 if self.value_type() == EffectNodeBehavior::EffectParticleElementTransSize {
8138 self.value().map(|t| {
8139 unsafe { MinMax2AndVec2ValueTable::init_from_table(t) }
8143 })
8144 } else {
8145 None
8146 }
8147 }
8148
8149 #[inline]
8150 #[allow(non_snake_case)]
8151 pub fn value_as_effect_particle_point_gravity(&self) -> Option<EffectParticlePointGravity<'a>> {
8152 if self.value_type() == EffectNodeBehavior::EffectParticlePointGravity {
8153 self.value().map(|t| {
8154 unsafe { EffectParticlePointGravity::init_from_table(t) }
8158 })
8159 } else {
8160 None
8161 }
8162 }
8163
8164 #[inline]
8165 #[allow(non_snake_case)]
8166 pub fn value_as_effect_particle_turn_to_direction_enabled(&self) -> Option<FloatValueEntry<'a>> {
8167 if self.value_type() == EffectNodeBehavior::EffectParticleTurnToDirectionEnabled {
8168 self.value().map(|t| {
8169 unsafe { FloatValueEntry::init_from_table(t) }
8173 })
8174 } else {
8175 None
8176 }
8177 }
8178
8179 #[inline]
8180 #[allow(non_snake_case)]
8181 pub fn value_as_effect_particle_infinite_emit_enabled(&self) -> Option<IntValueEntry<'a>> {
8182 if self.value_type() == EffectNodeBehavior::EffectParticleInfiniteEmitEnabled {
8183 self.value().map(|t| {
8184 unsafe { IntValueEntry::init_from_table(t) }
8188 })
8189 } else {
8190 None
8191 }
8192 }
8193
8194}
8195
8196impl ::flatbuffers::Verifiable for EffectNodeBehaviorWrapper<'_> {
8197 #[inline]
8198 fn run_verifier(
8199 v: &mut ::flatbuffers::Verifier, pos: usize
8200 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
8201 v.visit_table(pos)?
8202 .visit_union::<EffectNodeBehavior, _>("value_type", Self::VT_VALUE_TYPE, "value", Self::VT_VALUE, false, |key, v, pos| {
8203 match key {
8204 EffectNodeBehavior::EffectParticleElementBasic => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<EffectParticleElementBasic>>("EffectNodeBehavior::EffectParticleElementBasic", pos),
8205 EffectNodeBehavior::EffectParticleElementRndSeedChange => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<IntValueEntry>>("EffectNodeBehavior::EffectParticleElementRndSeedChange", pos),
8206 EffectNodeBehavior::EffectParticleElementDelay => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<IntValueEntry>>("EffectNodeBehavior::EffectParticleElementDelay", pos),
8207 EffectNodeBehavior::EffectParticleElementGravity => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<Vec2ValueEntry>>("EffectNodeBehavior::EffectParticleElementGravity", pos),
8208 EffectNodeBehavior::EffectParticleElementPosition => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<MinMax2ValueEntry>>("EffectNodeBehavior::EffectParticleElementPosition", pos),
8209 EffectNodeBehavior::EffectParticleElementRotation => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<EffectParticleElementRotation>>("EffectNodeBehavior::EffectParticleElementRotation", pos),
8210 EffectNodeBehavior::EffectParticleElementRotationTrans => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<EffectParticleElementRotationTrans>>("EffectNodeBehavior::EffectParticleElementRotationTrans", pos),
8211 EffectNodeBehavior::EffectParticleElementTransSpeed => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<Vec2ValueEntry>>("EffectNodeBehavior::EffectParticleElementTransSpeed", pos),
8212 EffectNodeBehavior::EffectParticleElementTangentialAcceleration => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<Vec2ValueEntry>>("EffectNodeBehavior::EffectParticleElementTangentialAcceleration", pos),
8213 EffectNodeBehavior::EffectParticleElementInitColor => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<EffectParticleElementInitColor>>("EffectNodeBehavior::EffectParticleElementInitColor", pos),
8214 EffectNodeBehavior::EffectParticleElementTransColor => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<EffectParticleElementTransColor>>("EffectNodeBehavior::EffectParticleElementTransColor", pos),
8215 EffectNodeBehavior::EffectParticleElementAlphaFade => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<Vec2ValueEntry>>("EffectNodeBehavior::EffectParticleElementAlphaFade", pos),
8216 EffectNodeBehavior::EffectParticleElementSize => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<MinMax2AndVec2ValueTable>>("EffectNodeBehavior::EffectParticleElementSize", pos),
8217 EffectNodeBehavior::EffectParticleElementTransSize => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<MinMax2AndVec2ValueTable>>("EffectNodeBehavior::EffectParticleElementTransSize", pos),
8218 EffectNodeBehavior::EffectParticlePointGravity => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<EffectParticlePointGravity>>("EffectNodeBehavior::EffectParticlePointGravity", pos),
8219 EffectNodeBehavior::EffectParticleTurnToDirectionEnabled => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<FloatValueEntry>>("EffectNodeBehavior::EffectParticleTurnToDirectionEnabled", pos),
8220 EffectNodeBehavior::EffectParticleInfiniteEmitEnabled => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<IntValueEntry>>("EffectNodeBehavior::EffectParticleInfiniteEmitEnabled", pos),
8221 _ => Ok(()),
8222 }
8223 })?
8224 .finish();
8225 Ok(())
8226 }
8227}
8228pub struct EffectNodeBehaviorWrapperArgs {
8229 pub value_type: EffectNodeBehavior,
8230 pub value: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>,
8231}
8232impl<'a> Default for EffectNodeBehaviorWrapperArgs {
8233 #[inline]
8234 fn default() -> Self {
8235 EffectNodeBehaviorWrapperArgs {
8236 value_type: EffectNodeBehavior::NONE,
8237 value: None,
8238 }
8239 }
8240}
8241
8242pub struct EffectNodeBehaviorWrapperBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
8243 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
8244 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
8245}
8246impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EffectNodeBehaviorWrapperBuilder<'a, 'b, A> {
8247 #[inline]
8248 pub fn add_value_type(&mut self, value_type: EffectNodeBehavior) {
8249 self.fbb_.push_slot::<EffectNodeBehavior>(EffectNodeBehaviorWrapper::VT_VALUE_TYPE, value_type, EffectNodeBehavior::NONE);
8250 }
8251 #[inline]
8252 pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>) {
8253 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(EffectNodeBehaviorWrapper::VT_VALUE, value);
8254 }
8255 #[inline]
8256 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EffectNodeBehaviorWrapperBuilder<'a, 'b, A> {
8257 let start = _fbb.start_table();
8258 EffectNodeBehaviorWrapperBuilder {
8259 fbb_: _fbb,
8260 start_: start,
8261 }
8262 }
8263 #[inline]
8264 pub fn finish(self) -> ::flatbuffers::WIPOffset<EffectNodeBehaviorWrapper<'a>> {
8265 let o = self.fbb_.end_table(self.start_);
8266 ::flatbuffers::WIPOffset::new(o.value())
8267 }
8268}
8269
8270impl ::core::fmt::Debug for EffectNodeBehaviorWrapper<'_> {
8271 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8272 let mut ds = f.debug_struct("EffectNodeBehaviorWrapper");
8273 ds.field("value_type", &self.value_type());
8274 match self.value_type() {
8275 EffectNodeBehavior::EffectParticleElementBasic => {
8276 if let Some(x) = self.value_as_effect_particle_element_basic() {
8277 ds.field("value", &x)
8278 } else {
8279 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8280 }
8281 },
8282 EffectNodeBehavior::EffectParticleElementRndSeedChange => {
8283 if let Some(x) = self.value_as_effect_particle_element_rnd_seed_change() {
8284 ds.field("value", &x)
8285 } else {
8286 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8287 }
8288 },
8289 EffectNodeBehavior::EffectParticleElementDelay => {
8290 if let Some(x) = self.value_as_effect_particle_element_delay() {
8291 ds.field("value", &x)
8292 } else {
8293 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8294 }
8295 },
8296 EffectNodeBehavior::EffectParticleElementGravity => {
8297 if let Some(x) = self.value_as_effect_particle_element_gravity() {
8298 ds.field("value", &x)
8299 } else {
8300 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8301 }
8302 },
8303 EffectNodeBehavior::EffectParticleElementPosition => {
8304 if let Some(x) = self.value_as_effect_particle_element_position() {
8305 ds.field("value", &x)
8306 } else {
8307 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8308 }
8309 },
8310 EffectNodeBehavior::EffectParticleElementRotation => {
8311 if let Some(x) = self.value_as_effect_particle_element_rotation() {
8312 ds.field("value", &x)
8313 } else {
8314 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8315 }
8316 },
8317 EffectNodeBehavior::EffectParticleElementRotationTrans => {
8318 if let Some(x) = self.value_as_effect_particle_element_rotation_trans() {
8319 ds.field("value", &x)
8320 } else {
8321 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8322 }
8323 },
8324 EffectNodeBehavior::EffectParticleElementTransSpeed => {
8325 if let Some(x) = self.value_as_effect_particle_element_trans_speed() {
8326 ds.field("value", &x)
8327 } else {
8328 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8329 }
8330 },
8331 EffectNodeBehavior::EffectParticleElementTangentialAcceleration => {
8332 if let Some(x) = self.value_as_effect_particle_element_tangential_acceleration() {
8333 ds.field("value", &x)
8334 } else {
8335 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8336 }
8337 },
8338 EffectNodeBehavior::EffectParticleElementInitColor => {
8339 if let Some(x) = self.value_as_effect_particle_element_init_color() {
8340 ds.field("value", &x)
8341 } else {
8342 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8343 }
8344 },
8345 EffectNodeBehavior::EffectParticleElementTransColor => {
8346 if let Some(x) = self.value_as_effect_particle_element_trans_color() {
8347 ds.field("value", &x)
8348 } else {
8349 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8350 }
8351 },
8352 EffectNodeBehavior::EffectParticleElementAlphaFade => {
8353 if let Some(x) = self.value_as_effect_particle_element_alpha_fade() {
8354 ds.field("value", &x)
8355 } else {
8356 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8357 }
8358 },
8359 EffectNodeBehavior::EffectParticleElementSize => {
8360 if let Some(x) = self.value_as_effect_particle_element_size() {
8361 ds.field("value", &x)
8362 } else {
8363 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8364 }
8365 },
8366 EffectNodeBehavior::EffectParticleElementTransSize => {
8367 if let Some(x) = self.value_as_effect_particle_element_trans_size() {
8368 ds.field("value", &x)
8369 } else {
8370 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8371 }
8372 },
8373 EffectNodeBehavior::EffectParticlePointGravity => {
8374 if let Some(x) = self.value_as_effect_particle_point_gravity() {
8375 ds.field("value", &x)
8376 } else {
8377 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8378 }
8379 },
8380 EffectNodeBehavior::EffectParticleTurnToDirectionEnabled => {
8381 if let Some(x) = self.value_as_effect_particle_turn_to_direction_enabled() {
8382 ds.field("value", &x)
8383 } else {
8384 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8385 }
8386 },
8387 EffectNodeBehavior::EffectParticleInfiniteEmitEnabled => {
8388 if let Some(x) = self.value_as_effect_particle_infinite_emit_enabled() {
8389 ds.field("value", &x)
8390 } else {
8391 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
8392 }
8393 },
8394 _ => {
8395 let x: Option<()> = None;
8396 ds.field("value", &x)
8397 },
8398 };
8399 ds.finish()
8400 }
8401}
8402#[non_exhaustive]
8403#[derive(Debug, Clone, PartialEq)]
8404pub struct EffectNodeBehaviorWrapperT {
8405 pub value: EffectNodeBehaviorT,
8406}
8407impl Default for EffectNodeBehaviorWrapperT {
8408 fn default() -> Self {
8409 Self {
8410 value: EffectNodeBehaviorT::NONE,
8411 }
8412 }
8413}
8414impl EffectNodeBehaviorWrapperT {
8415 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
8416 &self,
8417 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
8418 ) -> ::flatbuffers::WIPOffset<EffectNodeBehaviorWrapper<'b>> {
8419 let value_type = self.value.effect_node_behavior_type();
8420 let value = self.value.pack(_fbb);
8421 EffectNodeBehaviorWrapper::create(_fbb, &EffectNodeBehaviorWrapperArgs{
8422 value_type,
8423 value,
8424 })
8425 }
8426}
8427pub enum EffectNodeOffset {}
8428#[derive(Copy, Clone, PartialEq)]
8429
8430pub struct EffectNode<'a> {
8431 pub _tab: ::flatbuffers::Table<'a>,
8432}
8433
8434impl<'a> ::flatbuffers::Follow<'a> for EffectNode<'a> {
8435 type Inner = EffectNode<'a>;
8436 #[inline]
8437 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
8438 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
8439 }
8440}
8441
8442impl<'a> EffectNode<'a> {
8443 pub const VT_INDEX: ::flatbuffers::VOffsetT = 4;
8444 pub const VT_PARENT_INDEX: ::flatbuffers::VOffsetT = 6;
8445 pub const VT_EFFECT_NODE_TYPE: ::flatbuffers::VOffsetT = 8;
8446 pub const VT_CELL_NAME_HASH: ::flatbuffers::VOffsetT = 10;
8447 pub const VT_CELL_MAP_NAME_HASH: ::flatbuffers::VOffsetT = 12;
8448 pub const VT_BLEND_TYPE: ::flatbuffers::VOffsetT = 14;
8449 pub const VT_BEHAVIOR: ::flatbuffers::VOffsetT = 16;
8450
8451 #[inline]
8452 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
8453 EffectNode { _tab: table }
8454 }
8455 #[allow(unused_mut)]
8456 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
8457 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
8458 args: &'args EffectNodeArgs<'args>
8459 ) -> ::flatbuffers::WIPOffset<EffectNode<'bldr>> {
8460 let mut builder = EffectNodeBuilder::new(_fbb);
8461 if let Some(x) = args.behavior { builder.add_behavior(x); }
8462 builder.add_cell_map_name_hash(args.cell_map_name_hash);
8463 builder.add_cell_name_hash(args.cell_name_hash);
8464 builder.add_parent_index(args.parent_index);
8465 builder.add_index(args.index);
8466 builder.add_blend_type(args.blend_type);
8467 builder.add_effect_node_type(args.effect_node_type);
8468 builder.finish()
8469 }
8470
8471 pub fn unpack(&self) -> EffectNodeT {
8472 let index = self.index();
8473 let parent_index = self.parent_index();
8474 let effect_node_type = self.effect_node_type();
8475 let cell_name_hash = self.cell_name_hash();
8476 let cell_map_name_hash = self.cell_map_name_hash();
8477 let blend_type = self.blend_type();
8478 let behavior = self.behavior().map(|x| {
8479 x.iter().map(|t| t.unpack()).collect()
8480 });
8481 EffectNodeT {
8482 index,
8483 parent_index,
8484 effect_node_type,
8485 cell_name_hash,
8486 cell_map_name_hash,
8487 blend_type,
8488 behavior,
8489 }
8490 }
8491
8492 #[inline]
8493 pub fn index(&self) -> i16 {
8494 unsafe { self._tab.get::<i16>(EffectNode::VT_INDEX, Some(0)).unwrap()}
8498 }
8499 #[inline]
8500 pub fn parent_index(&self) -> i16 {
8501 unsafe { self._tab.get::<i16>(EffectNode::VT_PARENT_INDEX, Some(0)).unwrap()}
8505 }
8506 #[inline]
8507 pub fn effect_node_type(&self) -> EffectNodeType {
8508 unsafe { self._tab.get::<EffectNodeType>(EffectNode::VT_EFFECT_NODE_TYPE, Some(EffectNodeType::Root)).unwrap()}
8512 }
8513 #[inline]
8514 pub fn cell_name_hash(&self) -> u32 {
8515 unsafe { self._tab.get::<u32>(EffectNode::VT_CELL_NAME_HASH, Some(0)).unwrap()}
8519 }
8520 #[inline]
8521 pub fn cell_map_name_hash(&self) -> u32 {
8522 unsafe { self._tab.get::<u32>(EffectNode::VT_CELL_MAP_NAME_HASH, Some(0)).unwrap()}
8526 }
8527 #[inline]
8528 pub fn blend_type(&self) -> RenderBlendType {
8529 unsafe { self._tab.get::<RenderBlendType>(EffectNode::VT_BLEND_TYPE, Some(RenderBlendType::Mix)).unwrap()}
8533 }
8534 #[inline]
8535 pub fn behavior(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EffectNodeBehaviorWrapper<'a>>>> {
8536 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EffectNodeBehaviorWrapper>>>>(EffectNode::VT_BEHAVIOR, None)}
8540 }
8541}
8542
8543impl ::flatbuffers::Verifiable for EffectNode<'_> {
8544 #[inline]
8545 fn run_verifier(
8546 v: &mut ::flatbuffers::Verifier, pos: usize
8547 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
8548 v.visit_table(pos)?
8549 .visit_field::<i16>("index", Self::VT_INDEX, false)?
8550 .visit_field::<i16>("parent_index", Self::VT_PARENT_INDEX, false)?
8551 .visit_field::<EffectNodeType>("effect_node_type", Self::VT_EFFECT_NODE_TYPE, false)?
8552 .visit_field::<u32>("cell_name_hash", Self::VT_CELL_NAME_HASH, false)?
8553 .visit_field::<u32>("cell_map_name_hash", Self::VT_CELL_MAP_NAME_HASH, false)?
8554 .visit_field::<RenderBlendType>("blend_type", Self::VT_BLEND_TYPE, false)?
8555 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<EffectNodeBehaviorWrapper>>>>("behavior", Self::VT_BEHAVIOR, false)?
8556 .finish();
8557 Ok(())
8558 }
8559}
8560pub struct EffectNodeArgs<'a> {
8561 pub index: i16,
8562 pub parent_index: i16,
8563 pub effect_node_type: EffectNodeType,
8564 pub cell_name_hash: u32,
8565 pub cell_map_name_hash: u32,
8566 pub blend_type: RenderBlendType,
8567 pub behavior: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EffectNodeBehaviorWrapper<'a>>>>>,
8568}
8569impl<'a> Default for EffectNodeArgs<'a> {
8570 #[inline]
8571 fn default() -> Self {
8572 EffectNodeArgs {
8573 index: 0,
8574 parent_index: 0,
8575 effect_node_type: EffectNodeType::Root,
8576 cell_name_hash: 0,
8577 cell_map_name_hash: 0,
8578 blend_type: RenderBlendType::Mix,
8579 behavior: None,
8580 }
8581 }
8582}
8583
8584pub struct EffectNodeBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
8585 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
8586 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
8587}
8588impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EffectNodeBuilder<'a, 'b, A> {
8589 #[inline]
8590 pub fn add_index(&mut self, index: i16) {
8591 self.fbb_.push_slot::<i16>(EffectNode::VT_INDEX, index, 0);
8592 }
8593 #[inline]
8594 pub fn add_parent_index(&mut self, parent_index: i16) {
8595 self.fbb_.push_slot::<i16>(EffectNode::VT_PARENT_INDEX, parent_index, 0);
8596 }
8597 #[inline]
8598 pub fn add_effect_node_type(&mut self, effect_node_type: EffectNodeType) {
8599 self.fbb_.push_slot::<EffectNodeType>(EffectNode::VT_EFFECT_NODE_TYPE, effect_node_type, EffectNodeType::Root);
8600 }
8601 #[inline]
8602 pub fn add_cell_name_hash(&mut self, cell_name_hash: u32) {
8603 self.fbb_.push_slot::<u32>(EffectNode::VT_CELL_NAME_HASH, cell_name_hash, 0);
8604 }
8605 #[inline]
8606 pub fn add_cell_map_name_hash(&mut self, cell_map_name_hash: u32) {
8607 self.fbb_.push_slot::<u32>(EffectNode::VT_CELL_MAP_NAME_HASH, cell_map_name_hash, 0);
8608 }
8609 #[inline]
8610 pub fn add_blend_type(&mut self, blend_type: RenderBlendType) {
8611 self.fbb_.push_slot::<RenderBlendType>(EffectNode::VT_BLEND_TYPE, blend_type, RenderBlendType::Mix);
8612 }
8613 #[inline]
8614 pub fn add_behavior(&mut self, behavior: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<EffectNodeBehaviorWrapper<'b >>>>) {
8615 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(EffectNode::VT_BEHAVIOR, behavior);
8616 }
8617 #[inline]
8618 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EffectNodeBuilder<'a, 'b, A> {
8619 let start = _fbb.start_table();
8620 EffectNodeBuilder {
8621 fbb_: _fbb,
8622 start_: start,
8623 }
8624 }
8625 #[inline]
8626 pub fn finish(self) -> ::flatbuffers::WIPOffset<EffectNode<'a>> {
8627 let o = self.fbb_.end_table(self.start_);
8628 ::flatbuffers::WIPOffset::new(o.value())
8629 }
8630}
8631
8632impl ::core::fmt::Debug for EffectNode<'_> {
8633 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8634 let mut ds = f.debug_struct("EffectNode");
8635 ds.field("index", &self.index());
8636 ds.field("parent_index", &self.parent_index());
8637 ds.field("effect_node_type", &self.effect_node_type());
8638 ds.field("cell_name_hash", &self.cell_name_hash());
8639 ds.field("cell_map_name_hash", &self.cell_map_name_hash());
8640 ds.field("blend_type", &self.blend_type());
8641 ds.field("behavior", &self.behavior());
8642 ds.finish()
8643 }
8644}
8645#[non_exhaustive]
8646#[derive(Debug, Clone, PartialEq)]
8647pub struct EffectNodeT {
8648 pub index: i16,
8649 pub parent_index: i16,
8650 pub effect_node_type: EffectNodeType,
8651 pub cell_name_hash: u32,
8652 pub cell_map_name_hash: u32,
8653 pub blend_type: RenderBlendType,
8654 pub behavior: Option<alloc::vec::Vec<EffectNodeBehaviorWrapperT>>,
8655}
8656impl Default for EffectNodeT {
8657 fn default() -> Self {
8658 Self {
8659 index: 0,
8660 parent_index: 0,
8661 effect_node_type: EffectNodeType::Root,
8662 cell_name_hash: 0,
8663 cell_map_name_hash: 0,
8664 blend_type: RenderBlendType::Mix,
8665 behavior: None,
8666 }
8667 }
8668}
8669impl EffectNodeT {
8670 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
8671 &self,
8672 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
8673 ) -> ::flatbuffers::WIPOffset<EffectNode<'b>> {
8674 let index = self.index;
8675 let parent_index = self.parent_index;
8676 let effect_node_type = self.effect_node_type;
8677 let cell_name_hash = self.cell_name_hash;
8678 let cell_map_name_hash = self.cell_map_name_hash;
8679 let blend_type = self.blend_type;
8680 let behavior = self.behavior.as_ref().map(|x|{
8681 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
8682 });
8683 EffectNode::create(_fbb, &EffectNodeArgs{
8684 index,
8685 parent_index,
8686 effect_node_type,
8687 cell_name_hash,
8688 cell_map_name_hash,
8689 blend_type,
8690 behavior,
8691 })
8692 }
8693}
8694pub enum EffectOffset {}
8695#[derive(Copy, Clone, PartialEq)]
8696
8697pub struct Effect<'a> {
8698 pub _tab: ::flatbuffers::Table<'a>,
8699}
8700
8701impl<'a> ::flatbuffers::Follow<'a> for Effect<'a> {
8702 type Inner = Effect<'a>;
8703 #[inline]
8704 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
8705 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
8706 }
8707}
8708
8709impl<'a> Effect<'a> {
8710 pub const VT_NAME_HASH: ::flatbuffers::VOffsetT = 4;
8711 pub const VT_NAME: ::flatbuffers::VOffsetT = 6;
8712 pub const VT_FPS: ::flatbuffers::VOffsetT = 8;
8713 pub const VT_IS_LOCK_RAND_SEED: ::flatbuffers::VOffsetT = 10;
8714 pub const VT_LOCK_RAND_SEED: ::flatbuffers::VOffsetT = 12;
8715 pub const VT_LAYOUT_SCALE: ::flatbuffers::VOffsetT = 14;
8716 pub const VT_EFFECT_NODE: ::flatbuffers::VOffsetT = 16;
8717
8718 #[inline]
8719 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
8720 Effect { _tab: table }
8721 }
8722 #[allow(unused_mut)]
8723 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
8724 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
8725 args: &'args EffectArgs<'args>
8726 ) -> ::flatbuffers::WIPOffset<Effect<'bldr>> {
8727 let mut builder = EffectBuilder::new(_fbb);
8728 if let Some(x) = args.effect_node { builder.add_effect_node(x); }
8729 if let Some(x) = args.layout_scale { builder.add_layout_scale(x); }
8730 if let Some(x) = args.name { builder.add_name(x); }
8731 builder.add_name_hash(args.name_hash);
8732 builder.add_lock_rand_seed(args.lock_rand_seed);
8733 builder.add_fps(args.fps);
8734 builder.add_is_lock_rand_seed(args.is_lock_rand_seed);
8735 builder.finish()
8736 }
8737
8738 pub fn unpack(&self) -> EffectT {
8739 let name_hash = self.name_hash();
8740 let name = {
8741 let x = self.name();
8742 alloc::string::ToString::to_string(x)
8743 };
8744 let fps = self.fps();
8745 let is_lock_rand_seed = self.is_lock_rand_seed();
8746 let lock_rand_seed = self.lock_rand_seed();
8747 let layout_scale = {
8748 let x = self.layout_scale();
8749 alloc::boxed::Box::new(x.unpack())
8750 };
8751 let effect_node = {
8752 let x = self.effect_node();
8753 x.iter().map(|t| t.unpack()).collect()
8754 };
8755 EffectT {
8756 name_hash,
8757 name,
8758 fps,
8759 is_lock_rand_seed,
8760 lock_rand_seed,
8761 layout_scale,
8762 effect_node,
8763 }
8764 }
8765
8766 #[inline]
8767 pub fn name_hash(&self) -> u32 {
8768 unsafe { self._tab.get::<u32>(Effect::VT_NAME_HASH, Some(0)).unwrap()}
8772 }
8773 #[inline]
8774 pub fn key_compare_less_than(&self, o: &Effect) -> bool {
8775 self.name_hash() < o.name_hash()
8776 }
8777
8778 #[inline]
8779 pub fn key_compare_with_value(&self, val: u32) -> ::core::cmp::Ordering {
8780 let key = self.name_hash();
8781 key.cmp(&val)
8782 }
8783 #[inline]
8784 pub fn name(&self) -> &'a str {
8785 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Effect::VT_NAME, None).unwrap()}
8789 }
8790 #[inline]
8791 pub fn fps(&self) -> i16 {
8792 unsafe { self._tab.get::<i16>(Effect::VT_FPS, Some(0)).unwrap()}
8796 }
8797 #[inline]
8798 pub fn is_lock_rand_seed(&self) -> bool {
8799 unsafe { self._tab.get::<bool>(Effect::VT_IS_LOCK_RAND_SEED, Some(false)).unwrap()}
8803 }
8804 #[inline]
8805 pub fn lock_rand_seed(&self) -> i16 {
8806 unsafe { self._tab.get::<i16>(Effect::VT_LOCK_RAND_SEED, Some(0)).unwrap()}
8810 }
8811 #[inline]
8812 pub fn layout_scale(&self) -> Vec2<'a> {
8813 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(Effect::VT_LAYOUT_SCALE, None).unwrap()}
8817 }
8818 #[inline]
8819 pub fn effect_node(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EffectNode<'a>>> {
8820 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EffectNode>>>>(Effect::VT_EFFECT_NODE, None).unwrap()}
8824 }
8825}
8826
8827impl ::flatbuffers::Verifiable for Effect<'_> {
8828 #[inline]
8829 fn run_verifier(
8830 v: &mut ::flatbuffers::Verifier, pos: usize
8831 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
8832 v.visit_table(pos)?
8833 .visit_field::<u32>("name_hash", Self::VT_NAME_HASH, false)?
8834 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
8835 .visit_field::<i16>("fps", Self::VT_FPS, false)?
8836 .visit_field::<bool>("is_lock_rand_seed", Self::VT_IS_LOCK_RAND_SEED, false)?
8837 .visit_field::<i16>("lock_rand_seed", Self::VT_LOCK_RAND_SEED, false)?
8838 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("layout_scale", Self::VT_LAYOUT_SCALE, true)?
8839 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<EffectNode>>>>("effect_node", Self::VT_EFFECT_NODE, true)?
8840 .finish();
8841 Ok(())
8842 }
8843}
8844pub struct EffectArgs<'a> {
8845 pub name_hash: u32,
8846 pub name: Option<::flatbuffers::WIPOffset<&'a str>>,
8847 pub fps: i16,
8848 pub is_lock_rand_seed: bool,
8849 pub lock_rand_seed: i16,
8850 pub layout_scale: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
8851 pub effect_node: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EffectNode<'a>>>>>,
8852}
8853impl<'a> Default for EffectArgs<'a> {
8854 #[inline]
8855 fn default() -> Self {
8856 EffectArgs {
8857 name_hash: 0,
8858 name: None, fps: 0,
8860 is_lock_rand_seed: false,
8861 lock_rand_seed: 0,
8862 layout_scale: None, effect_node: None, }
8865 }
8866}
8867
8868pub struct EffectBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
8869 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
8870 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
8871}
8872impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EffectBuilder<'a, 'b, A> {
8873 #[inline]
8874 pub fn add_name_hash(&mut self, name_hash: u32) {
8875 self.fbb_.push_slot::<u32>(Effect::VT_NAME_HASH, name_hash, 0);
8876 }
8877 #[inline]
8878 pub fn add_name(&mut self, name: ::flatbuffers::WIPOffset<&'b str>) {
8879 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Effect::VT_NAME, name);
8880 }
8881 #[inline]
8882 pub fn add_fps(&mut self, fps: i16) {
8883 self.fbb_.push_slot::<i16>(Effect::VT_FPS, fps, 0);
8884 }
8885 #[inline]
8886 pub fn add_is_lock_rand_seed(&mut self, is_lock_rand_seed: bool) {
8887 self.fbb_.push_slot::<bool>(Effect::VT_IS_LOCK_RAND_SEED, is_lock_rand_seed, false);
8888 }
8889 #[inline]
8890 pub fn add_lock_rand_seed(&mut self, lock_rand_seed: i16) {
8891 self.fbb_.push_slot::<i16>(Effect::VT_LOCK_RAND_SEED, lock_rand_seed, 0);
8892 }
8893 #[inline]
8894 pub fn add_layout_scale(&mut self, layout_scale: ::flatbuffers::WIPOffset<Vec2<'b >>) {
8895 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(Effect::VT_LAYOUT_SCALE, layout_scale);
8896 }
8897 #[inline]
8898 pub fn add_effect_node(&mut self, effect_node: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<EffectNode<'b >>>>) {
8899 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Effect::VT_EFFECT_NODE, effect_node);
8900 }
8901 #[inline]
8902 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EffectBuilder<'a, 'b, A> {
8903 let start = _fbb.start_table();
8904 EffectBuilder {
8905 fbb_: _fbb,
8906 start_: start,
8907 }
8908 }
8909 #[inline]
8910 pub fn finish(self) -> ::flatbuffers::WIPOffset<Effect<'a>> {
8911 let o = self.fbb_.end_table(self.start_);
8912 self.fbb_.required(o, Effect::VT_NAME,"name");
8913 self.fbb_.required(o, Effect::VT_LAYOUT_SCALE,"layout_scale");
8914 self.fbb_.required(o, Effect::VT_EFFECT_NODE,"effect_node");
8915 ::flatbuffers::WIPOffset::new(o.value())
8916 }
8917}
8918
8919impl ::core::fmt::Debug for Effect<'_> {
8920 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8921 let mut ds = f.debug_struct("Effect");
8922 ds.field("name_hash", &self.name_hash());
8923 ds.field("name", &self.name());
8924 ds.field("fps", &self.fps());
8925 ds.field("is_lock_rand_seed", &self.is_lock_rand_seed());
8926 ds.field("lock_rand_seed", &self.lock_rand_seed());
8927 ds.field("layout_scale", &self.layout_scale());
8928 ds.field("effect_node", &self.effect_node());
8929 ds.finish()
8930 }
8931}
8932#[non_exhaustive]
8933#[derive(Debug, Clone, PartialEq)]
8934pub struct EffectT {
8935 pub name_hash: u32,
8936 pub name: alloc::string::String,
8937 pub fps: i16,
8938 pub is_lock_rand_seed: bool,
8939 pub lock_rand_seed: i16,
8940 pub layout_scale: alloc::boxed::Box<Vec2T>,
8941 pub effect_node: alloc::vec::Vec<EffectNodeT>,
8942}
8943impl Default for EffectT {
8944 fn default() -> Self {
8945 Self {
8946 name_hash: 0,
8947 name: alloc::string::ToString::to_string(""),
8948 fps: 0,
8949 is_lock_rand_seed: false,
8950 lock_rand_seed: 0,
8951 layout_scale: Default::default(),
8952 effect_node: Default::default(),
8953 }
8954 }
8955}
8956impl EffectT {
8957 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
8958 &self,
8959 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
8960 ) -> ::flatbuffers::WIPOffset<Effect<'b>> {
8961 let name_hash = self.name_hash;
8962 let name = Some({
8963 let x = &self.name;
8964 _fbb.create_string(x)
8965 });
8966 let fps = self.fps;
8967 let is_lock_rand_seed = self.is_lock_rand_seed;
8968 let lock_rand_seed = self.lock_rand_seed;
8969 let layout_scale = Some({
8970 let x = &self.layout_scale;
8971 x.pack(_fbb)
8972 });
8973 let effect_node = Some({
8974 let x = &self.effect_node;
8975 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
8976 });
8977 Effect::create(_fbb, &EffectArgs{
8978 name_hash,
8979 name,
8980 fps,
8981 is_lock_rand_seed,
8982 lock_rand_seed,
8983 layout_scale,
8984 effect_node,
8985 })
8986 }
8987}
8988pub enum SoundFileOffset {}
8989#[derive(Copy, Clone, PartialEq)]
8990
8991pub struct SoundFile<'a> {
8992 pub _tab: ::flatbuffers::Table<'a>,
8993}
8994
8995impl<'a> ::flatbuffers::Follow<'a> for SoundFile<'a> {
8996 type Inner = SoundFile<'a>;
8997 #[inline]
8998 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
8999 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
9000 }
9001}
9002
9003impl<'a> SoundFile<'a> {
9004 pub const VT_NAME_HASH: ::flatbuffers::VOffsetT = 4;
9005 pub const VT_NAME: ::flatbuffers::VOffsetT = 6;
9006 pub const VT_FILE_PATH: ::flatbuffers::VOffsetT = 8;
9007 pub const VT_FILE_PATH_HASH: ::flatbuffers::VOffsetT = 10;
9008 pub const VT_TIME_TOTAL: ::flatbuffers::VOffsetT = 12;
9009
9010 #[inline]
9011 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
9012 SoundFile { _tab: table }
9013 }
9014 #[allow(unused_mut)]
9015 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
9016 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
9017 args: &'args SoundFileArgs<'args>
9018 ) -> ::flatbuffers::WIPOffset<SoundFile<'bldr>> {
9019 let mut builder = SoundFileBuilder::new(_fbb);
9020 builder.add_time_total(args.time_total);
9021 builder.add_file_path_hash(args.file_path_hash);
9022 if let Some(x) = args.file_path { builder.add_file_path(x); }
9023 if let Some(x) = args.name { builder.add_name(x); }
9024 builder.add_name_hash(args.name_hash);
9025 builder.finish()
9026 }
9027
9028 pub fn unpack(&self) -> SoundFileT {
9029 let name_hash = self.name_hash();
9030 let name = self.name().map(|x| {
9031 alloc::string::ToString::to_string(x)
9032 });
9033 let file_path = self.file_path().map(|x| {
9034 alloc::string::ToString::to_string(x)
9035 });
9036 let file_path_hash = self.file_path_hash();
9037 let time_total = self.time_total();
9038 SoundFileT {
9039 name_hash,
9040 name,
9041 file_path,
9042 file_path_hash,
9043 time_total,
9044 }
9045 }
9046
9047 #[inline]
9048 pub fn name_hash(&self) -> u32 {
9049 unsafe { self._tab.get::<u32>(SoundFile::VT_NAME_HASH, Some(0)).unwrap()}
9053 }
9054 #[inline]
9055 pub fn key_compare_less_than(&self, o: &SoundFile) -> bool {
9056 self.name_hash() < o.name_hash()
9057 }
9058
9059 #[inline]
9060 pub fn key_compare_with_value(&self, val: u32) -> ::core::cmp::Ordering {
9061 let key = self.name_hash();
9062 key.cmp(&val)
9063 }
9064 #[inline]
9065 pub fn name(&self) -> Option<&'a str> {
9066 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(SoundFile::VT_NAME, None)}
9070 }
9071 #[inline]
9072 pub fn file_path(&self) -> Option<&'a str> {
9073 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(SoundFile::VT_FILE_PATH, None)}
9077 }
9078 #[inline]
9079 pub fn file_path_hash(&self) -> u32 {
9080 unsafe { self._tab.get::<u32>(SoundFile::VT_FILE_PATH_HASH, Some(0)).unwrap()}
9084 }
9085 #[inline]
9086 pub fn time_total(&self) -> u32 {
9087 unsafe { self._tab.get::<u32>(SoundFile::VT_TIME_TOTAL, Some(0)).unwrap()}
9091 }
9092}
9093
9094impl ::flatbuffers::Verifiable for SoundFile<'_> {
9095 #[inline]
9096 fn run_verifier(
9097 v: &mut ::flatbuffers::Verifier, pos: usize
9098 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
9099 v.visit_table(pos)?
9100 .visit_field::<u32>("name_hash", Self::VT_NAME_HASH, false)?
9101 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
9102 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("file_path", Self::VT_FILE_PATH, false)?
9103 .visit_field::<u32>("file_path_hash", Self::VT_FILE_PATH_HASH, false)?
9104 .visit_field::<u32>("time_total", Self::VT_TIME_TOTAL, false)?
9105 .finish();
9106 Ok(())
9107 }
9108}
9109pub struct SoundFileArgs<'a> {
9110 pub name_hash: u32,
9111 pub name: Option<::flatbuffers::WIPOffset<&'a str>>,
9112 pub file_path: Option<::flatbuffers::WIPOffset<&'a str>>,
9113 pub file_path_hash: u32,
9114 pub time_total: u32,
9115}
9116impl<'a> Default for SoundFileArgs<'a> {
9117 #[inline]
9118 fn default() -> Self {
9119 SoundFileArgs {
9120 name_hash: 0,
9121 name: None,
9122 file_path: None,
9123 file_path_hash: 0,
9124 time_total: 0,
9125 }
9126 }
9127}
9128
9129pub struct SoundFileBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
9130 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
9131 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
9132}
9133impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> SoundFileBuilder<'a, 'b, A> {
9134 #[inline]
9135 pub fn add_name_hash(&mut self, name_hash: u32) {
9136 self.fbb_.push_slot::<u32>(SoundFile::VT_NAME_HASH, name_hash, 0);
9137 }
9138 #[inline]
9139 pub fn add_name(&mut self, name: ::flatbuffers::WIPOffset<&'b str>) {
9140 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SoundFile::VT_NAME, name);
9141 }
9142 #[inline]
9143 pub fn add_file_path(&mut self, file_path: ::flatbuffers::WIPOffset<&'b str>) {
9144 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SoundFile::VT_FILE_PATH, file_path);
9145 }
9146 #[inline]
9147 pub fn add_file_path_hash(&mut self, file_path_hash: u32) {
9148 self.fbb_.push_slot::<u32>(SoundFile::VT_FILE_PATH_HASH, file_path_hash, 0);
9149 }
9150 #[inline]
9151 pub fn add_time_total(&mut self, time_total: u32) {
9152 self.fbb_.push_slot::<u32>(SoundFile::VT_TIME_TOTAL, time_total, 0);
9153 }
9154 #[inline]
9155 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> SoundFileBuilder<'a, 'b, A> {
9156 let start = _fbb.start_table();
9157 SoundFileBuilder {
9158 fbb_: _fbb,
9159 start_: start,
9160 }
9161 }
9162 #[inline]
9163 pub fn finish(self) -> ::flatbuffers::WIPOffset<SoundFile<'a>> {
9164 let o = self.fbb_.end_table(self.start_);
9165 ::flatbuffers::WIPOffset::new(o.value())
9166 }
9167}
9168
9169impl ::core::fmt::Debug for SoundFile<'_> {
9170 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9171 let mut ds = f.debug_struct("SoundFile");
9172 ds.field("name_hash", &self.name_hash());
9173 ds.field("name", &self.name());
9174 ds.field("file_path", &self.file_path());
9175 ds.field("file_path_hash", &self.file_path_hash());
9176 ds.field("time_total", &self.time_total());
9177 ds.finish()
9178 }
9179}
9180#[non_exhaustive]
9181#[derive(Debug, Clone, PartialEq)]
9182pub struct SoundFileT {
9183 pub name_hash: u32,
9184 pub name: Option<alloc::string::String>,
9185 pub file_path: Option<alloc::string::String>,
9186 pub file_path_hash: u32,
9187 pub time_total: u32,
9188}
9189impl Default for SoundFileT {
9190 fn default() -> Self {
9191 Self {
9192 name_hash: 0,
9193 name: None,
9194 file_path: None,
9195 file_path_hash: 0,
9196 time_total: 0,
9197 }
9198 }
9199}
9200impl SoundFileT {
9201 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
9202 &self,
9203 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
9204 ) -> ::flatbuffers::WIPOffset<SoundFile<'b>> {
9205 let name_hash = self.name_hash;
9206 let name = self.name.as_ref().map(|x|{
9207 _fbb.create_string(x)
9208 });
9209 let file_path = self.file_path.as_ref().map(|x|{
9210 _fbb.create_string(x)
9211 });
9212 let file_path_hash = self.file_path_hash;
9213 let time_total = self.time_total;
9214 SoundFile::create(_fbb, &SoundFileArgs{
9215 name_hash,
9216 name,
9217 file_path,
9218 file_path_hash,
9219 time_total,
9220 })
9221 }
9222}
9223pub enum SoundListOffset {}
9224#[derive(Copy, Clone, PartialEq)]
9225
9226pub struct SoundList<'a> {
9227 pub _tab: ::flatbuffers::Table<'a>,
9228}
9229
9230impl<'a> ::flatbuffers::Follow<'a> for SoundList<'a> {
9231 type Inner = SoundList<'a>;
9232 #[inline]
9233 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
9234 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
9235 }
9236}
9237
9238impl<'a> SoundList<'a> {
9239 pub const VT_NAME_HASH: ::flatbuffers::VOffsetT = 4;
9240 pub const VT_NAME: ::flatbuffers::VOffsetT = 6;
9241 pub const VT_TABLE_DATA: ::flatbuffers::VOffsetT = 8;
9242
9243 #[inline]
9244 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
9245 SoundList { _tab: table }
9246 }
9247 #[allow(unused_mut)]
9248 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
9249 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
9250 args: &'args SoundListArgs<'args>
9251 ) -> ::flatbuffers::WIPOffset<SoundList<'bldr>> {
9252 let mut builder = SoundListBuilder::new(_fbb);
9253 if let Some(x) = args.table_data { builder.add_table_data(x); }
9254 if let Some(x) = args.name { builder.add_name(x); }
9255 builder.add_name_hash(args.name_hash);
9256 builder.finish()
9257 }
9258
9259 pub fn unpack(&self) -> SoundListT {
9260 let name_hash = self.name_hash();
9261 let name = self.name().map(|x| {
9262 alloc::string::ToString::to_string(x)
9263 });
9264 let table_data = self.table_data().map(|x| {
9265 x.iter().map(|t| t.unpack()).collect()
9266 });
9267 SoundListT {
9268 name_hash,
9269 name,
9270 table_data,
9271 }
9272 }
9273
9274 #[inline]
9275 pub fn name_hash(&self) -> u32 {
9276 unsafe { self._tab.get::<u32>(SoundList::VT_NAME_HASH, Some(0)).unwrap()}
9280 }
9281 #[inline]
9282 pub fn key_compare_less_than(&self, o: &SoundList) -> bool {
9283 self.name_hash() < o.name_hash()
9284 }
9285
9286 #[inline]
9287 pub fn key_compare_with_value(&self, val: u32) -> ::core::cmp::Ordering {
9288 let key = self.name_hash();
9289 key.cmp(&val)
9290 }
9291 #[inline]
9292 pub fn name(&self) -> Option<&'a str> {
9293 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(SoundList::VT_NAME, None)}
9297 }
9298 #[inline]
9299 pub fn table_data(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<SoundFile<'a>>>> {
9300 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<SoundFile>>>>(SoundList::VT_TABLE_DATA, None)}
9304 }
9305}
9306
9307impl ::flatbuffers::Verifiable for SoundList<'_> {
9308 #[inline]
9309 fn run_verifier(
9310 v: &mut ::flatbuffers::Verifier, pos: usize
9311 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
9312 v.visit_table(pos)?
9313 .visit_field::<u32>("name_hash", Self::VT_NAME_HASH, false)?
9314 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
9315 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<SoundFile>>>>("table_data", Self::VT_TABLE_DATA, false)?
9316 .finish();
9317 Ok(())
9318 }
9319}
9320pub struct SoundListArgs<'a> {
9321 pub name_hash: u32,
9322 pub name: Option<::flatbuffers::WIPOffset<&'a str>>,
9323 pub table_data: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<SoundFile<'a>>>>>,
9324}
9325impl<'a> Default for SoundListArgs<'a> {
9326 #[inline]
9327 fn default() -> Self {
9328 SoundListArgs {
9329 name_hash: 0,
9330 name: None,
9331 table_data: None,
9332 }
9333 }
9334}
9335
9336pub struct SoundListBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
9337 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
9338 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
9339}
9340impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> SoundListBuilder<'a, 'b, A> {
9341 #[inline]
9342 pub fn add_name_hash(&mut self, name_hash: u32) {
9343 self.fbb_.push_slot::<u32>(SoundList::VT_NAME_HASH, name_hash, 0);
9344 }
9345 #[inline]
9346 pub fn add_name(&mut self, name: ::flatbuffers::WIPOffset<&'b str>) {
9347 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SoundList::VT_NAME, name);
9348 }
9349 #[inline]
9350 pub fn add_table_data(&mut self, table_data: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<SoundFile<'b >>>>) {
9351 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SoundList::VT_TABLE_DATA, table_data);
9352 }
9353 #[inline]
9354 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> SoundListBuilder<'a, 'b, A> {
9355 let start = _fbb.start_table();
9356 SoundListBuilder {
9357 fbb_: _fbb,
9358 start_: start,
9359 }
9360 }
9361 #[inline]
9362 pub fn finish(self) -> ::flatbuffers::WIPOffset<SoundList<'a>> {
9363 let o = self.fbb_.end_table(self.start_);
9364 ::flatbuffers::WIPOffset::new(o.value())
9365 }
9366}
9367
9368impl ::core::fmt::Debug for SoundList<'_> {
9369 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9370 let mut ds = f.debug_struct("SoundList");
9371 ds.field("name_hash", &self.name_hash());
9372 ds.field("name", &self.name());
9373 ds.field("table_data", &self.table_data());
9374 ds.finish()
9375 }
9376}
9377#[non_exhaustive]
9378#[derive(Debug, Clone, PartialEq)]
9379pub struct SoundListT {
9380 pub name_hash: u32,
9381 pub name: Option<alloc::string::String>,
9382 pub table_data: Option<alloc::vec::Vec<SoundFileT>>,
9383}
9384impl Default for SoundListT {
9385 fn default() -> Self {
9386 Self {
9387 name_hash: 0,
9388 name: None,
9389 table_data: None,
9390 }
9391 }
9392}
9393impl SoundListT {
9394 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
9395 &self,
9396 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
9397 ) -> ::flatbuffers::WIPOffset<SoundList<'b>> {
9398 let name_hash = self.name_hash;
9399 let name = self.name.as_ref().map(|x|{
9400 _fbb.create_string(x)
9401 });
9402 let table_data = self.table_data.as_ref().map(|x|{
9403 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
9404 });
9405 SoundList::create(_fbb, &SoundListArgs{
9406 name_hash,
9407 name,
9408 table_data,
9409 })
9410 }
9411}
9412pub enum FontGlyphBitmapOffset {}
9413#[derive(Copy, Clone, PartialEq)]
9414
9415pub struct FontGlyphBitmap<'a> {
9416 pub _tab: ::flatbuffers::Table<'a>,
9417}
9418
9419impl<'a> ::flatbuffers::Follow<'a> for FontGlyphBitmap<'a> {
9420 type Inner = FontGlyphBitmap<'a>;
9421 #[inline]
9422 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
9423 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
9424 }
9425}
9426
9427impl<'a> FontGlyphBitmap<'a> {
9428 pub const VT_ID: ::flatbuffers::VOffsetT = 4;
9429 pub const VT_ATLAS: ::flatbuffers::VOffsetT = 6;
9430 pub const VT_OFFSET: ::flatbuffers::VOffsetT = 8;
9431 pub const VT_WIDTH_ADVANCE: ::flatbuffers::VOffsetT = 10;
9432 pub const VT_TEXT: ::flatbuffers::VOffsetT = 12;
9433 pub const VT_PAGE: ::flatbuffers::VOffsetT = 14;
9434 pub const VT_CHANNEL: ::flatbuffers::VOffsetT = 16;
9435
9436 #[inline]
9437 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
9438 FontGlyphBitmap { _tab: table }
9439 }
9440 #[allow(unused_mut)]
9441 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
9442 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
9443 args: &'args FontGlyphBitmapArgs<'args>
9444 ) -> ::flatbuffers::WIPOffset<FontGlyphBitmap<'bldr>> {
9445 let mut builder = FontGlyphBitmapBuilder::new(_fbb);
9446 if let Some(x) = args.text { builder.add_text(x); }
9447 builder.add_width_advance(args.width_advance);
9448 if let Some(x) = args.offset { builder.add_offset(x); }
9449 if let Some(x) = args.atlas { builder.add_atlas(x); }
9450 builder.add_id(args.id);
9451 builder.add_channel(args.channel);
9452 builder.add_page(args.page);
9453 builder.finish()
9454 }
9455
9456 pub fn unpack(&self) -> FontGlyphBitmapT {
9457 let id = self.id();
9458 let atlas = self.atlas().map(|x| {
9459 alloc::boxed::Box::new(x.unpack())
9460 });
9461 let offset = self.offset().map(|x| {
9462 alloc::boxed::Box::new(x.unpack())
9463 });
9464 let width_advance = self.width_advance();
9465 let text = self.text().map(|x| {
9466 alloc::string::ToString::to_string(x)
9467 });
9468 let page = self.page();
9469 let channel = self.channel();
9470 FontGlyphBitmapT {
9471 id,
9472 atlas,
9473 offset,
9474 width_advance,
9475 text,
9476 page,
9477 channel,
9478 }
9479 }
9480
9481 #[inline]
9482 pub fn id(&self) -> u16 {
9483 unsafe { self._tab.get::<u16>(FontGlyphBitmap::VT_ID, Some(0)).unwrap()}
9487 }
9488 #[inline]
9489 pub fn key_compare_less_than(&self, o: &FontGlyphBitmap) -> bool {
9490 self.id() < o.id()
9491 }
9492
9493 #[inline]
9494 pub fn key_compare_with_value(&self, val: u16) -> ::core::cmp::Ordering {
9495 let key = self.id();
9496 key.cmp(&val)
9497 }
9498 #[inline]
9499 pub fn atlas(&self) -> Option<Region<'a>> {
9500 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Region>>(FontGlyphBitmap::VT_ATLAS, None)}
9504 }
9505 #[inline]
9506 pub fn offset(&self) -> Option<Vec2<'a>> {
9507 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(FontGlyphBitmap::VT_OFFSET, None)}
9511 }
9512 #[inline]
9513 pub fn width_advance(&self) -> f32 {
9514 unsafe { self._tab.get::<f32>(FontGlyphBitmap::VT_WIDTH_ADVANCE, Some(0.0)).unwrap()}
9518 }
9519 #[inline]
9520 pub fn text(&self) -> Option<&'a str> {
9521 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(FontGlyphBitmap::VT_TEXT, None)}
9525 }
9526 #[inline]
9527 pub fn page(&self) -> i8 {
9528 unsafe { self._tab.get::<i8>(FontGlyphBitmap::VT_PAGE, Some(0)).unwrap()}
9532 }
9533 #[inline]
9534 pub fn channel(&self) -> i8 {
9535 unsafe { self._tab.get::<i8>(FontGlyphBitmap::VT_CHANNEL, Some(0)).unwrap()}
9539 }
9540}
9541
9542impl ::flatbuffers::Verifiable for FontGlyphBitmap<'_> {
9543 #[inline]
9544 fn run_verifier(
9545 v: &mut ::flatbuffers::Verifier, pos: usize
9546 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
9547 v.visit_table(pos)?
9548 .visit_field::<u16>("id", Self::VT_ID, false)?
9549 .visit_field::<::flatbuffers::ForwardsUOffset<Region>>("atlas", Self::VT_ATLAS, false)?
9550 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("offset", Self::VT_OFFSET, false)?
9551 .visit_field::<f32>("width_advance", Self::VT_WIDTH_ADVANCE, false)?
9552 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("text", Self::VT_TEXT, false)?
9553 .visit_field::<i8>("page", Self::VT_PAGE, false)?
9554 .visit_field::<i8>("channel", Self::VT_CHANNEL, false)?
9555 .finish();
9556 Ok(())
9557 }
9558}
9559pub struct FontGlyphBitmapArgs<'a> {
9560 pub id: u16,
9561 pub atlas: Option<::flatbuffers::WIPOffset<Region<'a>>>,
9562 pub offset: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
9563 pub width_advance: f32,
9564 pub text: Option<::flatbuffers::WIPOffset<&'a str>>,
9565 pub page: i8,
9566 pub channel: i8,
9567}
9568impl<'a> Default for FontGlyphBitmapArgs<'a> {
9569 #[inline]
9570 fn default() -> Self {
9571 FontGlyphBitmapArgs {
9572 id: 0,
9573 atlas: None,
9574 offset: None,
9575 width_advance: 0.0,
9576 text: None,
9577 page: 0,
9578 channel: 0,
9579 }
9580 }
9581}
9582
9583pub struct FontGlyphBitmapBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
9584 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
9585 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
9586}
9587impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> FontGlyphBitmapBuilder<'a, 'b, A> {
9588 #[inline]
9589 pub fn add_id(&mut self, id: u16) {
9590 self.fbb_.push_slot::<u16>(FontGlyphBitmap::VT_ID, id, 0);
9591 }
9592 #[inline]
9593 pub fn add_atlas(&mut self, atlas: ::flatbuffers::WIPOffset<Region<'b >>) {
9594 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Region>>(FontGlyphBitmap::VT_ATLAS, atlas);
9595 }
9596 #[inline]
9597 pub fn add_offset(&mut self, offset: ::flatbuffers::WIPOffset<Vec2<'b >>) {
9598 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(FontGlyphBitmap::VT_OFFSET, offset);
9599 }
9600 #[inline]
9601 pub fn add_width_advance(&mut self, width_advance: f32) {
9602 self.fbb_.push_slot::<f32>(FontGlyphBitmap::VT_WIDTH_ADVANCE, width_advance, 0.0);
9603 }
9604 #[inline]
9605 pub fn add_text(&mut self, text: ::flatbuffers::WIPOffset<&'b str>) {
9606 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(FontGlyphBitmap::VT_TEXT, text);
9607 }
9608 #[inline]
9609 pub fn add_page(&mut self, page: i8) {
9610 self.fbb_.push_slot::<i8>(FontGlyphBitmap::VT_PAGE, page, 0);
9611 }
9612 #[inline]
9613 pub fn add_channel(&mut self, channel: i8) {
9614 self.fbb_.push_slot::<i8>(FontGlyphBitmap::VT_CHANNEL, channel, 0);
9615 }
9616 #[inline]
9617 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> FontGlyphBitmapBuilder<'a, 'b, A> {
9618 let start = _fbb.start_table();
9619 FontGlyphBitmapBuilder {
9620 fbb_: _fbb,
9621 start_: start,
9622 }
9623 }
9624 #[inline]
9625 pub fn finish(self) -> ::flatbuffers::WIPOffset<FontGlyphBitmap<'a>> {
9626 let o = self.fbb_.end_table(self.start_);
9627 ::flatbuffers::WIPOffset::new(o.value())
9628 }
9629}
9630
9631impl ::core::fmt::Debug for FontGlyphBitmap<'_> {
9632 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9633 let mut ds = f.debug_struct("FontGlyphBitmap");
9634 ds.field("id", &self.id());
9635 ds.field("atlas", &self.atlas());
9636 ds.field("offset", &self.offset());
9637 ds.field("width_advance", &self.width_advance());
9638 ds.field("text", &self.text());
9639 ds.field("page", &self.page());
9640 ds.field("channel", &self.channel());
9641 ds.finish()
9642 }
9643}
9644#[non_exhaustive]
9645#[derive(Debug, Clone, PartialEq)]
9646pub struct FontGlyphBitmapT {
9647 pub id: u16,
9648 pub atlas: Option<alloc::boxed::Box<RegionT>>,
9649 pub offset: Option<alloc::boxed::Box<Vec2T>>,
9650 pub width_advance: f32,
9651 pub text: Option<alloc::string::String>,
9652 pub page: i8,
9653 pub channel: i8,
9654}
9655impl Default for FontGlyphBitmapT {
9656 fn default() -> Self {
9657 Self {
9658 id: 0,
9659 atlas: None,
9660 offset: None,
9661 width_advance: 0.0,
9662 text: None,
9663 page: 0,
9664 channel: 0,
9665 }
9666 }
9667}
9668impl FontGlyphBitmapT {
9669 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
9670 &self,
9671 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
9672 ) -> ::flatbuffers::WIPOffset<FontGlyphBitmap<'b>> {
9673 let id = self.id;
9674 let atlas = self.atlas.as_ref().map(|x|{
9675 x.pack(_fbb)
9676 });
9677 let offset = self.offset.as_ref().map(|x|{
9678 x.pack(_fbb)
9679 });
9680 let width_advance = self.width_advance;
9681 let text = self.text.as_ref().map(|x|{
9682 _fbb.create_string(x)
9683 });
9684 let page = self.page;
9685 let channel = self.channel;
9686 FontGlyphBitmap::create(_fbb, &FontGlyphBitmapArgs{
9687 id,
9688 atlas,
9689 offset,
9690 width_advance,
9691 text,
9692 page,
9693 channel,
9694 })
9695 }
9696}
9697pub enum FontBitmapOffset {}
9698#[derive(Copy, Clone, PartialEq)]
9699
9700pub struct FontBitmap<'a> {
9701 pub _tab: ::flatbuffers::Table<'a>,
9702}
9703
9704impl<'a> ::flatbuffers::Follow<'a> for FontBitmap<'a> {
9705 type Inner = FontBitmap<'a>;
9706 #[inline]
9707 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
9708 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
9709 }
9710}
9711
9712impl<'a> FontBitmap<'a> {
9713 pub const VT_NAME_HASH: ::flatbuffers::VOffsetT = 4;
9714 pub const VT_NAME: ::flatbuffers::VOffsetT = 6;
9715 pub const VT_NAME_FACE: ::flatbuffers::VOffsetT = 8;
9716 pub const VT_SIZE: ::flatbuffers::VOffsetT = 10;
9717 pub const VT_PADDING_L: ::flatbuffers::VOffsetT = 12;
9718 pub const VT_PADDING_R: ::flatbuffers::VOffsetT = 14;
9719 pub const VT_PADDING_U: ::flatbuffers::VOffsetT = 16;
9720 pub const VT_PADDING_D: ::flatbuffers::VOffsetT = 18;
9721 pub const VT_BASE: ::flatbuffers::VOffsetT = 20;
9722 pub const VT_HEIGHT_LINE: ::flatbuffers::VOffsetT = 22;
9723 pub const VT_SCALE: ::flatbuffers::VOffsetT = 24;
9724 pub const VT_SPACING: ::flatbuffers::VOffsetT = 26;
9725 pub const VT_SIZE_TEXTURE_ORIGINAL: ::flatbuffers::VOffsetT = 28;
9726 pub const VT_NAME_TEXTURE: ::flatbuffers::VOffsetT = 30;
9727 pub const VT_NAME_TEXTURE_HASH: ::flatbuffers::VOffsetT = 32;
9728 pub const VT_TABLE_DATA: ::flatbuffers::VOffsetT = 34;
9729
9730 #[inline]
9731 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
9732 FontBitmap { _tab: table }
9733 }
9734 #[allow(unused_mut)]
9735 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
9736 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
9737 args: &'args FontBitmapArgs<'args>
9738 ) -> ::flatbuffers::WIPOffset<FontBitmap<'bldr>> {
9739 let mut builder = FontBitmapBuilder::new(_fbb);
9740 if let Some(x) = args.table_data { builder.add_table_data(x); }
9741 if let Some(x) = args.name_texture_hash { builder.add_name_texture_hash(x); }
9742 if let Some(x) = args.name_texture { builder.add_name_texture(x); }
9743 if let Some(x) = args.size_texture_original { builder.add_size_texture_original(x); }
9744 if let Some(x) = args.spacing { builder.add_spacing(x); }
9745 if let Some(x) = args.scale { builder.add_scale(x); }
9746 if let Some(x) = args.name_face { builder.add_name_face(x); }
9747 if let Some(x) = args.name { builder.add_name(x); }
9748 builder.add_name_hash(args.name_hash);
9749 builder.add_height_line(args.height_line);
9750 builder.add_base(args.base);
9751 builder.add_padding_d(args.padding_d);
9752 builder.add_padding_u(args.padding_u);
9753 builder.add_padding_r(args.padding_r);
9754 builder.add_padding_l(args.padding_l);
9755 builder.add_size(args.size);
9756 builder.finish()
9757 }
9758
9759 pub fn unpack(&self) -> FontBitmapT {
9760 let name_hash = self.name_hash();
9761 let name = self.name().map(|x| {
9762 alloc::string::ToString::to_string(x)
9763 });
9764 let name_face = self.name_face().map(|x| {
9765 alloc::string::ToString::to_string(x)
9766 });
9767 let size = self.size();
9768 let padding_l = self.padding_l();
9769 let padding_r = self.padding_r();
9770 let padding_u = self.padding_u();
9771 let padding_d = self.padding_d();
9772 let base = self.base();
9773 let height_line = self.height_line();
9774 let scale = self.scale().map(|x| {
9775 alloc::boxed::Box::new(x.unpack())
9776 });
9777 let spacing = self.spacing().map(|x| {
9778 alloc::boxed::Box::new(x.unpack())
9779 });
9780 let size_texture_original = self.size_texture_original().map(|x| {
9781 alloc::boxed::Box::new(x.unpack())
9782 });
9783 let name_texture = self.name_texture().map(|x| {
9784 x.iter().map(|s| alloc::string::ToString::to_string(s)).collect()
9785 });
9786 let name_texture_hash = self.name_texture_hash().map(|x| {
9787 x.into_iter().collect()
9788 });
9789 let table_data = self.table_data().map(|x| {
9790 x.iter().map(|t| t.unpack()).collect()
9791 });
9792 FontBitmapT {
9793 name_hash,
9794 name,
9795 name_face,
9796 size,
9797 padding_l,
9798 padding_r,
9799 padding_u,
9800 padding_d,
9801 base,
9802 height_line,
9803 scale,
9804 spacing,
9805 size_texture_original,
9806 name_texture,
9807 name_texture_hash,
9808 table_data,
9809 }
9810 }
9811
9812 #[inline]
9813 pub fn name_hash(&self) -> u32 {
9814 unsafe { self._tab.get::<u32>(FontBitmap::VT_NAME_HASH, Some(0)).unwrap()}
9818 }
9819 #[inline]
9820 pub fn key_compare_less_than(&self, o: &FontBitmap) -> bool {
9821 self.name_hash() < o.name_hash()
9822 }
9823
9824 #[inline]
9825 pub fn key_compare_with_value(&self, val: u32) -> ::core::cmp::Ordering {
9826 let key = self.name_hash();
9827 key.cmp(&val)
9828 }
9829 #[inline]
9830 pub fn name(&self) -> Option<&'a str> {
9831 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(FontBitmap::VT_NAME, None)}
9835 }
9836 #[inline]
9837 pub fn name_face(&self) -> Option<&'a str> {
9838 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(FontBitmap::VT_NAME_FACE, None)}
9842 }
9843 #[inline]
9844 pub fn size(&self) -> u16 {
9845 unsafe { self._tab.get::<u16>(FontBitmap::VT_SIZE, Some(0)).unwrap()}
9849 }
9850 #[inline]
9851 pub fn padding_l(&self) -> u16 {
9852 unsafe { self._tab.get::<u16>(FontBitmap::VT_PADDING_L, Some(0)).unwrap()}
9856 }
9857 #[inline]
9858 pub fn padding_r(&self) -> u16 {
9859 unsafe { self._tab.get::<u16>(FontBitmap::VT_PADDING_R, Some(0)).unwrap()}
9863 }
9864 #[inline]
9865 pub fn padding_u(&self) -> u16 {
9866 unsafe { self._tab.get::<u16>(FontBitmap::VT_PADDING_U, Some(0)).unwrap()}
9870 }
9871 #[inline]
9872 pub fn padding_d(&self) -> u16 {
9873 unsafe { self._tab.get::<u16>(FontBitmap::VT_PADDING_D, Some(0)).unwrap()}
9877 }
9878 #[inline]
9879 pub fn base(&self) -> i16 {
9880 unsafe { self._tab.get::<i16>(FontBitmap::VT_BASE, Some(0)).unwrap()}
9884 }
9885 #[inline]
9886 pub fn height_line(&self) -> i16 {
9887 unsafe { self._tab.get::<i16>(FontBitmap::VT_HEIGHT_LINE, Some(0)).unwrap()}
9891 }
9892 #[inline]
9893 pub fn scale(&self) -> Option<Vec2<'a>> {
9894 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(FontBitmap::VT_SCALE, None)}
9898 }
9899 #[inline]
9900 pub fn spacing(&self) -> Option<Vec2<'a>> {
9901 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(FontBitmap::VT_SPACING, None)}
9905 }
9906 #[inline]
9907 pub fn size_texture_original(&self) -> Option<Vec2<'a>> {
9908 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(FontBitmap::VT_SIZE_TEXTURE_ORIGINAL, None)}
9912 }
9913 #[inline]
9914 pub fn name_texture(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>> {
9915 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>(FontBitmap::VT_NAME_TEXTURE, None)}
9919 }
9920 #[inline]
9921 pub fn name_texture_hash(&self) -> Option<::flatbuffers::Vector<'a, u32>> {
9922 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u32>>>(FontBitmap::VT_NAME_TEXTURE_HASH, None)}
9926 }
9927 #[inline]
9928 pub fn table_data(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<FontGlyphBitmap<'a>>>> {
9929 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<FontGlyphBitmap>>>>(FontBitmap::VT_TABLE_DATA, None)}
9933 }
9934}
9935
9936impl ::flatbuffers::Verifiable for FontBitmap<'_> {
9937 #[inline]
9938 fn run_verifier(
9939 v: &mut ::flatbuffers::Verifier, pos: usize
9940 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
9941 v.visit_table(pos)?
9942 .visit_field::<u32>("name_hash", Self::VT_NAME_HASH, false)?
9943 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
9944 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name_face", Self::VT_NAME_FACE, false)?
9945 .visit_field::<u16>("size", Self::VT_SIZE, false)?
9946 .visit_field::<u16>("padding_l", Self::VT_PADDING_L, false)?
9947 .visit_field::<u16>("padding_r", Self::VT_PADDING_R, false)?
9948 .visit_field::<u16>("padding_u", Self::VT_PADDING_U, false)?
9949 .visit_field::<u16>("padding_d", Self::VT_PADDING_D, false)?
9950 .visit_field::<i16>("base", Self::VT_BASE, false)?
9951 .visit_field::<i16>("height_line", Self::VT_HEIGHT_LINE, false)?
9952 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("scale", Self::VT_SCALE, false)?
9953 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("spacing", Self::VT_SPACING, false)?
9954 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("size_texture_original", Self::VT_SIZE_TEXTURE_ORIGINAL, false)?
9955 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<&'_ str>>>>("name_texture", Self::VT_NAME_TEXTURE, false)?
9956 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u32>>>("name_texture_hash", Self::VT_NAME_TEXTURE_HASH, false)?
9957 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<FontGlyphBitmap>>>>("table_data", Self::VT_TABLE_DATA, false)?
9958 .finish();
9959 Ok(())
9960 }
9961}
9962pub struct FontBitmapArgs<'a> {
9963 pub name_hash: u32,
9964 pub name: Option<::flatbuffers::WIPOffset<&'a str>>,
9965 pub name_face: Option<::flatbuffers::WIPOffset<&'a str>>,
9966 pub size: u16,
9967 pub padding_l: u16,
9968 pub padding_r: u16,
9969 pub padding_u: u16,
9970 pub padding_d: u16,
9971 pub base: i16,
9972 pub height_line: i16,
9973 pub scale: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
9974 pub spacing: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
9975 pub size_texture_original: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
9976 pub name_texture: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>,
9977 pub name_texture_hash: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u32>>>,
9978 pub table_data: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<FontGlyphBitmap<'a>>>>>,
9979}
9980impl<'a> Default for FontBitmapArgs<'a> {
9981 #[inline]
9982 fn default() -> Self {
9983 FontBitmapArgs {
9984 name_hash: 0,
9985 name: None,
9986 name_face: None,
9987 size: 0,
9988 padding_l: 0,
9989 padding_r: 0,
9990 padding_u: 0,
9991 padding_d: 0,
9992 base: 0,
9993 height_line: 0,
9994 scale: None,
9995 spacing: None,
9996 size_texture_original: None,
9997 name_texture: None,
9998 name_texture_hash: None,
9999 table_data: None,
10000 }
10001 }
10002}
10003
10004pub struct FontBitmapBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
10005 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
10006 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
10007}
10008impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> FontBitmapBuilder<'a, 'b, A> {
10009 #[inline]
10010 pub fn add_name_hash(&mut self, name_hash: u32) {
10011 self.fbb_.push_slot::<u32>(FontBitmap::VT_NAME_HASH, name_hash, 0);
10012 }
10013 #[inline]
10014 pub fn add_name(&mut self, name: ::flatbuffers::WIPOffset<&'b str>) {
10015 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(FontBitmap::VT_NAME, name);
10016 }
10017 #[inline]
10018 pub fn add_name_face(&mut self, name_face: ::flatbuffers::WIPOffset<&'b str>) {
10019 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(FontBitmap::VT_NAME_FACE, name_face);
10020 }
10021 #[inline]
10022 pub fn add_size(&mut self, size: u16) {
10023 self.fbb_.push_slot::<u16>(FontBitmap::VT_SIZE, size, 0);
10024 }
10025 #[inline]
10026 pub fn add_padding_l(&mut self, padding_l: u16) {
10027 self.fbb_.push_slot::<u16>(FontBitmap::VT_PADDING_L, padding_l, 0);
10028 }
10029 #[inline]
10030 pub fn add_padding_r(&mut self, padding_r: u16) {
10031 self.fbb_.push_slot::<u16>(FontBitmap::VT_PADDING_R, padding_r, 0);
10032 }
10033 #[inline]
10034 pub fn add_padding_u(&mut self, padding_u: u16) {
10035 self.fbb_.push_slot::<u16>(FontBitmap::VT_PADDING_U, padding_u, 0);
10036 }
10037 #[inline]
10038 pub fn add_padding_d(&mut self, padding_d: u16) {
10039 self.fbb_.push_slot::<u16>(FontBitmap::VT_PADDING_D, padding_d, 0);
10040 }
10041 #[inline]
10042 pub fn add_base(&mut self, base: i16) {
10043 self.fbb_.push_slot::<i16>(FontBitmap::VT_BASE, base, 0);
10044 }
10045 #[inline]
10046 pub fn add_height_line(&mut self, height_line: i16) {
10047 self.fbb_.push_slot::<i16>(FontBitmap::VT_HEIGHT_LINE, height_line, 0);
10048 }
10049 #[inline]
10050 pub fn add_scale(&mut self, scale: ::flatbuffers::WIPOffset<Vec2<'b >>) {
10051 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(FontBitmap::VT_SCALE, scale);
10052 }
10053 #[inline]
10054 pub fn add_spacing(&mut self, spacing: ::flatbuffers::WIPOffset<Vec2<'b >>) {
10055 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(FontBitmap::VT_SPACING, spacing);
10056 }
10057 #[inline]
10058 pub fn add_size_texture_original(&mut self, size_texture_original: ::flatbuffers::WIPOffset<Vec2<'b >>) {
10059 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(FontBitmap::VT_SIZE_TEXTURE_ORIGINAL, size_texture_original);
10060 }
10061 #[inline]
10062 pub fn add_name_texture(&mut self, name_texture: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<&'b str>>>) {
10063 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(FontBitmap::VT_NAME_TEXTURE, name_texture);
10064 }
10065 #[inline]
10066 pub fn add_name_texture_hash(&mut self, name_texture_hash: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , u32>>) {
10067 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(FontBitmap::VT_NAME_TEXTURE_HASH, name_texture_hash);
10068 }
10069 #[inline]
10070 pub fn add_table_data(&mut self, table_data: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<FontGlyphBitmap<'b >>>>) {
10071 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(FontBitmap::VT_TABLE_DATA, table_data);
10072 }
10073 #[inline]
10074 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> FontBitmapBuilder<'a, 'b, A> {
10075 let start = _fbb.start_table();
10076 FontBitmapBuilder {
10077 fbb_: _fbb,
10078 start_: start,
10079 }
10080 }
10081 #[inline]
10082 pub fn finish(self) -> ::flatbuffers::WIPOffset<FontBitmap<'a>> {
10083 let o = self.fbb_.end_table(self.start_);
10084 ::flatbuffers::WIPOffset::new(o.value())
10085 }
10086}
10087
10088impl ::core::fmt::Debug for FontBitmap<'_> {
10089 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
10090 let mut ds = f.debug_struct("FontBitmap");
10091 ds.field("name_hash", &self.name_hash());
10092 ds.field("name", &self.name());
10093 ds.field("name_face", &self.name_face());
10094 ds.field("size", &self.size());
10095 ds.field("padding_l", &self.padding_l());
10096 ds.field("padding_r", &self.padding_r());
10097 ds.field("padding_u", &self.padding_u());
10098 ds.field("padding_d", &self.padding_d());
10099 ds.field("base", &self.base());
10100 ds.field("height_line", &self.height_line());
10101 ds.field("scale", &self.scale());
10102 ds.field("spacing", &self.spacing());
10103 ds.field("size_texture_original", &self.size_texture_original());
10104 ds.field("name_texture", &self.name_texture());
10105 ds.field("name_texture_hash", &self.name_texture_hash());
10106 ds.field("table_data", &self.table_data());
10107 ds.finish()
10108 }
10109}
10110#[non_exhaustive]
10111#[derive(Debug, Clone, PartialEq)]
10112pub struct FontBitmapT {
10113 pub name_hash: u32,
10114 pub name: Option<alloc::string::String>,
10115 pub name_face: Option<alloc::string::String>,
10116 pub size: u16,
10117 pub padding_l: u16,
10118 pub padding_r: u16,
10119 pub padding_u: u16,
10120 pub padding_d: u16,
10121 pub base: i16,
10122 pub height_line: i16,
10123 pub scale: Option<alloc::boxed::Box<Vec2T>>,
10124 pub spacing: Option<alloc::boxed::Box<Vec2T>>,
10125 pub size_texture_original: Option<alloc::boxed::Box<Vec2T>>,
10126 pub name_texture: Option<alloc::vec::Vec<alloc::string::String>>,
10127 pub name_texture_hash: Option<alloc::vec::Vec<u32>>,
10128 pub table_data: Option<alloc::vec::Vec<FontGlyphBitmapT>>,
10129}
10130impl Default for FontBitmapT {
10131 fn default() -> Self {
10132 Self {
10133 name_hash: 0,
10134 name: None,
10135 name_face: None,
10136 size: 0,
10137 padding_l: 0,
10138 padding_r: 0,
10139 padding_u: 0,
10140 padding_d: 0,
10141 base: 0,
10142 height_line: 0,
10143 scale: None,
10144 spacing: None,
10145 size_texture_original: None,
10146 name_texture: None,
10147 name_texture_hash: None,
10148 table_data: None,
10149 }
10150 }
10151}
10152impl FontBitmapT {
10153 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
10154 &self,
10155 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
10156 ) -> ::flatbuffers::WIPOffset<FontBitmap<'b>> {
10157 let name_hash = self.name_hash;
10158 let name = self.name.as_ref().map(|x|{
10159 _fbb.create_string(x)
10160 });
10161 let name_face = self.name_face.as_ref().map(|x|{
10162 _fbb.create_string(x)
10163 });
10164 let size = self.size;
10165 let padding_l = self.padding_l;
10166 let padding_r = self.padding_r;
10167 let padding_u = self.padding_u;
10168 let padding_d = self.padding_d;
10169 let base = self.base;
10170 let height_line = self.height_line;
10171 let scale = self.scale.as_ref().map(|x|{
10172 x.pack(_fbb)
10173 });
10174 let spacing = self.spacing.as_ref().map(|x|{
10175 x.pack(_fbb)
10176 });
10177 let size_texture_original = self.size_texture_original.as_ref().map(|x|{
10178 x.pack(_fbb)
10179 });
10180 let name_texture = self.name_texture.as_ref().map(|x|{
10181 let w: alloc::vec::Vec<_> = x.iter().map(|s| _fbb.create_string(s)).collect();_fbb.create_vector(&w)
10182 });
10183 let name_texture_hash = self.name_texture_hash.as_ref().map(|x|{
10184 _fbb.create_vector(x)
10185 });
10186 let table_data = self.table_data.as_ref().map(|x|{
10187 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
10188 });
10189 FontBitmap::create(_fbb, &FontBitmapArgs{
10190 name_hash,
10191 name,
10192 name_face,
10193 size,
10194 padding_l,
10195 padding_r,
10196 padding_u,
10197 padding_d,
10198 base,
10199 height_line,
10200 scale,
10201 spacing,
10202 size_texture_original,
10203 name_texture,
10204 name_texture_hash,
10205 table_data,
10206 })
10207 }
10208}
10209pub enum PartMeshBindingOffset {}
10210#[derive(Copy, Clone, PartialEq)]
10211
10212pub struct PartMeshBinding<'a> {
10213 pub _tab: ::flatbuffers::Table<'a>,
10214}
10215
10216impl<'a> ::flatbuffers::Follow<'a> for PartMeshBinding<'a> {
10217 type Inner = PartMeshBinding<'a>;
10218 #[inline]
10219 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
10220 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
10221 }
10222}
10223
10224impl<'a> PartMeshBinding<'a> {
10225 pub const VT_VERTEX_INFLUENCE_OFFSET: ::flatbuffers::VOffsetT = 4;
10226 pub const VT_INFLUENCE_BONE: ::flatbuffers::VOffsetT = 6;
10227 pub const VT_INFLUENCE_WEIGHT: ::flatbuffers::VOffsetT = 8;
10228 pub const VT_INFLUENCE_COORD_X: ::flatbuffers::VOffsetT = 10;
10229 pub const VT_INFLUENCE_COORD_Y: ::flatbuffers::VOffsetT = 12;
10230
10231 #[inline]
10232 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
10233 PartMeshBinding { _tab: table }
10234 }
10235 #[allow(unused_mut)]
10236 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
10237 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
10238 args: &'args PartMeshBindingArgs<'args>
10239 ) -> ::flatbuffers::WIPOffset<PartMeshBinding<'bldr>> {
10240 let mut builder = PartMeshBindingBuilder::new(_fbb);
10241 if let Some(x) = args.influence_coord_y { builder.add_influence_coord_y(x); }
10242 if let Some(x) = args.influence_coord_x { builder.add_influence_coord_x(x); }
10243 if let Some(x) = args.influence_weight { builder.add_influence_weight(x); }
10244 if let Some(x) = args.influence_bone { builder.add_influence_bone(x); }
10245 if let Some(x) = args.vertex_influence_offset { builder.add_vertex_influence_offset(x); }
10246 builder.finish()
10247 }
10248
10249 pub fn unpack(&self) -> PartMeshBindingT {
10250 let vertex_influence_offset = self.vertex_influence_offset().map(|x| {
10251 x.into_iter().collect()
10252 });
10253 let influence_bone = self.influence_bone().map(|x| {
10254 x.into_iter().collect()
10255 });
10256 let influence_weight = self.influence_weight().map(|x| {
10257 x.into_iter().collect()
10258 });
10259 let influence_coord_x = self.influence_coord_x().map(|x| {
10260 x.into_iter().collect()
10261 });
10262 let influence_coord_y = self.influence_coord_y().map(|x| {
10263 x.into_iter().collect()
10264 });
10265 PartMeshBindingT {
10266 vertex_influence_offset,
10267 influence_bone,
10268 influence_weight,
10269 influence_coord_x,
10270 influence_coord_y,
10271 }
10272 }
10273
10274 #[inline]
10275 pub fn vertex_influence_offset(&self) -> Option<::flatbuffers::Vector<'a, u32>> {
10276 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u32>>>(PartMeshBinding::VT_VERTEX_INFLUENCE_OFFSET, None)}
10280 }
10281 #[inline]
10282 pub fn influence_bone(&self) -> Option<::flatbuffers::Vector<'a, u16>> {
10283 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u16>>>(PartMeshBinding::VT_INFLUENCE_BONE, None)}
10287 }
10288 #[inline]
10289 pub fn influence_weight(&self) -> Option<::flatbuffers::Vector<'a, f32>> {
10290 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, f32>>>(PartMeshBinding::VT_INFLUENCE_WEIGHT, None)}
10294 }
10295 #[inline]
10296 pub fn influence_coord_x(&self) -> Option<::flatbuffers::Vector<'a, f32>> {
10297 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, f32>>>(PartMeshBinding::VT_INFLUENCE_COORD_X, None)}
10301 }
10302 #[inline]
10303 pub fn influence_coord_y(&self) -> Option<::flatbuffers::Vector<'a, f32>> {
10304 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, f32>>>(PartMeshBinding::VT_INFLUENCE_COORD_Y, None)}
10308 }
10309}
10310
10311impl ::flatbuffers::Verifiable for PartMeshBinding<'_> {
10312 #[inline]
10313 fn run_verifier(
10314 v: &mut ::flatbuffers::Verifier, pos: usize
10315 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
10316 v.visit_table(pos)?
10317 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u32>>>("vertex_influence_offset", Self::VT_VERTEX_INFLUENCE_OFFSET, false)?
10318 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u16>>>("influence_bone", Self::VT_INFLUENCE_BONE, false)?
10319 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, f32>>>("influence_weight", Self::VT_INFLUENCE_WEIGHT, false)?
10320 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, f32>>>("influence_coord_x", Self::VT_INFLUENCE_COORD_X, false)?
10321 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, f32>>>("influence_coord_y", Self::VT_INFLUENCE_COORD_Y, false)?
10322 .finish();
10323 Ok(())
10324 }
10325}
10326pub struct PartMeshBindingArgs<'a> {
10327 pub vertex_influence_offset: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u32>>>,
10328 pub influence_bone: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u16>>>,
10329 pub influence_weight: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, f32>>>,
10330 pub influence_coord_x: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, f32>>>,
10331 pub influence_coord_y: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, f32>>>,
10332}
10333impl<'a> Default for PartMeshBindingArgs<'a> {
10334 #[inline]
10335 fn default() -> Self {
10336 PartMeshBindingArgs {
10337 vertex_influence_offset: None,
10338 influence_bone: None,
10339 influence_weight: None,
10340 influence_coord_x: None,
10341 influence_coord_y: None,
10342 }
10343 }
10344}
10345
10346pub struct PartMeshBindingBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
10347 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
10348 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
10349}
10350impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartMeshBindingBuilder<'a, 'b, A> {
10351 #[inline]
10352 pub fn add_vertex_influence_offset(&mut self, vertex_influence_offset: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , u32>>) {
10353 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartMeshBinding::VT_VERTEX_INFLUENCE_OFFSET, vertex_influence_offset);
10354 }
10355 #[inline]
10356 pub fn add_influence_bone(&mut self, influence_bone: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , u16>>) {
10357 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartMeshBinding::VT_INFLUENCE_BONE, influence_bone);
10358 }
10359 #[inline]
10360 pub fn add_influence_weight(&mut self, influence_weight: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , f32>>) {
10361 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartMeshBinding::VT_INFLUENCE_WEIGHT, influence_weight);
10362 }
10363 #[inline]
10364 pub fn add_influence_coord_x(&mut self, influence_coord_x: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , f32>>) {
10365 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartMeshBinding::VT_INFLUENCE_COORD_X, influence_coord_x);
10366 }
10367 #[inline]
10368 pub fn add_influence_coord_y(&mut self, influence_coord_y: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , f32>>) {
10369 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartMeshBinding::VT_INFLUENCE_COORD_Y, influence_coord_y);
10370 }
10371 #[inline]
10372 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartMeshBindingBuilder<'a, 'b, A> {
10373 let start = _fbb.start_table();
10374 PartMeshBindingBuilder {
10375 fbb_: _fbb,
10376 start_: start,
10377 }
10378 }
10379 #[inline]
10380 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartMeshBinding<'a>> {
10381 let o = self.fbb_.end_table(self.start_);
10382 ::flatbuffers::WIPOffset::new(o.value())
10383 }
10384}
10385
10386impl ::core::fmt::Debug for PartMeshBinding<'_> {
10387 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
10388 let mut ds = f.debug_struct("PartMeshBinding");
10389 ds.field("vertex_influence_offset", &self.vertex_influence_offset());
10390 ds.field("influence_bone", &self.influence_bone());
10391 ds.field("influence_weight", &self.influence_weight());
10392 ds.field("influence_coord_x", &self.influence_coord_x());
10393 ds.field("influence_coord_y", &self.influence_coord_y());
10394 ds.finish()
10395 }
10396}
10397#[non_exhaustive]
10398#[derive(Debug, Clone, PartialEq)]
10399pub struct PartMeshBindingT {
10400 pub vertex_influence_offset: Option<alloc::vec::Vec<u32>>,
10401 pub influence_bone: Option<alloc::vec::Vec<u16>>,
10402 pub influence_weight: Option<alloc::vec::Vec<f32>>,
10403 pub influence_coord_x: Option<alloc::vec::Vec<f32>>,
10404 pub influence_coord_y: Option<alloc::vec::Vec<f32>>,
10405}
10406impl Default for PartMeshBindingT {
10407 fn default() -> Self {
10408 Self {
10409 vertex_influence_offset: None,
10410 influence_bone: None,
10411 influence_weight: None,
10412 influence_coord_x: None,
10413 influence_coord_y: None,
10414 }
10415 }
10416}
10417impl PartMeshBindingT {
10418 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
10419 &self,
10420 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
10421 ) -> ::flatbuffers::WIPOffset<PartMeshBinding<'b>> {
10422 let vertex_influence_offset = self.vertex_influence_offset.as_ref().map(|x|{
10423 _fbb.create_vector(x)
10424 });
10425 let influence_bone = self.influence_bone.as_ref().map(|x|{
10426 _fbb.create_vector(x)
10427 });
10428 let influence_weight = self.influence_weight.as_ref().map(|x|{
10429 _fbb.create_vector(x)
10430 });
10431 let influence_coord_x = self.influence_coord_x.as_ref().map(|x|{
10432 _fbb.create_vector(x)
10433 });
10434 let influence_coord_y = self.influence_coord_y.as_ref().map(|x|{
10435 _fbb.create_vector(x)
10436 });
10437 PartMeshBinding::create(_fbb, &PartMeshBindingArgs{
10438 vertex_influence_offset,
10439 influence_bone,
10440 influence_weight,
10441 influence_coord_x,
10442 influence_coord_y,
10443 })
10444 }
10445}
10446pub enum PartAttributeCellOffset {}
10447#[derive(Copy, Clone, PartialEq)]
10448
10449pub struct PartAttributeCell<'a> {
10450 pub _tab: ::flatbuffers::Table<'a>,
10451}
10452
10453impl<'a> ::flatbuffers::Follow<'a> for PartAttributeCell<'a> {
10454 type Inner = PartAttributeCell<'a>;
10455 #[inline]
10456 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
10457 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
10458 }
10459}
10460
10461impl<'a> PartAttributeCell<'a> {
10462 pub const VT_CELLMAP_NAME_HASH: ::flatbuffers::VOffsetT = 4;
10463 pub const VT_NAME_HASH: ::flatbuffers::VOffsetT = 6;
10464
10465 #[inline]
10466 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
10467 PartAttributeCell { _tab: table }
10468 }
10469 #[allow(unused_mut)]
10470 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
10471 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
10472 args: &'args PartAttributeCellArgs
10473 ) -> ::flatbuffers::WIPOffset<PartAttributeCell<'bldr>> {
10474 let mut builder = PartAttributeCellBuilder::new(_fbb);
10475 builder.add_name_hash(args.name_hash);
10476 builder.add_cellmap_name_hash(args.cellmap_name_hash);
10477 builder.finish()
10478 }
10479
10480 pub fn unpack(&self) -> PartAttributeCellT {
10481 let cellmap_name_hash = self.cellmap_name_hash();
10482 let name_hash = self.name_hash();
10483 PartAttributeCellT {
10484 cellmap_name_hash,
10485 name_hash,
10486 }
10487 }
10488
10489 #[inline]
10490 pub fn cellmap_name_hash(&self) -> u32 {
10491 unsafe { self._tab.get::<u32>(PartAttributeCell::VT_CELLMAP_NAME_HASH, Some(0)).unwrap()}
10495 }
10496 #[inline]
10497 pub fn name_hash(&self) -> u32 {
10498 unsafe { self._tab.get::<u32>(PartAttributeCell::VT_NAME_HASH, Some(0)).unwrap()}
10502 }
10503}
10504
10505impl ::flatbuffers::Verifiable for PartAttributeCell<'_> {
10506 #[inline]
10507 fn run_verifier(
10508 v: &mut ::flatbuffers::Verifier, pos: usize
10509 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
10510 v.visit_table(pos)?
10511 .visit_field::<u32>("cellmap_name_hash", Self::VT_CELLMAP_NAME_HASH, false)?
10512 .visit_field::<u32>("name_hash", Self::VT_NAME_HASH, false)?
10513 .finish();
10514 Ok(())
10515 }
10516}
10517pub struct PartAttributeCellArgs {
10518 pub cellmap_name_hash: u32,
10519 pub name_hash: u32,
10520}
10521impl<'a> Default for PartAttributeCellArgs {
10522 #[inline]
10523 fn default() -> Self {
10524 PartAttributeCellArgs {
10525 cellmap_name_hash: 0,
10526 name_hash: 0,
10527 }
10528 }
10529}
10530
10531pub struct PartAttributeCellBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
10532 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
10533 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
10534}
10535impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartAttributeCellBuilder<'a, 'b, A> {
10536 #[inline]
10537 pub fn add_cellmap_name_hash(&mut self, cellmap_name_hash: u32) {
10538 self.fbb_.push_slot::<u32>(PartAttributeCell::VT_CELLMAP_NAME_HASH, cellmap_name_hash, 0);
10539 }
10540 #[inline]
10541 pub fn add_name_hash(&mut self, name_hash: u32) {
10542 self.fbb_.push_slot::<u32>(PartAttributeCell::VT_NAME_HASH, name_hash, 0);
10543 }
10544 #[inline]
10545 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartAttributeCellBuilder<'a, 'b, A> {
10546 let start = _fbb.start_table();
10547 PartAttributeCellBuilder {
10548 fbb_: _fbb,
10549 start_: start,
10550 }
10551 }
10552 #[inline]
10553 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartAttributeCell<'a>> {
10554 let o = self.fbb_.end_table(self.start_);
10555 ::flatbuffers::WIPOffset::new(o.value())
10556 }
10557}
10558
10559impl ::core::fmt::Debug for PartAttributeCell<'_> {
10560 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
10561 let mut ds = f.debug_struct("PartAttributeCell");
10562 ds.field("cellmap_name_hash", &self.cellmap_name_hash());
10563 ds.field("name_hash", &self.name_hash());
10564 ds.finish()
10565 }
10566}
10567#[non_exhaustive]
10568#[derive(Debug, Clone, PartialEq)]
10569pub struct PartAttributeCellT {
10570 pub cellmap_name_hash: u32,
10571 pub name_hash: u32,
10572}
10573impl Default for PartAttributeCellT {
10574 fn default() -> Self {
10575 Self {
10576 cellmap_name_hash: 0,
10577 name_hash: 0,
10578 }
10579 }
10580}
10581impl PartAttributeCellT {
10582 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
10583 &self,
10584 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
10585 ) -> ::flatbuffers::WIPOffset<PartAttributeCell<'b>> {
10586 let cellmap_name_hash = self.cellmap_name_hash;
10587 let name_hash = self.name_hash;
10588 PartAttributeCell::create(_fbb, &PartAttributeCellArgs{
10589 cellmap_name_hash,
10590 name_hash,
10591 })
10592 }
10593}
10594pub enum SsAttributePartColorKeyValueColorOffset {}
10595#[derive(Copy, Clone, PartialEq)]
10596
10597pub struct SsAttributePartColorKeyValueColor<'a> {
10598 pub _tab: ::flatbuffers::Table<'a>,
10599}
10600
10601impl<'a> ::flatbuffers::Follow<'a> for SsAttributePartColorKeyValueColor<'a> {
10602 type Inner = SsAttributePartColorKeyValueColor<'a>;
10603 #[inline]
10604 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
10605 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
10606 }
10607}
10608
10609impl<'a> SsAttributePartColorKeyValueColor<'a> {
10610 pub const VT_RGBA: ::flatbuffers::VOffsetT = 4;
10611 pub const VT_RATE: ::flatbuffers::VOffsetT = 6;
10612
10613 #[inline]
10614 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
10615 SsAttributePartColorKeyValueColor { _tab: table }
10616 }
10617 #[allow(unused_mut)]
10618 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
10619 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
10620 args: &'args SsAttributePartColorKeyValueColorArgs<'args>
10621 ) -> ::flatbuffers::WIPOffset<SsAttributePartColorKeyValueColor<'bldr>> {
10622 let mut builder = SsAttributePartColorKeyValueColorBuilder::new(_fbb);
10623 builder.add_rate(args.rate);
10624 if let Some(x) = args.rgba { builder.add_rgba(x); }
10625 builder.finish()
10626 }
10627
10628 pub fn unpack(&self) -> SsAttributePartColorKeyValueColorT {
10629 let rgba = self.rgba().map(|x| {
10630 alloc::boxed::Box::new(x.unpack())
10631 });
10632 let rate = self.rate();
10633 SsAttributePartColorKeyValueColorT {
10634 rgba,
10635 rate,
10636 }
10637 }
10638
10639 #[inline]
10640 pub fn rgba(&self) -> Option<U8Color<'a>> {
10641 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<U8Color>>(SsAttributePartColorKeyValueColor::VT_RGBA, None)}
10645 }
10646 #[inline]
10647 pub fn rate(&self) -> f32 {
10648 unsafe { self._tab.get::<f32>(SsAttributePartColorKeyValueColor::VT_RATE, Some(0.0)).unwrap()}
10652 }
10653}
10654
10655impl ::flatbuffers::Verifiable for SsAttributePartColorKeyValueColor<'_> {
10656 #[inline]
10657 fn run_verifier(
10658 v: &mut ::flatbuffers::Verifier, pos: usize
10659 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
10660 v.visit_table(pos)?
10661 .visit_field::<::flatbuffers::ForwardsUOffset<U8Color>>("rgba", Self::VT_RGBA, false)?
10662 .visit_field::<f32>("rate", Self::VT_RATE, false)?
10663 .finish();
10664 Ok(())
10665 }
10666}
10667pub struct SsAttributePartColorKeyValueColorArgs<'a> {
10668 pub rgba: Option<::flatbuffers::WIPOffset<U8Color<'a>>>,
10669 pub rate: f32,
10670}
10671impl<'a> Default for SsAttributePartColorKeyValueColorArgs<'a> {
10672 #[inline]
10673 fn default() -> Self {
10674 SsAttributePartColorKeyValueColorArgs {
10675 rgba: None,
10676 rate: 0.0,
10677 }
10678 }
10679}
10680
10681pub struct SsAttributePartColorKeyValueColorBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
10682 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
10683 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
10684}
10685impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> SsAttributePartColorKeyValueColorBuilder<'a, 'b, A> {
10686 #[inline]
10687 pub fn add_rgba(&mut self, rgba: ::flatbuffers::WIPOffset<U8Color<'b >>) {
10688 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<U8Color>>(SsAttributePartColorKeyValueColor::VT_RGBA, rgba);
10689 }
10690 #[inline]
10691 pub fn add_rate(&mut self, rate: f32) {
10692 self.fbb_.push_slot::<f32>(SsAttributePartColorKeyValueColor::VT_RATE, rate, 0.0);
10693 }
10694 #[inline]
10695 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> SsAttributePartColorKeyValueColorBuilder<'a, 'b, A> {
10696 let start = _fbb.start_table();
10697 SsAttributePartColorKeyValueColorBuilder {
10698 fbb_: _fbb,
10699 start_: start,
10700 }
10701 }
10702 #[inline]
10703 pub fn finish(self) -> ::flatbuffers::WIPOffset<SsAttributePartColorKeyValueColor<'a>> {
10704 let o = self.fbb_.end_table(self.start_);
10705 ::flatbuffers::WIPOffset::new(o.value())
10706 }
10707}
10708
10709impl ::core::fmt::Debug for SsAttributePartColorKeyValueColor<'_> {
10710 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
10711 let mut ds = f.debug_struct("SsAttributePartColorKeyValueColor");
10712 ds.field("rgba", &self.rgba());
10713 ds.field("rate", &self.rate());
10714 ds.finish()
10715 }
10716}
10717#[non_exhaustive]
10718#[derive(Debug, Clone, PartialEq)]
10719pub struct SsAttributePartColorKeyValueColorT {
10720 pub rgba: Option<alloc::boxed::Box<U8ColorT>>,
10721 pub rate: f32,
10722}
10723impl Default for SsAttributePartColorKeyValueColorT {
10724 fn default() -> Self {
10725 Self {
10726 rgba: None,
10727 rate: 0.0,
10728 }
10729 }
10730}
10731impl SsAttributePartColorKeyValueColorT {
10732 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
10733 &self,
10734 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
10735 ) -> ::flatbuffers::WIPOffset<SsAttributePartColorKeyValueColor<'b>> {
10736 let rgba = self.rgba.as_ref().map(|x|{
10737 x.pack(_fbb)
10738 });
10739 let rate = self.rate;
10740 SsAttributePartColorKeyValueColor::create(_fbb, &SsAttributePartColorKeyValueColorArgs{
10741 rgba,
10742 rate,
10743 })
10744 }
10745}
10746pub enum PartAttributePartColorOffset {}
10747#[derive(Copy, Clone, PartialEq)]
10748
10749pub struct PartAttributePartColor<'a> {
10750 pub _tab: ::flatbuffers::Table<'a>,
10751}
10752
10753impl<'a> ::flatbuffers::Follow<'a> for PartAttributePartColor<'a> {
10754 type Inner = PartAttributePartColor<'a>;
10755 #[inline]
10756 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
10757 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
10758 }
10759}
10760
10761impl<'a> PartAttributePartColor<'a> {
10762 pub const VT_BLEND_TYPE: ::flatbuffers::VOffsetT = 4;
10763 pub const VT_LT: ::flatbuffers::VOffsetT = 6;
10764 pub const VT_RT: ::flatbuffers::VOffsetT = 8;
10765 pub const VT_LB: ::flatbuffers::VOffsetT = 10;
10766 pub const VT_RB: ::flatbuffers::VOffsetT = 12;
10767
10768 #[inline]
10769 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
10770 PartAttributePartColor { _tab: table }
10771 }
10772 #[allow(unused_mut)]
10773 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
10774 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
10775 args: &'args PartAttributePartColorArgs<'args>
10776 ) -> ::flatbuffers::WIPOffset<PartAttributePartColor<'bldr>> {
10777 let mut builder = PartAttributePartColorBuilder::new(_fbb);
10778 if let Some(x) = args.rb { builder.add_rb(x); }
10779 if let Some(x) = args.lb { builder.add_lb(x); }
10780 if let Some(x) = args.rt { builder.add_rt(x); }
10781 if let Some(x) = args.lt { builder.add_lt(x); }
10782 builder.add_blend_type(args.blend_type);
10783 builder.finish()
10784 }
10785
10786 pub fn unpack(&self) -> PartAttributePartColorT {
10787 let blend_type = self.blend_type();
10788 let lt = self.lt().map(|x| {
10789 alloc::boxed::Box::new(x.unpack())
10790 });
10791 let rt = self.rt().map(|x| {
10792 alloc::boxed::Box::new(x.unpack())
10793 });
10794 let lb = self.lb().map(|x| {
10795 alloc::boxed::Box::new(x.unpack())
10796 });
10797 let rb = self.rb().map(|x| {
10798 alloc::boxed::Box::new(x.unpack())
10799 });
10800 PartAttributePartColorT {
10801 blend_type,
10802 lt,
10803 rt,
10804 lb,
10805 rb,
10806 }
10807 }
10808
10809 #[inline]
10810 pub fn blend_type(&self) -> BlendType {
10811 unsafe { self._tab.get::<BlendType>(PartAttributePartColor::VT_BLEND_TYPE, Some(BlendType::Mix)).unwrap()}
10815 }
10816 #[inline]
10817 pub fn lt(&self) -> Option<SsAttributePartColorKeyValueColor<'a>> {
10818 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<SsAttributePartColorKeyValueColor>>(PartAttributePartColor::VT_LT, None)}
10822 }
10823 #[inline]
10824 pub fn rt(&self) -> Option<SsAttributePartColorKeyValueColor<'a>> {
10825 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<SsAttributePartColorKeyValueColor>>(PartAttributePartColor::VT_RT, None)}
10829 }
10830 #[inline]
10831 pub fn lb(&self) -> Option<SsAttributePartColorKeyValueColor<'a>> {
10832 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<SsAttributePartColorKeyValueColor>>(PartAttributePartColor::VT_LB, None)}
10836 }
10837 #[inline]
10838 pub fn rb(&self) -> Option<SsAttributePartColorKeyValueColor<'a>> {
10839 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<SsAttributePartColorKeyValueColor>>(PartAttributePartColor::VT_RB, None)}
10843 }
10844}
10845
10846impl ::flatbuffers::Verifiable for PartAttributePartColor<'_> {
10847 #[inline]
10848 fn run_verifier(
10849 v: &mut ::flatbuffers::Verifier, pos: usize
10850 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
10851 v.visit_table(pos)?
10852 .visit_field::<BlendType>("blend_type", Self::VT_BLEND_TYPE, false)?
10853 .visit_field::<::flatbuffers::ForwardsUOffset<SsAttributePartColorKeyValueColor>>("lt", Self::VT_LT, false)?
10854 .visit_field::<::flatbuffers::ForwardsUOffset<SsAttributePartColorKeyValueColor>>("rt", Self::VT_RT, false)?
10855 .visit_field::<::flatbuffers::ForwardsUOffset<SsAttributePartColorKeyValueColor>>("lb", Self::VT_LB, false)?
10856 .visit_field::<::flatbuffers::ForwardsUOffset<SsAttributePartColorKeyValueColor>>("rb", Self::VT_RB, false)?
10857 .finish();
10858 Ok(())
10859 }
10860}
10861pub struct PartAttributePartColorArgs<'a> {
10862 pub blend_type: BlendType,
10863 pub lt: Option<::flatbuffers::WIPOffset<SsAttributePartColorKeyValueColor<'a>>>,
10864 pub rt: Option<::flatbuffers::WIPOffset<SsAttributePartColorKeyValueColor<'a>>>,
10865 pub lb: Option<::flatbuffers::WIPOffset<SsAttributePartColorKeyValueColor<'a>>>,
10866 pub rb: Option<::flatbuffers::WIPOffset<SsAttributePartColorKeyValueColor<'a>>>,
10867}
10868impl<'a> Default for PartAttributePartColorArgs<'a> {
10869 #[inline]
10870 fn default() -> Self {
10871 PartAttributePartColorArgs {
10872 blend_type: BlendType::Mix,
10873 lt: None,
10874 rt: None,
10875 lb: None,
10876 rb: None,
10877 }
10878 }
10879}
10880
10881pub struct PartAttributePartColorBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
10882 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
10883 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
10884}
10885impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartAttributePartColorBuilder<'a, 'b, A> {
10886 #[inline]
10887 pub fn add_blend_type(&mut self, blend_type: BlendType) {
10888 self.fbb_.push_slot::<BlendType>(PartAttributePartColor::VT_BLEND_TYPE, blend_type, BlendType::Mix);
10889 }
10890 #[inline]
10891 pub fn add_lt(&mut self, lt: ::flatbuffers::WIPOffset<SsAttributePartColorKeyValueColor<'b >>) {
10892 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<SsAttributePartColorKeyValueColor>>(PartAttributePartColor::VT_LT, lt);
10893 }
10894 #[inline]
10895 pub fn add_rt(&mut self, rt: ::flatbuffers::WIPOffset<SsAttributePartColorKeyValueColor<'b >>) {
10896 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<SsAttributePartColorKeyValueColor>>(PartAttributePartColor::VT_RT, rt);
10897 }
10898 #[inline]
10899 pub fn add_lb(&mut self, lb: ::flatbuffers::WIPOffset<SsAttributePartColorKeyValueColor<'b >>) {
10900 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<SsAttributePartColorKeyValueColor>>(PartAttributePartColor::VT_LB, lb);
10901 }
10902 #[inline]
10903 pub fn add_rb(&mut self, rb: ::flatbuffers::WIPOffset<SsAttributePartColorKeyValueColor<'b >>) {
10904 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<SsAttributePartColorKeyValueColor>>(PartAttributePartColor::VT_RB, rb);
10905 }
10906 #[inline]
10907 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartAttributePartColorBuilder<'a, 'b, A> {
10908 let start = _fbb.start_table();
10909 PartAttributePartColorBuilder {
10910 fbb_: _fbb,
10911 start_: start,
10912 }
10913 }
10914 #[inline]
10915 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartAttributePartColor<'a>> {
10916 let o = self.fbb_.end_table(self.start_);
10917 ::flatbuffers::WIPOffset::new(o.value())
10918 }
10919}
10920
10921impl ::core::fmt::Debug for PartAttributePartColor<'_> {
10922 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
10923 let mut ds = f.debug_struct("PartAttributePartColor");
10924 ds.field("blend_type", &self.blend_type());
10925 ds.field("lt", &self.lt());
10926 ds.field("rt", &self.rt());
10927 ds.field("lb", &self.lb());
10928 ds.field("rb", &self.rb());
10929 ds.finish()
10930 }
10931}
10932#[non_exhaustive]
10933#[derive(Debug, Clone, PartialEq)]
10934pub struct PartAttributePartColorT {
10935 pub blend_type: BlendType,
10936 pub lt: Option<alloc::boxed::Box<SsAttributePartColorKeyValueColorT>>,
10937 pub rt: Option<alloc::boxed::Box<SsAttributePartColorKeyValueColorT>>,
10938 pub lb: Option<alloc::boxed::Box<SsAttributePartColorKeyValueColorT>>,
10939 pub rb: Option<alloc::boxed::Box<SsAttributePartColorKeyValueColorT>>,
10940}
10941impl Default for PartAttributePartColorT {
10942 fn default() -> Self {
10943 Self {
10944 blend_type: BlendType::Mix,
10945 lt: None,
10946 rt: None,
10947 lb: None,
10948 rb: None,
10949 }
10950 }
10951}
10952impl PartAttributePartColorT {
10953 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
10954 &self,
10955 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
10956 ) -> ::flatbuffers::WIPOffset<PartAttributePartColor<'b>> {
10957 let blend_type = self.blend_type;
10958 let lt = self.lt.as_ref().map(|x|{
10959 x.pack(_fbb)
10960 });
10961 let rt = self.rt.as_ref().map(|x|{
10962 x.pack(_fbb)
10963 });
10964 let lb = self.lb.as_ref().map(|x|{
10965 x.pack(_fbb)
10966 });
10967 let rb = self.rb.as_ref().map(|x|{
10968 x.pack(_fbb)
10969 });
10970 PartAttributePartColor::create(_fbb, &PartAttributePartColorArgs{
10971 blend_type,
10972 lt,
10973 rt,
10974 lb,
10975 rb,
10976 })
10977 }
10978}
10979pub enum PartAttributeVertexOffset {}
10980#[derive(Copy, Clone, PartialEq)]
10981
10982pub struct PartAttributeVertex<'a> {
10983 pub _tab: ::flatbuffers::Table<'a>,
10984}
10985
10986impl<'a> ::flatbuffers::Follow<'a> for PartAttributeVertex<'a> {
10987 type Inner = PartAttributeVertex<'a>;
10988 #[inline]
10989 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
10990 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
10991 }
10992}
10993
10994impl<'a> PartAttributeVertex<'a> {
10995 pub const VT_LT: ::flatbuffers::VOffsetT = 4;
10996 pub const VT_RT: ::flatbuffers::VOffsetT = 6;
10997 pub const VT_LB: ::flatbuffers::VOffsetT = 8;
10998 pub const VT_RB: ::flatbuffers::VOffsetT = 10;
10999
11000 #[inline]
11001 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
11002 PartAttributeVertex { _tab: table }
11003 }
11004 #[allow(unused_mut)]
11005 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
11006 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
11007 args: &'args PartAttributeVertexArgs<'args>
11008 ) -> ::flatbuffers::WIPOffset<PartAttributeVertex<'bldr>> {
11009 let mut builder = PartAttributeVertexBuilder::new(_fbb);
11010 if let Some(x) = args.rb { builder.add_rb(x); }
11011 if let Some(x) = args.lb { builder.add_lb(x); }
11012 if let Some(x) = args.rt { builder.add_rt(x); }
11013 if let Some(x) = args.lt { builder.add_lt(x); }
11014 builder.finish()
11015 }
11016
11017 pub fn unpack(&self) -> PartAttributeVertexT {
11018 let lt = self.lt().map(|x| {
11019 alloc::boxed::Box::new(x.unpack())
11020 });
11021 let rt = self.rt().map(|x| {
11022 alloc::boxed::Box::new(x.unpack())
11023 });
11024 let lb = self.lb().map(|x| {
11025 alloc::boxed::Box::new(x.unpack())
11026 });
11027 let rb = self.rb().map(|x| {
11028 alloc::boxed::Box::new(x.unpack())
11029 });
11030 PartAttributeVertexT {
11031 lt,
11032 rt,
11033 lb,
11034 rb,
11035 }
11036 }
11037
11038 #[inline]
11039 pub fn lt(&self) -> Option<Vec2<'a>> {
11040 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(PartAttributeVertex::VT_LT, None)}
11044 }
11045 #[inline]
11046 pub fn rt(&self) -> Option<Vec2<'a>> {
11047 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(PartAttributeVertex::VT_RT, None)}
11051 }
11052 #[inline]
11053 pub fn lb(&self) -> Option<Vec2<'a>> {
11054 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(PartAttributeVertex::VT_LB, None)}
11058 }
11059 #[inline]
11060 pub fn rb(&self) -> Option<Vec2<'a>> {
11061 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(PartAttributeVertex::VT_RB, None)}
11065 }
11066}
11067
11068impl ::flatbuffers::Verifiable for PartAttributeVertex<'_> {
11069 #[inline]
11070 fn run_verifier(
11071 v: &mut ::flatbuffers::Verifier, pos: usize
11072 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
11073 v.visit_table(pos)?
11074 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("lt", Self::VT_LT, false)?
11075 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("rt", Self::VT_RT, false)?
11076 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("lb", Self::VT_LB, false)?
11077 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("rb", Self::VT_RB, false)?
11078 .finish();
11079 Ok(())
11080 }
11081}
11082pub struct PartAttributeVertexArgs<'a> {
11083 pub lt: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
11084 pub rt: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
11085 pub lb: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
11086 pub rb: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
11087}
11088impl<'a> Default for PartAttributeVertexArgs<'a> {
11089 #[inline]
11090 fn default() -> Self {
11091 PartAttributeVertexArgs {
11092 lt: None,
11093 rt: None,
11094 lb: None,
11095 rb: None,
11096 }
11097 }
11098}
11099
11100pub struct PartAttributeVertexBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
11101 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
11102 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
11103}
11104impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartAttributeVertexBuilder<'a, 'b, A> {
11105 #[inline]
11106 pub fn add_lt(&mut self, lt: ::flatbuffers::WIPOffset<Vec2<'b >>) {
11107 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(PartAttributeVertex::VT_LT, lt);
11108 }
11109 #[inline]
11110 pub fn add_rt(&mut self, rt: ::flatbuffers::WIPOffset<Vec2<'b >>) {
11111 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(PartAttributeVertex::VT_RT, rt);
11112 }
11113 #[inline]
11114 pub fn add_lb(&mut self, lb: ::flatbuffers::WIPOffset<Vec2<'b >>) {
11115 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(PartAttributeVertex::VT_LB, lb);
11116 }
11117 #[inline]
11118 pub fn add_rb(&mut self, rb: ::flatbuffers::WIPOffset<Vec2<'b >>) {
11119 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(PartAttributeVertex::VT_RB, rb);
11120 }
11121 #[inline]
11122 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartAttributeVertexBuilder<'a, 'b, A> {
11123 let start = _fbb.start_table();
11124 PartAttributeVertexBuilder {
11125 fbb_: _fbb,
11126 start_: start,
11127 }
11128 }
11129 #[inline]
11130 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartAttributeVertex<'a>> {
11131 let o = self.fbb_.end_table(self.start_);
11132 ::flatbuffers::WIPOffset::new(o.value())
11133 }
11134}
11135
11136impl ::core::fmt::Debug for PartAttributeVertex<'_> {
11137 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
11138 let mut ds = f.debug_struct("PartAttributeVertex");
11139 ds.field("lt", &self.lt());
11140 ds.field("rt", &self.rt());
11141 ds.field("lb", &self.lb());
11142 ds.field("rb", &self.rb());
11143 ds.finish()
11144 }
11145}
11146#[non_exhaustive]
11147#[derive(Debug, Clone, PartialEq)]
11148pub struct PartAttributeVertexT {
11149 pub lt: Option<alloc::boxed::Box<Vec2T>>,
11150 pub rt: Option<alloc::boxed::Box<Vec2T>>,
11151 pub lb: Option<alloc::boxed::Box<Vec2T>>,
11152 pub rb: Option<alloc::boxed::Box<Vec2T>>,
11153}
11154impl Default for PartAttributeVertexT {
11155 fn default() -> Self {
11156 Self {
11157 lt: None,
11158 rt: None,
11159 lb: None,
11160 rb: None,
11161 }
11162 }
11163}
11164impl PartAttributeVertexT {
11165 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
11166 &self,
11167 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
11168 ) -> ::flatbuffers::WIPOffset<PartAttributeVertex<'b>> {
11169 let lt = self.lt.as_ref().map(|x|{
11170 x.pack(_fbb)
11171 });
11172 let rt = self.rt.as_ref().map(|x|{
11173 x.pack(_fbb)
11174 });
11175 let lb = self.lb.as_ref().map(|x|{
11176 x.pack(_fbb)
11177 });
11178 let rb = self.rb.as_ref().map(|x|{
11179 x.pack(_fbb)
11180 });
11181 PartAttributeVertex::create(_fbb, &PartAttributeVertexArgs{
11182 lt,
11183 rt,
11184 lb,
11185 rb,
11186 })
11187 }
11188}
11189pub enum PartAttributeInstanceOffset {}
11190#[derive(Copy, Clone, PartialEq)]
11191
11192pub struct PartAttributeInstance<'a> {
11193 pub _tab: ::flatbuffers::Table<'a>,
11194}
11195
11196impl<'a> ::flatbuffers::Follow<'a> for PartAttributeInstance<'a> {
11197 type Inner = PartAttributeInstance<'a>;
11198 #[inline]
11199 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
11200 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
11201 }
11202}
11203
11204impl<'a> PartAttributeInstance<'a> {
11205 pub const VT_PINGPONG: ::flatbuffers::VOffsetT = 4;
11206 pub const VT_INDEPENDENT: ::flatbuffers::VOffsetT = 6;
11207 pub const VT_LOOP_NUM: ::flatbuffers::VOffsetT = 8;
11208 pub const VT_START_LABEL_HASH: ::flatbuffers::VOffsetT = 10;
11209 pub const VT_START_OFFSET: ::flatbuffers::VOffsetT = 12;
11210 pub const VT_END_LABEL_HASH: ::flatbuffers::VOffsetT = 14;
11211 pub const VT_END_OFFSET: ::flatbuffers::VOffsetT = 16;
11212 pub const VT_SPEED: ::flatbuffers::VOffsetT = 18;
11213 pub const VT_REVERSE: ::flatbuffers::VOffsetT = 20;
11214
11215 #[inline]
11216 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
11217 PartAttributeInstance { _tab: table }
11218 }
11219 #[allow(unused_mut)]
11220 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
11221 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
11222 args: &'args PartAttributeInstanceArgs
11223 ) -> ::flatbuffers::WIPOffset<PartAttributeInstance<'bldr>> {
11224 let mut builder = PartAttributeInstanceBuilder::new(_fbb);
11225 builder.add_speed(args.speed);
11226 builder.add_end_offset(args.end_offset);
11227 builder.add_end_label_hash(args.end_label_hash);
11228 builder.add_start_offset(args.start_offset);
11229 builder.add_start_label_hash(args.start_label_hash);
11230 builder.add_loop_num(args.loop_num);
11231 builder.add_reverse(args.reverse);
11232 builder.add_independent(args.independent);
11233 builder.add_pingpong(args.pingpong);
11234 builder.finish()
11235 }
11236
11237 pub fn unpack(&self) -> PartAttributeInstanceT {
11238 let pingpong = self.pingpong();
11239 let independent = self.independent();
11240 let loop_num = self.loop_num();
11241 let start_label_hash = self.start_label_hash();
11242 let start_offset = self.start_offset();
11243 let end_label_hash = self.end_label_hash();
11244 let end_offset = self.end_offset();
11245 let speed = self.speed();
11246 let reverse = self.reverse();
11247 PartAttributeInstanceT {
11248 pingpong,
11249 independent,
11250 loop_num,
11251 start_label_hash,
11252 start_offset,
11253 end_label_hash,
11254 end_offset,
11255 speed,
11256 reverse,
11257 }
11258 }
11259
11260 #[inline]
11261 pub fn pingpong(&self) -> bool {
11262 unsafe { self._tab.get::<bool>(PartAttributeInstance::VT_PINGPONG, Some(false)).unwrap()}
11266 }
11267 #[inline]
11268 pub fn independent(&self) -> bool {
11269 unsafe { self._tab.get::<bool>(PartAttributeInstance::VT_INDEPENDENT, Some(false)).unwrap()}
11273 }
11274 #[inline]
11275 pub fn loop_num(&self) -> i32 {
11276 unsafe { self._tab.get::<i32>(PartAttributeInstance::VT_LOOP_NUM, Some(0)).unwrap()}
11280 }
11281 #[inline]
11282 pub fn start_label_hash(&self) -> u32 {
11283 unsafe { self._tab.get::<u32>(PartAttributeInstance::VT_START_LABEL_HASH, Some(0)).unwrap()}
11287 }
11288 #[inline]
11289 pub fn start_offset(&self) -> i32 {
11290 unsafe { self._tab.get::<i32>(PartAttributeInstance::VT_START_OFFSET, Some(0)).unwrap()}
11294 }
11295 #[inline]
11296 pub fn end_label_hash(&self) -> u32 {
11297 unsafe { self._tab.get::<u32>(PartAttributeInstance::VT_END_LABEL_HASH, Some(0)).unwrap()}
11301 }
11302 #[inline]
11303 pub fn end_offset(&self) -> i32 {
11304 unsafe { self._tab.get::<i32>(PartAttributeInstance::VT_END_OFFSET, Some(0)).unwrap()}
11308 }
11309 #[inline]
11310 pub fn speed(&self) -> f32 {
11311 unsafe { self._tab.get::<f32>(PartAttributeInstance::VT_SPEED, Some(0.0)).unwrap()}
11315 }
11316 #[inline]
11317 pub fn reverse(&self) -> bool {
11318 unsafe { self._tab.get::<bool>(PartAttributeInstance::VT_REVERSE, Some(false)).unwrap()}
11322 }
11323}
11324
11325impl ::flatbuffers::Verifiable for PartAttributeInstance<'_> {
11326 #[inline]
11327 fn run_verifier(
11328 v: &mut ::flatbuffers::Verifier, pos: usize
11329 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
11330 v.visit_table(pos)?
11331 .visit_field::<bool>("pingpong", Self::VT_PINGPONG, false)?
11332 .visit_field::<bool>("independent", Self::VT_INDEPENDENT, false)?
11333 .visit_field::<i32>("loop_num", Self::VT_LOOP_NUM, false)?
11334 .visit_field::<u32>("start_label_hash", Self::VT_START_LABEL_HASH, false)?
11335 .visit_field::<i32>("start_offset", Self::VT_START_OFFSET, false)?
11336 .visit_field::<u32>("end_label_hash", Self::VT_END_LABEL_HASH, false)?
11337 .visit_field::<i32>("end_offset", Self::VT_END_OFFSET, false)?
11338 .visit_field::<f32>("speed", Self::VT_SPEED, false)?
11339 .visit_field::<bool>("reverse", Self::VT_REVERSE, false)?
11340 .finish();
11341 Ok(())
11342 }
11343}
11344pub struct PartAttributeInstanceArgs {
11345 pub pingpong: bool,
11346 pub independent: bool,
11347 pub loop_num: i32,
11348 pub start_label_hash: u32,
11349 pub start_offset: i32,
11350 pub end_label_hash: u32,
11351 pub end_offset: i32,
11352 pub speed: f32,
11353 pub reverse: bool,
11354}
11355impl<'a> Default for PartAttributeInstanceArgs {
11356 #[inline]
11357 fn default() -> Self {
11358 PartAttributeInstanceArgs {
11359 pingpong: false,
11360 independent: false,
11361 loop_num: 0,
11362 start_label_hash: 0,
11363 start_offset: 0,
11364 end_label_hash: 0,
11365 end_offset: 0,
11366 speed: 0.0,
11367 reverse: false,
11368 }
11369 }
11370}
11371
11372pub struct PartAttributeInstanceBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
11373 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
11374 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
11375}
11376impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartAttributeInstanceBuilder<'a, 'b, A> {
11377 #[inline]
11378 pub fn add_pingpong(&mut self, pingpong: bool) {
11379 self.fbb_.push_slot::<bool>(PartAttributeInstance::VT_PINGPONG, pingpong, false);
11380 }
11381 #[inline]
11382 pub fn add_independent(&mut self, independent: bool) {
11383 self.fbb_.push_slot::<bool>(PartAttributeInstance::VT_INDEPENDENT, independent, false);
11384 }
11385 #[inline]
11386 pub fn add_loop_num(&mut self, loop_num: i32) {
11387 self.fbb_.push_slot::<i32>(PartAttributeInstance::VT_LOOP_NUM, loop_num, 0);
11388 }
11389 #[inline]
11390 pub fn add_start_label_hash(&mut self, start_label_hash: u32) {
11391 self.fbb_.push_slot::<u32>(PartAttributeInstance::VT_START_LABEL_HASH, start_label_hash, 0);
11392 }
11393 #[inline]
11394 pub fn add_start_offset(&mut self, start_offset: i32) {
11395 self.fbb_.push_slot::<i32>(PartAttributeInstance::VT_START_OFFSET, start_offset, 0);
11396 }
11397 #[inline]
11398 pub fn add_end_label_hash(&mut self, end_label_hash: u32) {
11399 self.fbb_.push_slot::<u32>(PartAttributeInstance::VT_END_LABEL_HASH, end_label_hash, 0);
11400 }
11401 #[inline]
11402 pub fn add_end_offset(&mut self, end_offset: i32) {
11403 self.fbb_.push_slot::<i32>(PartAttributeInstance::VT_END_OFFSET, end_offset, 0);
11404 }
11405 #[inline]
11406 pub fn add_speed(&mut self, speed: f32) {
11407 self.fbb_.push_slot::<f32>(PartAttributeInstance::VT_SPEED, speed, 0.0);
11408 }
11409 #[inline]
11410 pub fn add_reverse(&mut self, reverse: bool) {
11411 self.fbb_.push_slot::<bool>(PartAttributeInstance::VT_REVERSE, reverse, false);
11412 }
11413 #[inline]
11414 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartAttributeInstanceBuilder<'a, 'b, A> {
11415 let start = _fbb.start_table();
11416 PartAttributeInstanceBuilder {
11417 fbb_: _fbb,
11418 start_: start,
11419 }
11420 }
11421 #[inline]
11422 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartAttributeInstance<'a>> {
11423 let o = self.fbb_.end_table(self.start_);
11424 ::flatbuffers::WIPOffset::new(o.value())
11425 }
11426}
11427
11428impl ::core::fmt::Debug for PartAttributeInstance<'_> {
11429 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
11430 let mut ds = f.debug_struct("PartAttributeInstance");
11431 ds.field("pingpong", &self.pingpong());
11432 ds.field("independent", &self.independent());
11433 ds.field("loop_num", &self.loop_num());
11434 ds.field("start_label_hash", &self.start_label_hash());
11435 ds.field("start_offset", &self.start_offset());
11436 ds.field("end_label_hash", &self.end_label_hash());
11437 ds.field("end_offset", &self.end_offset());
11438 ds.field("speed", &self.speed());
11439 ds.field("reverse", &self.reverse());
11440 ds.finish()
11441 }
11442}
11443#[non_exhaustive]
11444#[derive(Debug, Clone, PartialEq)]
11445pub struct PartAttributeInstanceT {
11446 pub pingpong: bool,
11447 pub independent: bool,
11448 pub loop_num: i32,
11449 pub start_label_hash: u32,
11450 pub start_offset: i32,
11451 pub end_label_hash: u32,
11452 pub end_offset: i32,
11453 pub speed: f32,
11454 pub reverse: bool,
11455}
11456impl Default for PartAttributeInstanceT {
11457 fn default() -> Self {
11458 Self {
11459 pingpong: false,
11460 independent: false,
11461 loop_num: 0,
11462 start_label_hash: 0,
11463 start_offset: 0,
11464 end_label_hash: 0,
11465 end_offset: 0,
11466 speed: 0.0,
11467 reverse: false,
11468 }
11469 }
11470}
11471impl PartAttributeInstanceT {
11472 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
11473 &self,
11474 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
11475 ) -> ::flatbuffers::WIPOffset<PartAttributeInstance<'b>> {
11476 let pingpong = self.pingpong;
11477 let independent = self.independent;
11478 let loop_num = self.loop_num;
11479 let start_label_hash = self.start_label_hash;
11480 let start_offset = self.start_offset;
11481 let end_label_hash = self.end_label_hash;
11482 let end_offset = self.end_offset;
11483 let speed = self.speed;
11484 let reverse = self.reverse;
11485 PartAttributeInstance::create(_fbb, &PartAttributeInstanceArgs{
11486 pingpong,
11487 independent,
11488 loop_num,
11489 start_label_hash,
11490 start_offset,
11491 end_label_hash,
11492 end_offset,
11493 speed,
11494 reverse,
11495 })
11496 }
11497}
11498pub enum PartAttributeEffectOffset {}
11499#[derive(Copy, Clone, PartialEq)]
11500
11501pub struct PartAttributeEffect<'a> {
11502 pub _tab: ::flatbuffers::Table<'a>,
11503}
11504
11505impl<'a> ::flatbuffers::Follow<'a> for PartAttributeEffect<'a> {
11506 type Inner = PartAttributeEffect<'a>;
11507 #[inline]
11508 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
11509 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
11510 }
11511}
11512
11513impl<'a> PartAttributeEffect<'a> {
11514 pub const VT_START_TIME: ::flatbuffers::VOffsetT = 4;
11515 pub const VT_SPEED: ::flatbuffers::VOffsetT = 6;
11516 pub const VT_INDEPENDENT: ::flatbuffers::VOffsetT = 8;
11517
11518 #[inline]
11519 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
11520 PartAttributeEffect { _tab: table }
11521 }
11522 #[allow(unused_mut)]
11523 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
11524 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
11525 args: &'args PartAttributeEffectArgs
11526 ) -> ::flatbuffers::WIPOffset<PartAttributeEffect<'bldr>> {
11527 let mut builder = PartAttributeEffectBuilder::new(_fbb);
11528 builder.add_speed(args.speed);
11529 builder.add_start_time(args.start_time);
11530 builder.add_independent(args.independent);
11531 builder.finish()
11532 }
11533
11534 pub fn unpack(&self) -> PartAttributeEffectT {
11535 let start_time = self.start_time();
11536 let speed = self.speed();
11537 let independent = self.independent();
11538 PartAttributeEffectT {
11539 start_time,
11540 speed,
11541 independent,
11542 }
11543 }
11544
11545 #[inline]
11546 pub fn start_time(&self) -> i32 {
11547 unsafe { self._tab.get::<i32>(PartAttributeEffect::VT_START_TIME, Some(0)).unwrap()}
11551 }
11552 #[inline]
11553 pub fn speed(&self) -> f32 {
11554 unsafe { self._tab.get::<f32>(PartAttributeEffect::VT_SPEED, Some(0.0)).unwrap()}
11558 }
11559 #[inline]
11560 pub fn independent(&self) -> bool {
11561 unsafe { self._tab.get::<bool>(PartAttributeEffect::VT_INDEPENDENT, Some(false)).unwrap()}
11565 }
11566}
11567
11568impl ::flatbuffers::Verifiable for PartAttributeEffect<'_> {
11569 #[inline]
11570 fn run_verifier(
11571 v: &mut ::flatbuffers::Verifier, pos: usize
11572 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
11573 v.visit_table(pos)?
11574 .visit_field::<i32>("start_time", Self::VT_START_TIME, false)?
11575 .visit_field::<f32>("speed", Self::VT_SPEED, false)?
11576 .visit_field::<bool>("independent", Self::VT_INDEPENDENT, false)?
11577 .finish();
11578 Ok(())
11579 }
11580}
11581pub struct PartAttributeEffectArgs {
11582 pub start_time: i32,
11583 pub speed: f32,
11584 pub independent: bool,
11585}
11586impl<'a> Default for PartAttributeEffectArgs {
11587 #[inline]
11588 fn default() -> Self {
11589 PartAttributeEffectArgs {
11590 start_time: 0,
11591 speed: 0.0,
11592 independent: false,
11593 }
11594 }
11595}
11596
11597pub struct PartAttributeEffectBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
11598 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
11599 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
11600}
11601impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartAttributeEffectBuilder<'a, 'b, A> {
11602 #[inline]
11603 pub fn add_start_time(&mut self, start_time: i32) {
11604 self.fbb_.push_slot::<i32>(PartAttributeEffect::VT_START_TIME, start_time, 0);
11605 }
11606 #[inline]
11607 pub fn add_speed(&mut self, speed: f32) {
11608 self.fbb_.push_slot::<f32>(PartAttributeEffect::VT_SPEED, speed, 0.0);
11609 }
11610 #[inline]
11611 pub fn add_independent(&mut self, independent: bool) {
11612 self.fbb_.push_slot::<bool>(PartAttributeEffect::VT_INDEPENDENT, independent, false);
11613 }
11614 #[inline]
11615 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartAttributeEffectBuilder<'a, 'b, A> {
11616 let start = _fbb.start_table();
11617 PartAttributeEffectBuilder {
11618 fbb_: _fbb,
11619 start_: start,
11620 }
11621 }
11622 #[inline]
11623 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartAttributeEffect<'a>> {
11624 let o = self.fbb_.end_table(self.start_);
11625 ::flatbuffers::WIPOffset::new(o.value())
11626 }
11627}
11628
11629impl ::core::fmt::Debug for PartAttributeEffect<'_> {
11630 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
11631 let mut ds = f.debug_struct("PartAttributeEffect");
11632 ds.field("start_time", &self.start_time());
11633 ds.field("speed", &self.speed());
11634 ds.field("independent", &self.independent());
11635 ds.finish()
11636 }
11637}
11638#[non_exhaustive]
11639#[derive(Debug, Clone, PartialEq)]
11640pub struct PartAttributeEffectT {
11641 pub start_time: i32,
11642 pub speed: f32,
11643 pub independent: bool,
11644}
11645impl Default for PartAttributeEffectT {
11646 fn default() -> Self {
11647 Self {
11648 start_time: 0,
11649 speed: 0.0,
11650 independent: false,
11651 }
11652 }
11653}
11654impl PartAttributeEffectT {
11655 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
11656 &self,
11657 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
11658 ) -> ::flatbuffers::WIPOffset<PartAttributeEffect<'b>> {
11659 let start_time = self.start_time;
11660 let speed = self.speed;
11661 let independent = self.independent;
11662 PartAttributeEffect::create(_fbb, &PartAttributeEffectArgs{
11663 start_time,
11664 speed,
11665 independent,
11666 })
11667 }
11668}
11669pub enum PartAttributeDeformOffset {}
11670#[derive(Copy, Clone, PartialEq)]
11671
11672pub struct PartAttributeDeform<'a> {
11673 pub _tab: ::flatbuffers::Table<'a>,
11674}
11675
11676impl<'a> ::flatbuffers::Follow<'a> for PartAttributeDeform<'a> {
11677 type Inner = PartAttributeDeform<'a>;
11678 #[inline]
11679 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
11680 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
11681 }
11682}
11683
11684impl<'a> PartAttributeDeform<'a> {
11685 pub const VT_COORD_X: ::flatbuffers::VOffsetT = 4;
11686 pub const VT_COORD_Y: ::flatbuffers::VOffsetT = 6;
11687 pub const VT_INDEX: ::flatbuffers::VOffsetT = 8;
11688
11689 #[inline]
11690 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
11691 PartAttributeDeform { _tab: table }
11692 }
11693 #[allow(unused_mut)]
11694 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
11695 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
11696 args: &'args PartAttributeDeformArgs<'args>
11697 ) -> ::flatbuffers::WIPOffset<PartAttributeDeform<'bldr>> {
11698 let mut builder = PartAttributeDeformBuilder::new(_fbb);
11699 if let Some(x) = args.index { builder.add_index(x); }
11700 if let Some(x) = args.coord_y { builder.add_coord_y(x); }
11701 if let Some(x) = args.coord_x { builder.add_coord_x(x); }
11702 builder.finish()
11703 }
11704
11705 pub fn unpack(&self) -> PartAttributeDeformT {
11706 let coord_x = self.coord_x().map(|x| {
11707 x.into_iter().collect()
11708 });
11709 let coord_y = self.coord_y().map(|x| {
11710 x.into_iter().collect()
11711 });
11712 let index = self.index().map(|x| {
11713 x.into_iter().collect()
11714 });
11715 PartAttributeDeformT {
11716 coord_x,
11717 coord_y,
11718 index,
11719 }
11720 }
11721
11722 #[inline]
11723 pub fn coord_x(&self) -> Option<::flatbuffers::Vector<'a, f32>> {
11724 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, f32>>>(PartAttributeDeform::VT_COORD_X, None)}
11728 }
11729 #[inline]
11730 pub fn coord_y(&self) -> Option<::flatbuffers::Vector<'a, f32>> {
11731 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, f32>>>(PartAttributeDeform::VT_COORD_Y, None)}
11735 }
11736 #[inline]
11737 pub fn index(&self) -> Option<::flatbuffers::Vector<'a, i16>> {
11738 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, i16>>>(PartAttributeDeform::VT_INDEX, None)}
11742 }
11743}
11744
11745impl ::flatbuffers::Verifiable for PartAttributeDeform<'_> {
11746 #[inline]
11747 fn run_verifier(
11748 v: &mut ::flatbuffers::Verifier, pos: usize
11749 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
11750 v.visit_table(pos)?
11751 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, f32>>>("coord_x", Self::VT_COORD_X, false)?
11752 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, f32>>>("coord_y", Self::VT_COORD_Y, false)?
11753 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, i16>>>("index", Self::VT_INDEX, false)?
11754 .finish();
11755 Ok(())
11756 }
11757}
11758pub struct PartAttributeDeformArgs<'a> {
11759 pub coord_x: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, f32>>>,
11760 pub coord_y: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, f32>>>,
11761 pub index: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, i16>>>,
11762}
11763impl<'a> Default for PartAttributeDeformArgs<'a> {
11764 #[inline]
11765 fn default() -> Self {
11766 PartAttributeDeformArgs {
11767 coord_x: None,
11768 coord_y: None,
11769 index: None,
11770 }
11771 }
11772}
11773
11774pub struct PartAttributeDeformBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
11775 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
11776 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
11777}
11778impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartAttributeDeformBuilder<'a, 'b, A> {
11779 #[inline]
11780 pub fn add_coord_x(&mut self, coord_x: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , f32>>) {
11781 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartAttributeDeform::VT_COORD_X, coord_x);
11782 }
11783 #[inline]
11784 pub fn add_coord_y(&mut self, coord_y: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , f32>>) {
11785 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartAttributeDeform::VT_COORD_Y, coord_y);
11786 }
11787 #[inline]
11788 pub fn add_index(&mut self, index: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , i16>>) {
11789 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartAttributeDeform::VT_INDEX, index);
11790 }
11791 #[inline]
11792 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartAttributeDeformBuilder<'a, 'b, A> {
11793 let start = _fbb.start_table();
11794 PartAttributeDeformBuilder {
11795 fbb_: _fbb,
11796 start_: start,
11797 }
11798 }
11799 #[inline]
11800 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartAttributeDeform<'a>> {
11801 let o = self.fbb_.end_table(self.start_);
11802 ::flatbuffers::WIPOffset::new(o.value())
11803 }
11804}
11805
11806impl ::core::fmt::Debug for PartAttributeDeform<'_> {
11807 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
11808 let mut ds = f.debug_struct("PartAttributeDeform");
11809 ds.field("coord_x", &self.coord_x());
11810 ds.field("coord_y", &self.coord_y());
11811 ds.field("index", &self.index());
11812 ds.finish()
11813 }
11814}
11815#[non_exhaustive]
11816#[derive(Debug, Clone, PartialEq)]
11817pub struct PartAttributeDeformT {
11818 pub coord_x: Option<alloc::vec::Vec<f32>>,
11819 pub coord_y: Option<alloc::vec::Vec<f32>>,
11820 pub index: Option<alloc::vec::Vec<i16>>,
11821}
11822impl Default for PartAttributeDeformT {
11823 fn default() -> Self {
11824 Self {
11825 coord_x: None,
11826 coord_y: None,
11827 index: None,
11828 }
11829 }
11830}
11831impl PartAttributeDeformT {
11832 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
11833 &self,
11834 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
11835 ) -> ::flatbuffers::WIPOffset<PartAttributeDeform<'b>> {
11836 let coord_x = self.coord_x.as_ref().map(|x|{
11837 _fbb.create_vector(x)
11838 });
11839 let coord_y = self.coord_y.as_ref().map(|x|{
11840 _fbb.create_vector(x)
11841 });
11842 let index = self.index.as_ref().map(|x|{
11843 _fbb.create_vector(x)
11844 });
11845 PartAttributeDeform::create(_fbb, &PartAttributeDeformArgs{
11846 coord_x,
11847 coord_y,
11848 index,
11849 })
11850 }
11851}
11852pub enum PartAttributeShaderOffset {}
11853#[derive(Copy, Clone, PartialEq)]
11854
11855pub struct PartAttributeShader<'a> {
11856 pub _tab: ::flatbuffers::Table<'a>,
11857}
11858
11859impl<'a> ::flatbuffers::Follow<'a> for PartAttributeShader<'a> {
11860 type Inner = PartAttributeShader<'a>;
11861 #[inline]
11862 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
11863 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
11864 }
11865}
11866
11867impl<'a> PartAttributeShader<'a> {
11868 pub const VT_ID: ::flatbuffers::VOffsetT = 4;
11869 pub const VT_ID_HASH: ::flatbuffers::VOffsetT = 6;
11870 pub const VT_PARAM0: ::flatbuffers::VOffsetT = 8;
11871 pub const VT_PARAM1: ::flatbuffers::VOffsetT = 10;
11872 pub const VT_PARAM2: ::flatbuffers::VOffsetT = 12;
11873 pub const VT_PARAM3: ::flatbuffers::VOffsetT = 14;
11874 pub const VT_PARAM4: ::flatbuffers::VOffsetT = 16;
11875 pub const VT_PARAM5: ::flatbuffers::VOffsetT = 18;
11876 pub const VT_PARAM6: ::flatbuffers::VOffsetT = 20;
11877 pub const VT_PARAM7: ::flatbuffers::VOffsetT = 22;
11878 pub const VT_MAP0_CELLMAP_NAME_HASH: ::flatbuffers::VOffsetT = 24;
11879 pub const VT_MAP0_NAME_HASH: ::flatbuffers::VOffsetT = 26;
11880 pub const VT_MAP1_CELLMAP_NAME_HASH: ::flatbuffers::VOffsetT = 28;
11881 pub const VT_MAP1_NAME_HASH: ::flatbuffers::VOffsetT = 30;
11882
11883 #[inline]
11884 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
11885 PartAttributeShader { _tab: table }
11886 }
11887 #[allow(unused_mut)]
11888 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
11889 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
11890 args: &'args PartAttributeShaderArgs<'args>
11891 ) -> ::flatbuffers::WIPOffset<PartAttributeShader<'bldr>> {
11892 let mut builder = PartAttributeShaderBuilder::new(_fbb);
11893 builder.add_map1_name_hash(args.map1_name_hash);
11894 builder.add_map1_cellmap_name_hash(args.map1_cellmap_name_hash);
11895 builder.add_map0_name_hash(args.map0_name_hash);
11896 builder.add_map0_cellmap_name_hash(args.map0_cellmap_name_hash);
11897 builder.add_param7(args.param7);
11898 builder.add_param6(args.param6);
11899 builder.add_param5(args.param5);
11900 builder.add_param4(args.param4);
11901 builder.add_param3(args.param3);
11902 builder.add_param2(args.param2);
11903 builder.add_param1(args.param1);
11904 builder.add_param0(args.param0);
11905 builder.add_id_hash(args.id_hash);
11906 if let Some(x) = args.id { builder.add_id(x); }
11907 builder.finish()
11908 }
11909
11910 pub fn unpack(&self) -> PartAttributeShaderT {
11911 let id = {
11912 let x = self.id();
11913 alloc::string::ToString::to_string(x)
11914 };
11915 let id_hash = self.id_hash();
11916 let param0 = self.param0();
11917 let param1 = self.param1();
11918 let param2 = self.param2();
11919 let param3 = self.param3();
11920 let param4 = self.param4();
11921 let param5 = self.param5();
11922 let param6 = self.param6();
11923 let param7 = self.param7();
11924 let map0_cellmap_name_hash = self.map0_cellmap_name_hash();
11925 let map0_name_hash = self.map0_name_hash();
11926 let map1_cellmap_name_hash = self.map1_cellmap_name_hash();
11927 let map1_name_hash = self.map1_name_hash();
11928 PartAttributeShaderT {
11929 id,
11930 id_hash,
11931 param0,
11932 param1,
11933 param2,
11934 param3,
11935 param4,
11936 param5,
11937 param6,
11938 param7,
11939 map0_cellmap_name_hash,
11940 map0_name_hash,
11941 map1_cellmap_name_hash,
11942 map1_name_hash,
11943 }
11944 }
11945
11946 #[inline]
11947 pub fn id(&self) -> &'a str {
11948 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(PartAttributeShader::VT_ID, None).unwrap()}
11952 }
11953 #[inline]
11954 pub fn id_hash(&self) -> u32 {
11955 unsafe { self._tab.get::<u32>(PartAttributeShader::VT_ID_HASH, Some(0)).unwrap()}
11959 }
11960 #[inline]
11961 pub fn param0(&self) -> f32 {
11962 unsafe { self._tab.get::<f32>(PartAttributeShader::VT_PARAM0, Some(0.0)).unwrap()}
11966 }
11967 #[inline]
11968 pub fn param1(&self) -> f32 {
11969 unsafe { self._tab.get::<f32>(PartAttributeShader::VT_PARAM1, Some(0.0)).unwrap()}
11973 }
11974 #[inline]
11975 pub fn param2(&self) -> f32 {
11976 unsafe { self._tab.get::<f32>(PartAttributeShader::VT_PARAM2, Some(0.0)).unwrap()}
11980 }
11981 #[inline]
11982 pub fn param3(&self) -> f32 {
11983 unsafe { self._tab.get::<f32>(PartAttributeShader::VT_PARAM3, Some(0.0)).unwrap()}
11987 }
11988 #[inline]
11989 pub fn param4(&self) -> f32 {
11990 unsafe { self._tab.get::<f32>(PartAttributeShader::VT_PARAM4, Some(0.0)).unwrap()}
11994 }
11995 #[inline]
11996 pub fn param5(&self) -> f32 {
11997 unsafe { self._tab.get::<f32>(PartAttributeShader::VT_PARAM5, Some(0.0)).unwrap()}
12001 }
12002 #[inline]
12003 pub fn param6(&self) -> f32 {
12004 unsafe { self._tab.get::<f32>(PartAttributeShader::VT_PARAM6, Some(0.0)).unwrap()}
12008 }
12009 #[inline]
12010 pub fn param7(&self) -> f32 {
12011 unsafe { self._tab.get::<f32>(PartAttributeShader::VT_PARAM7, Some(0.0)).unwrap()}
12015 }
12016 #[inline]
12017 pub fn map0_cellmap_name_hash(&self) -> u32 {
12018 unsafe { self._tab.get::<u32>(PartAttributeShader::VT_MAP0_CELLMAP_NAME_HASH, Some(0)).unwrap()}
12022 }
12023 #[inline]
12024 pub fn map0_name_hash(&self) -> u32 {
12025 unsafe { self._tab.get::<u32>(PartAttributeShader::VT_MAP0_NAME_HASH, Some(0)).unwrap()}
12029 }
12030 #[inline]
12031 pub fn map1_cellmap_name_hash(&self) -> u32 {
12032 unsafe { self._tab.get::<u32>(PartAttributeShader::VT_MAP1_CELLMAP_NAME_HASH, Some(0)).unwrap()}
12036 }
12037 #[inline]
12038 pub fn map1_name_hash(&self) -> u32 {
12039 unsafe { self._tab.get::<u32>(PartAttributeShader::VT_MAP1_NAME_HASH, Some(0)).unwrap()}
12043 }
12044}
12045
12046impl ::flatbuffers::Verifiable for PartAttributeShader<'_> {
12047 #[inline]
12048 fn run_verifier(
12049 v: &mut ::flatbuffers::Verifier, pos: usize
12050 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
12051 v.visit_table(pos)?
12052 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("id", Self::VT_ID, true)?
12053 .visit_field::<u32>("id_hash", Self::VT_ID_HASH, false)?
12054 .visit_field::<f32>("param0", Self::VT_PARAM0, false)?
12055 .visit_field::<f32>("param1", Self::VT_PARAM1, false)?
12056 .visit_field::<f32>("param2", Self::VT_PARAM2, false)?
12057 .visit_field::<f32>("param3", Self::VT_PARAM3, false)?
12058 .visit_field::<f32>("param4", Self::VT_PARAM4, false)?
12059 .visit_field::<f32>("param5", Self::VT_PARAM5, false)?
12060 .visit_field::<f32>("param6", Self::VT_PARAM6, false)?
12061 .visit_field::<f32>("param7", Self::VT_PARAM7, false)?
12062 .visit_field::<u32>("map0_cellmap_name_hash", Self::VT_MAP0_CELLMAP_NAME_HASH, false)?
12063 .visit_field::<u32>("map0_name_hash", Self::VT_MAP0_NAME_HASH, false)?
12064 .visit_field::<u32>("map1_cellmap_name_hash", Self::VT_MAP1_CELLMAP_NAME_HASH, false)?
12065 .visit_field::<u32>("map1_name_hash", Self::VT_MAP1_NAME_HASH, false)?
12066 .finish();
12067 Ok(())
12068 }
12069}
12070pub struct PartAttributeShaderArgs<'a> {
12071 pub id: Option<::flatbuffers::WIPOffset<&'a str>>,
12072 pub id_hash: u32,
12073 pub param0: f32,
12074 pub param1: f32,
12075 pub param2: f32,
12076 pub param3: f32,
12077 pub param4: f32,
12078 pub param5: f32,
12079 pub param6: f32,
12080 pub param7: f32,
12081 pub map0_cellmap_name_hash: u32,
12082 pub map0_name_hash: u32,
12083 pub map1_cellmap_name_hash: u32,
12084 pub map1_name_hash: u32,
12085}
12086impl<'a> Default for PartAttributeShaderArgs<'a> {
12087 #[inline]
12088 fn default() -> Self {
12089 PartAttributeShaderArgs {
12090 id: None, id_hash: 0,
12092 param0: 0.0,
12093 param1: 0.0,
12094 param2: 0.0,
12095 param3: 0.0,
12096 param4: 0.0,
12097 param5: 0.0,
12098 param6: 0.0,
12099 param7: 0.0,
12100 map0_cellmap_name_hash: 0,
12101 map0_name_hash: 0,
12102 map1_cellmap_name_hash: 0,
12103 map1_name_hash: 0,
12104 }
12105 }
12106}
12107
12108pub struct PartAttributeShaderBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
12109 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
12110 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
12111}
12112impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartAttributeShaderBuilder<'a, 'b, A> {
12113 #[inline]
12114 pub fn add_id(&mut self, id: ::flatbuffers::WIPOffset<&'b str>) {
12115 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartAttributeShader::VT_ID, id);
12116 }
12117 #[inline]
12118 pub fn add_id_hash(&mut self, id_hash: u32) {
12119 self.fbb_.push_slot::<u32>(PartAttributeShader::VT_ID_HASH, id_hash, 0);
12120 }
12121 #[inline]
12122 pub fn add_param0(&mut self, param0: f32) {
12123 self.fbb_.push_slot::<f32>(PartAttributeShader::VT_PARAM0, param0, 0.0);
12124 }
12125 #[inline]
12126 pub fn add_param1(&mut self, param1: f32) {
12127 self.fbb_.push_slot::<f32>(PartAttributeShader::VT_PARAM1, param1, 0.0);
12128 }
12129 #[inline]
12130 pub fn add_param2(&mut self, param2: f32) {
12131 self.fbb_.push_slot::<f32>(PartAttributeShader::VT_PARAM2, param2, 0.0);
12132 }
12133 #[inline]
12134 pub fn add_param3(&mut self, param3: f32) {
12135 self.fbb_.push_slot::<f32>(PartAttributeShader::VT_PARAM3, param3, 0.0);
12136 }
12137 #[inline]
12138 pub fn add_param4(&mut self, param4: f32) {
12139 self.fbb_.push_slot::<f32>(PartAttributeShader::VT_PARAM4, param4, 0.0);
12140 }
12141 #[inline]
12142 pub fn add_param5(&mut self, param5: f32) {
12143 self.fbb_.push_slot::<f32>(PartAttributeShader::VT_PARAM5, param5, 0.0);
12144 }
12145 #[inline]
12146 pub fn add_param6(&mut self, param6: f32) {
12147 self.fbb_.push_slot::<f32>(PartAttributeShader::VT_PARAM6, param6, 0.0);
12148 }
12149 #[inline]
12150 pub fn add_param7(&mut self, param7: f32) {
12151 self.fbb_.push_slot::<f32>(PartAttributeShader::VT_PARAM7, param7, 0.0);
12152 }
12153 #[inline]
12154 pub fn add_map0_cellmap_name_hash(&mut self, map0_cellmap_name_hash: u32) {
12155 self.fbb_.push_slot::<u32>(PartAttributeShader::VT_MAP0_CELLMAP_NAME_HASH, map0_cellmap_name_hash, 0);
12156 }
12157 #[inline]
12158 pub fn add_map0_name_hash(&mut self, map0_name_hash: u32) {
12159 self.fbb_.push_slot::<u32>(PartAttributeShader::VT_MAP0_NAME_HASH, map0_name_hash, 0);
12160 }
12161 #[inline]
12162 pub fn add_map1_cellmap_name_hash(&mut self, map1_cellmap_name_hash: u32) {
12163 self.fbb_.push_slot::<u32>(PartAttributeShader::VT_MAP1_CELLMAP_NAME_HASH, map1_cellmap_name_hash, 0);
12164 }
12165 #[inline]
12166 pub fn add_map1_name_hash(&mut self, map1_name_hash: u32) {
12167 self.fbb_.push_slot::<u32>(PartAttributeShader::VT_MAP1_NAME_HASH, map1_name_hash, 0);
12168 }
12169 #[inline]
12170 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartAttributeShaderBuilder<'a, 'b, A> {
12171 let start = _fbb.start_table();
12172 PartAttributeShaderBuilder {
12173 fbb_: _fbb,
12174 start_: start,
12175 }
12176 }
12177 #[inline]
12178 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartAttributeShader<'a>> {
12179 let o = self.fbb_.end_table(self.start_);
12180 self.fbb_.required(o, PartAttributeShader::VT_ID,"id");
12181 ::flatbuffers::WIPOffset::new(o.value())
12182 }
12183}
12184
12185impl ::core::fmt::Debug for PartAttributeShader<'_> {
12186 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12187 let mut ds = f.debug_struct("PartAttributeShader");
12188 ds.field("id", &self.id());
12189 ds.field("id_hash", &self.id_hash());
12190 ds.field("param0", &self.param0());
12191 ds.field("param1", &self.param1());
12192 ds.field("param2", &self.param2());
12193 ds.field("param3", &self.param3());
12194 ds.field("param4", &self.param4());
12195 ds.field("param5", &self.param5());
12196 ds.field("param6", &self.param6());
12197 ds.field("param7", &self.param7());
12198 ds.field("map0_cellmap_name_hash", &self.map0_cellmap_name_hash());
12199 ds.field("map0_name_hash", &self.map0_name_hash());
12200 ds.field("map1_cellmap_name_hash", &self.map1_cellmap_name_hash());
12201 ds.field("map1_name_hash", &self.map1_name_hash());
12202 ds.finish()
12203 }
12204}
12205#[non_exhaustive]
12206#[derive(Debug, Clone, PartialEq)]
12207pub struct PartAttributeShaderT {
12208 pub id: alloc::string::String,
12209 pub id_hash: u32,
12210 pub param0: f32,
12211 pub param1: f32,
12212 pub param2: f32,
12213 pub param3: f32,
12214 pub param4: f32,
12215 pub param5: f32,
12216 pub param6: f32,
12217 pub param7: f32,
12218 pub map0_cellmap_name_hash: u32,
12219 pub map0_name_hash: u32,
12220 pub map1_cellmap_name_hash: u32,
12221 pub map1_name_hash: u32,
12222}
12223impl Default for PartAttributeShaderT {
12224 fn default() -> Self {
12225 Self {
12226 id: alloc::string::ToString::to_string(""),
12227 id_hash: 0,
12228 param0: 0.0,
12229 param1: 0.0,
12230 param2: 0.0,
12231 param3: 0.0,
12232 param4: 0.0,
12233 param5: 0.0,
12234 param6: 0.0,
12235 param7: 0.0,
12236 map0_cellmap_name_hash: 0,
12237 map0_name_hash: 0,
12238 map1_cellmap_name_hash: 0,
12239 map1_name_hash: 0,
12240 }
12241 }
12242}
12243impl PartAttributeShaderT {
12244 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
12245 &self,
12246 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
12247 ) -> ::flatbuffers::WIPOffset<PartAttributeShader<'b>> {
12248 let id = Some({
12249 let x = &self.id;
12250 _fbb.create_string(x)
12251 });
12252 let id_hash = self.id_hash;
12253 let param0 = self.param0;
12254 let param1 = self.param1;
12255 let param2 = self.param2;
12256 let param3 = self.param3;
12257 let param4 = self.param4;
12258 let param5 = self.param5;
12259 let param6 = self.param6;
12260 let param7 = self.param7;
12261 let map0_cellmap_name_hash = self.map0_cellmap_name_hash;
12262 let map0_name_hash = self.map0_name_hash;
12263 let map1_cellmap_name_hash = self.map1_cellmap_name_hash;
12264 let map1_name_hash = self.map1_name_hash;
12265 PartAttributeShader::create(_fbb, &PartAttributeShaderArgs{
12266 id,
12267 id_hash,
12268 param0,
12269 param1,
12270 param2,
12271 param3,
12272 param4,
12273 param5,
12274 param6,
12275 param7,
12276 map0_cellmap_name_hash,
12277 map0_name_hash,
12278 map1_cellmap_name_hash,
12279 map1_name_hash,
12280 })
12281 }
12282}
12283pub enum PartAttributeUserDataOffset {}
12284#[derive(Copy, Clone, PartialEq)]
12285
12286pub struct PartAttributeUserData<'a> {
12287 pub _tab: ::flatbuffers::Table<'a>,
12288}
12289
12290impl<'a> ::flatbuffers::Follow<'a> for PartAttributeUserData<'a> {
12291 type Inner = PartAttributeUserData<'a>;
12292 #[inline]
12293 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
12294 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
12295 }
12296}
12297
12298impl<'a> PartAttributeUserData<'a> {
12299 pub const VT_INTEGER: ::flatbuffers::VOffsetT = 4;
12300 pub const VT_RECT: ::flatbuffers::VOffsetT = 6;
12301 pub const VT_POINT: ::flatbuffers::VOffsetT = 8;
12302 pub const VT_STR: ::flatbuffers::VOffsetT = 10;
12303
12304 #[inline]
12305 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
12306 PartAttributeUserData { _tab: table }
12307 }
12308 #[allow(unused_mut)]
12309 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
12310 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
12311 args: &'args PartAttributeUserDataArgs<'args>
12312 ) -> ::flatbuffers::WIPOffset<PartAttributeUserData<'bldr>> {
12313 let mut builder = PartAttributeUserDataBuilder::new(_fbb);
12314 if let Some(x) = args.str { builder.add_str(x); }
12315 if let Some(x) = args.point { builder.add_point(x); }
12316 if let Some(x) = args.rect { builder.add_rect(x); }
12317 if let Some(x) = args.integer { builder.add_integer(x); }
12318 builder.finish()
12319 }
12320
12321 pub fn unpack(&self) -> PartAttributeUserDataT {
12322 let integer = self.integer().map(|x| {
12323 alloc::boxed::Box::new(x.unpack())
12324 });
12325 let rect = self.rect().map(|x| {
12326 alloc::boxed::Box::new(x.unpack())
12327 });
12328 let point = self.point().map(|x| {
12329 alloc::boxed::Box::new(x.unpack())
12330 });
12331 let str = self.str().map(|x| {
12332 alloc::string::ToString::to_string(x)
12333 });
12334 PartAttributeUserDataT {
12335 integer,
12336 rect,
12337 point,
12338 str,
12339 }
12340 }
12341
12342 #[inline]
12343 pub fn integer(&self) -> Option<IntValueEntry<'a>> {
12344 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<IntValueEntry>>(PartAttributeUserData::VT_INTEGER, None)}
12348 }
12349 #[inline]
12350 pub fn rect(&self) -> Option<Bounds<'a>> {
12351 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Bounds>>(PartAttributeUserData::VT_RECT, None)}
12355 }
12356 #[inline]
12357 pub fn point(&self) -> Option<Vec2<'a>> {
12358 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(PartAttributeUserData::VT_POINT, None)}
12362 }
12363 #[inline]
12364 pub fn str(&self) -> Option<&'a str> {
12365 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(PartAttributeUserData::VT_STR, None)}
12369 }
12370}
12371
12372impl ::flatbuffers::Verifiable for PartAttributeUserData<'_> {
12373 #[inline]
12374 fn run_verifier(
12375 v: &mut ::flatbuffers::Verifier, pos: usize
12376 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
12377 v.visit_table(pos)?
12378 .visit_field::<::flatbuffers::ForwardsUOffset<IntValueEntry>>("integer", Self::VT_INTEGER, false)?
12379 .visit_field::<::flatbuffers::ForwardsUOffset<Bounds>>("rect", Self::VT_RECT, false)?
12380 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("point", Self::VT_POINT, false)?
12381 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("str", Self::VT_STR, false)?
12382 .finish();
12383 Ok(())
12384 }
12385}
12386pub struct PartAttributeUserDataArgs<'a> {
12387 pub integer: Option<::flatbuffers::WIPOffset<IntValueEntry<'a>>>,
12388 pub rect: Option<::flatbuffers::WIPOffset<Bounds<'a>>>,
12389 pub point: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
12390 pub str: Option<::flatbuffers::WIPOffset<&'a str>>,
12391}
12392impl<'a> Default for PartAttributeUserDataArgs<'a> {
12393 #[inline]
12394 fn default() -> Self {
12395 PartAttributeUserDataArgs {
12396 integer: None,
12397 rect: None,
12398 point: None,
12399 str: None,
12400 }
12401 }
12402}
12403
12404pub struct PartAttributeUserDataBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
12405 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
12406 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
12407}
12408impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartAttributeUserDataBuilder<'a, 'b, A> {
12409 #[inline]
12410 pub fn add_integer(&mut self, integer: ::flatbuffers::WIPOffset<IntValueEntry<'b >>) {
12411 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<IntValueEntry>>(PartAttributeUserData::VT_INTEGER, integer);
12412 }
12413 #[inline]
12414 pub fn add_rect(&mut self, rect: ::flatbuffers::WIPOffset<Bounds<'b >>) {
12415 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Bounds>>(PartAttributeUserData::VT_RECT, rect);
12416 }
12417 #[inline]
12418 pub fn add_point(&mut self, point: ::flatbuffers::WIPOffset<Vec2<'b >>) {
12419 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(PartAttributeUserData::VT_POINT, point);
12420 }
12421 #[inline]
12422 pub fn add_str(&mut self, str: ::flatbuffers::WIPOffset<&'b str>) {
12423 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartAttributeUserData::VT_STR, str);
12424 }
12425 #[inline]
12426 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartAttributeUserDataBuilder<'a, 'b, A> {
12427 let start = _fbb.start_table();
12428 PartAttributeUserDataBuilder {
12429 fbb_: _fbb,
12430 start_: start,
12431 }
12432 }
12433 #[inline]
12434 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartAttributeUserData<'a>> {
12435 let o = self.fbb_.end_table(self.start_);
12436 ::flatbuffers::WIPOffset::new(o.value())
12437 }
12438}
12439
12440impl ::core::fmt::Debug for PartAttributeUserData<'_> {
12441 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12442 let mut ds = f.debug_struct("PartAttributeUserData");
12443 ds.field("integer", &self.integer());
12444 ds.field("rect", &self.rect());
12445 ds.field("point", &self.point());
12446 ds.field("str", &self.str());
12447 ds.finish()
12448 }
12449}
12450#[non_exhaustive]
12451#[derive(Debug, Clone, PartialEq)]
12452pub struct PartAttributeUserDataT {
12453 pub integer: Option<alloc::boxed::Box<IntValueEntryT>>,
12454 pub rect: Option<alloc::boxed::Box<BoundsT>>,
12455 pub point: Option<alloc::boxed::Box<Vec2T>>,
12456 pub str: Option<alloc::string::String>,
12457}
12458impl Default for PartAttributeUserDataT {
12459 fn default() -> Self {
12460 Self {
12461 integer: None,
12462 rect: None,
12463 point: None,
12464 str: None,
12465 }
12466 }
12467}
12468impl PartAttributeUserDataT {
12469 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
12470 &self,
12471 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
12472 ) -> ::flatbuffers::WIPOffset<PartAttributeUserData<'b>> {
12473 let integer = self.integer.as_ref().map(|x|{
12474 x.pack(_fbb)
12475 });
12476 let rect = self.rect.as_ref().map(|x|{
12477 x.pack(_fbb)
12478 });
12479 let point = self.point.as_ref().map(|x|{
12480 x.pack(_fbb)
12481 });
12482 let str = self.str.as_ref().map(|x|{
12483 _fbb.create_string(x)
12484 });
12485 PartAttributeUserData::create(_fbb, &PartAttributeUserDataArgs{
12486 integer,
12487 rect,
12488 point,
12489 str,
12490 })
12491 }
12492}
12493pub enum SignalCommandParamOffset {}
12494#[derive(Copy, Clone, PartialEq)]
12495
12496pub struct SignalCommandParam<'a> {
12497 pub _tab: ::flatbuffers::Table<'a>,
12498}
12499
12500impl<'a> ::flatbuffers::Follow<'a> for SignalCommandParam<'a> {
12501 type Inner = SignalCommandParam<'a>;
12502 #[inline]
12503 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
12504 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
12505 }
12506}
12507
12508impl<'a> SignalCommandParam<'a> {
12509 pub const VT_PARAM_ID: ::flatbuffers::VOffsetT = 4;
12510 pub const VT_TYPE_: ::flatbuffers::VOffsetT = 6;
12511 pub const VT_VALUE_TYPE: ::flatbuffers::VOffsetT = 8;
12512 pub const VT_VALUE: ::flatbuffers::VOffsetT = 10;
12513
12514 #[inline]
12515 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
12516 SignalCommandParam { _tab: table }
12517 }
12518 #[allow(unused_mut)]
12519 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
12520 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
12521 args: &'args SignalCommandParamArgs<'args>
12522 ) -> ::flatbuffers::WIPOffset<SignalCommandParam<'bldr>> {
12523 let mut builder = SignalCommandParamBuilder::new(_fbb);
12524 if let Some(x) = args.value { builder.add_value(x); }
12525 if let Some(x) = args.param_id { builder.add_param_id(x); }
12526 builder.add_value_type(args.value_type);
12527 builder.add_type_(args.type_);
12528 builder.finish()
12529 }
12530
12531 pub fn unpack(&self) -> SignalCommandParamT {
12532 let param_id = {
12533 let x = self.param_id();
12534 alloc::string::ToString::to_string(x)
12535 };
12536 let type_ = self.type_();
12537 let value = match self.value_type() {
12538 SignalCommandParamValue::NONE => SignalCommandParamValueT::NONE,
12539 SignalCommandParamValue::Bool => SignalCommandParamValueT::Bool(alloc::boxed::Box::new(
12540 self.value_as_bool()
12541 .expect("Invalid union table, expected `SignalCommandParamValue::Bool`.")
12542 .unpack()
12543 )),
12544 SignalCommandParamValue::Index => SignalCommandParamValueT::Index(alloc::boxed::Box::new(
12545 self.value_as_index()
12546 .expect("Invalid union table, expected `SignalCommandParamValue::Index`.")
12547 .unpack()
12548 )),
12549 SignalCommandParamValue::Integer => SignalCommandParamValueT::Integer(alloc::boxed::Box::new(
12550 self.value_as_integer()
12551 .expect("Invalid union table, expected `SignalCommandParamValue::Integer`.")
12552 .unpack()
12553 )),
12554 SignalCommandParamValue::Floating => SignalCommandParamValueT::Floating(alloc::boxed::Box::new(
12555 self.value_as_floating()
12556 .expect("Invalid union table, expected `SignalCommandParamValue::Floating`.")
12557 .unpack()
12558 )),
12559 SignalCommandParamValue::Text => SignalCommandParamValueT::Text(alloc::boxed::Box::new(
12560 self.value_as_text()
12561 .expect("Invalid union table, expected `SignalCommandParamValue::Text`.")
12562 .unpack()
12563 )),
12564 SignalCommandParamValue::None => SignalCommandParamValueT::None(alloc::boxed::Box::new(
12565 self.value_as_none()
12566 .expect("Invalid union table, expected `SignalCommandParamValue::None`.")
12567 .unpack()
12568 )),
12569 _ => SignalCommandParamValueT::NONE,
12570 };
12571 SignalCommandParamT {
12572 param_id,
12573 type_,
12574 value,
12575 }
12576 }
12577
12578 #[inline]
12579 pub fn param_id(&self) -> &'a str {
12580 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(SignalCommandParam::VT_PARAM_ID, None).unwrap()}
12584 }
12585 #[inline]
12586 pub fn type_(&self) -> SignalCommandParamType {
12587 unsafe { self._tab.get::<SignalCommandParamType>(SignalCommandParam::VT_TYPE_, Some(SignalCommandParamType::Bool)).unwrap()}
12591 }
12592 #[inline]
12593 pub fn value_type(&self) -> SignalCommandParamValue {
12594 unsafe { self._tab.get::<SignalCommandParamValue>(SignalCommandParam::VT_VALUE_TYPE, Some(SignalCommandParamValue::NONE)).unwrap()}
12598 }
12599 #[inline]
12600 pub fn value(&self) -> ::flatbuffers::Table<'a> {
12601 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>(SignalCommandParam::VT_VALUE, None).unwrap()}
12605 }
12606 #[inline]
12607 #[allow(non_snake_case)]
12608 pub fn value_as_bool(&self) -> Option<BoolValueEntry<'a>> {
12609 if self.value_type() == SignalCommandParamValue::Bool {
12610 let u = self.value();
12611 Some(unsafe { BoolValueEntry::init_from_table(u) })
12615 } else {
12616 None
12617 }
12618 }
12619
12620 #[inline]
12621 #[allow(non_snake_case)]
12622 pub fn value_as_index(&self) -> Option<IntValueEntry<'a>> {
12623 if self.value_type() == SignalCommandParamValue::Index {
12624 let u = self.value();
12625 Some(unsafe { IntValueEntry::init_from_table(u) })
12629 } else {
12630 None
12631 }
12632 }
12633
12634 #[inline]
12635 #[allow(non_snake_case)]
12636 pub fn value_as_integer(&self) -> Option<IntValueEntry<'a>> {
12637 if self.value_type() == SignalCommandParamValue::Integer {
12638 let u = self.value();
12639 Some(unsafe { IntValueEntry::init_from_table(u) })
12643 } else {
12644 None
12645 }
12646 }
12647
12648 #[inline]
12649 #[allow(non_snake_case)]
12650 pub fn value_as_floating(&self) -> Option<FloatValueEntry<'a>> {
12651 if self.value_type() == SignalCommandParamValue::Floating {
12652 let u = self.value();
12653 Some(unsafe { FloatValueEntry::init_from_table(u) })
12657 } else {
12658 None
12659 }
12660 }
12661
12662 #[inline]
12663 #[allow(non_snake_case)]
12664 pub fn value_as_text(&self) -> Option<StringValueEntry<'a>> {
12665 if self.value_type() == SignalCommandParamValue::Text {
12666 let u = self.value();
12667 Some(unsafe { StringValueEntry::init_from_table(u) })
12671 } else {
12672 None
12673 }
12674 }
12675
12676 #[inline]
12677 #[allow(non_snake_case)]
12678 pub fn value_as_none(&self) -> Option<NoneValueEntry<'a>> {
12679 if self.value_type() == SignalCommandParamValue::None {
12680 let u = self.value();
12681 Some(unsafe { NoneValueEntry::init_from_table(u) })
12685 } else {
12686 None
12687 }
12688 }
12689
12690}
12691
12692impl ::flatbuffers::Verifiable for SignalCommandParam<'_> {
12693 #[inline]
12694 fn run_verifier(
12695 v: &mut ::flatbuffers::Verifier, pos: usize
12696 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
12697 v.visit_table(pos)?
12698 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("param_id", Self::VT_PARAM_ID, true)?
12699 .visit_field::<SignalCommandParamType>("type_", Self::VT_TYPE_, false)?
12700 .visit_union::<SignalCommandParamValue, _>("value_type", Self::VT_VALUE_TYPE, "value", Self::VT_VALUE, true, |key, v, pos| {
12701 match key {
12702 SignalCommandParamValue::Bool => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<BoolValueEntry>>("SignalCommandParamValue::Bool", pos),
12703 SignalCommandParamValue::Index => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<IntValueEntry>>("SignalCommandParamValue::Index", pos),
12704 SignalCommandParamValue::Integer => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<IntValueEntry>>("SignalCommandParamValue::Integer", pos),
12705 SignalCommandParamValue::Floating => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<FloatValueEntry>>("SignalCommandParamValue::Floating", pos),
12706 SignalCommandParamValue::Text => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<StringValueEntry>>("SignalCommandParamValue::Text", pos),
12707 SignalCommandParamValue::None => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<NoneValueEntry>>("SignalCommandParamValue::None", pos),
12708 _ => Ok(()),
12709 }
12710 })?
12711 .finish();
12712 Ok(())
12713 }
12714}
12715pub struct SignalCommandParamArgs<'a> {
12716 pub param_id: Option<::flatbuffers::WIPOffset<&'a str>>,
12717 pub type_: SignalCommandParamType,
12718 pub value_type: SignalCommandParamValue,
12719 pub value: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>,
12720}
12721impl<'a> Default for SignalCommandParamArgs<'a> {
12722 #[inline]
12723 fn default() -> Self {
12724 SignalCommandParamArgs {
12725 param_id: None, type_: SignalCommandParamType::Bool,
12727 value_type: SignalCommandParamValue::NONE,
12728 value: None, }
12730 }
12731}
12732
12733pub struct SignalCommandParamBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
12734 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
12735 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
12736}
12737impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> SignalCommandParamBuilder<'a, 'b, A> {
12738 #[inline]
12739 pub fn add_param_id(&mut self, param_id: ::flatbuffers::WIPOffset<&'b str>) {
12740 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SignalCommandParam::VT_PARAM_ID, param_id);
12741 }
12742 #[inline]
12743 pub fn add_type_(&mut self, type_: SignalCommandParamType) {
12744 self.fbb_.push_slot::<SignalCommandParamType>(SignalCommandParam::VT_TYPE_, type_, SignalCommandParamType::Bool);
12745 }
12746 #[inline]
12747 pub fn add_value_type(&mut self, value_type: SignalCommandParamValue) {
12748 self.fbb_.push_slot::<SignalCommandParamValue>(SignalCommandParam::VT_VALUE_TYPE, value_type, SignalCommandParamValue::NONE);
12749 }
12750 #[inline]
12751 pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>) {
12752 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SignalCommandParam::VT_VALUE, value);
12753 }
12754 #[inline]
12755 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> SignalCommandParamBuilder<'a, 'b, A> {
12756 let start = _fbb.start_table();
12757 SignalCommandParamBuilder {
12758 fbb_: _fbb,
12759 start_: start,
12760 }
12761 }
12762 #[inline]
12763 pub fn finish(self) -> ::flatbuffers::WIPOffset<SignalCommandParam<'a>> {
12764 let o = self.fbb_.end_table(self.start_);
12765 self.fbb_.required(o, SignalCommandParam::VT_PARAM_ID,"param_id");
12766 self.fbb_.required(o, SignalCommandParam::VT_VALUE,"value");
12767 ::flatbuffers::WIPOffset::new(o.value())
12768 }
12769}
12770
12771impl ::core::fmt::Debug for SignalCommandParam<'_> {
12772 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12773 let mut ds = f.debug_struct("SignalCommandParam");
12774 ds.field("param_id", &self.param_id());
12775 ds.field("type_", &self.type_());
12776 ds.field("value_type", &self.value_type());
12777 match self.value_type() {
12778 SignalCommandParamValue::Bool => {
12779 if let Some(x) = self.value_as_bool() {
12780 ds.field("value", &x)
12781 } else {
12782 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
12783 }
12784 },
12785 SignalCommandParamValue::Index => {
12786 if let Some(x) = self.value_as_index() {
12787 ds.field("value", &x)
12788 } else {
12789 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
12790 }
12791 },
12792 SignalCommandParamValue::Integer => {
12793 if let Some(x) = self.value_as_integer() {
12794 ds.field("value", &x)
12795 } else {
12796 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
12797 }
12798 },
12799 SignalCommandParamValue::Floating => {
12800 if let Some(x) = self.value_as_floating() {
12801 ds.field("value", &x)
12802 } else {
12803 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
12804 }
12805 },
12806 SignalCommandParamValue::Text => {
12807 if let Some(x) = self.value_as_text() {
12808 ds.field("value", &x)
12809 } else {
12810 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
12811 }
12812 },
12813 SignalCommandParamValue::None => {
12814 if let Some(x) = self.value_as_none() {
12815 ds.field("value", &x)
12816 } else {
12817 ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
12818 }
12819 },
12820 _ => {
12821 let x: Option<()> = None;
12822 ds.field("value", &x)
12823 },
12824 };
12825 ds.finish()
12826 }
12827}
12828#[non_exhaustive]
12829#[derive(Debug, Clone, PartialEq)]
12830pub struct SignalCommandParamT {
12831 pub param_id: alloc::string::String,
12832 pub type_: SignalCommandParamType,
12833 pub value: SignalCommandParamValueT,
12834}
12835impl Default for SignalCommandParamT {
12836 fn default() -> Self {
12837 Self {
12838 param_id: alloc::string::ToString::to_string(""),
12839 type_: SignalCommandParamType::Bool,
12840 value: SignalCommandParamValueT::NONE,
12841 }
12842 }
12843}
12844impl SignalCommandParamT {
12845 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
12846 &self,
12847 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
12848 ) -> ::flatbuffers::WIPOffset<SignalCommandParam<'b>> {
12849 let param_id = Some({
12850 let x = &self.param_id;
12851 _fbb.create_string(x)
12852 });
12853 let type_ = self.type_;
12854 let value_type = self.value.signal_command_param_value_type();
12855 let value = self.value.pack(_fbb);
12856 SignalCommandParam::create(_fbb, &SignalCommandParamArgs{
12857 param_id,
12858 type_,
12859 value_type,
12860 value,
12861 })
12862 }
12863}
12864pub enum PartAttributeSignalOffset {}
12865#[derive(Copy, Clone, PartialEq)]
12866
12867pub struct PartAttributeSignal<'a> {
12868 pub _tab: ::flatbuffers::Table<'a>,
12869}
12870
12871impl<'a> ::flatbuffers::Follow<'a> for PartAttributeSignal<'a> {
12872 type Inner = PartAttributeSignal<'a>;
12873 #[inline]
12874 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
12875 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
12876 }
12877}
12878
12879impl<'a> PartAttributeSignal<'a> {
12880 pub const VT_ACTIVE: ::flatbuffers::VOffsetT = 4;
12881 pub const VT_COMMAND_ID: ::flatbuffers::VOffsetT = 6;
12882 pub const VT_PARAMS: ::flatbuffers::VOffsetT = 8;
12883
12884 #[inline]
12885 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
12886 PartAttributeSignal { _tab: table }
12887 }
12888 #[allow(unused_mut)]
12889 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
12890 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
12891 args: &'args PartAttributeSignalArgs<'args>
12892 ) -> ::flatbuffers::WIPOffset<PartAttributeSignal<'bldr>> {
12893 let mut builder = PartAttributeSignalBuilder::new(_fbb);
12894 if let Some(x) = args.params { builder.add_params(x); }
12895 if let Some(x) = args.command_id { builder.add_command_id(x); }
12896 builder.add_active(args.active);
12897 builder.finish()
12898 }
12899
12900 pub fn unpack(&self) -> PartAttributeSignalT {
12901 let active = self.active();
12902 let command_id = {
12903 let x = self.command_id();
12904 alloc::string::ToString::to_string(x)
12905 };
12906 let params = {
12907 let x = self.params();
12908 x.iter().map(|t| t.unpack()).collect()
12909 };
12910 PartAttributeSignalT {
12911 active,
12912 command_id,
12913 params,
12914 }
12915 }
12916
12917 #[inline]
12918 pub fn active(&self) -> bool {
12919 unsafe { self._tab.get::<bool>(PartAttributeSignal::VT_ACTIVE, Some(false)).unwrap()}
12923 }
12924 #[inline]
12925 pub fn command_id(&self) -> &'a str {
12926 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(PartAttributeSignal::VT_COMMAND_ID, None).unwrap()}
12930 }
12931 #[inline]
12932 pub fn params(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<SignalCommandParam<'a>>> {
12933 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<SignalCommandParam>>>>(PartAttributeSignal::VT_PARAMS, None).unwrap()}
12937 }
12938}
12939
12940impl ::flatbuffers::Verifiable for PartAttributeSignal<'_> {
12941 #[inline]
12942 fn run_verifier(
12943 v: &mut ::flatbuffers::Verifier, pos: usize
12944 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
12945 v.visit_table(pos)?
12946 .visit_field::<bool>("active", Self::VT_ACTIVE, false)?
12947 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("command_id", Self::VT_COMMAND_ID, true)?
12948 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<SignalCommandParam>>>>("params", Self::VT_PARAMS, true)?
12949 .finish();
12950 Ok(())
12951 }
12952}
12953pub struct PartAttributeSignalArgs<'a> {
12954 pub active: bool,
12955 pub command_id: Option<::flatbuffers::WIPOffset<&'a str>>,
12956 pub params: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<SignalCommandParam<'a>>>>>,
12957}
12958impl<'a> Default for PartAttributeSignalArgs<'a> {
12959 #[inline]
12960 fn default() -> Self {
12961 PartAttributeSignalArgs {
12962 active: false,
12963 command_id: None, params: None, }
12966 }
12967}
12968
12969pub struct PartAttributeSignalBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
12970 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
12971 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
12972}
12973impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartAttributeSignalBuilder<'a, 'b, A> {
12974 #[inline]
12975 pub fn add_active(&mut self, active: bool) {
12976 self.fbb_.push_slot::<bool>(PartAttributeSignal::VT_ACTIVE, active, false);
12977 }
12978 #[inline]
12979 pub fn add_command_id(&mut self, command_id: ::flatbuffers::WIPOffset<&'b str>) {
12980 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartAttributeSignal::VT_COMMAND_ID, command_id);
12981 }
12982 #[inline]
12983 pub fn add_params(&mut self, params: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<SignalCommandParam<'b >>>>) {
12984 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartAttributeSignal::VT_PARAMS, params);
12985 }
12986 #[inline]
12987 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartAttributeSignalBuilder<'a, 'b, A> {
12988 let start = _fbb.start_table();
12989 PartAttributeSignalBuilder {
12990 fbb_: _fbb,
12991 start_: start,
12992 }
12993 }
12994 #[inline]
12995 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartAttributeSignal<'a>> {
12996 let o = self.fbb_.end_table(self.start_);
12997 self.fbb_.required(o, PartAttributeSignal::VT_COMMAND_ID,"command_id");
12998 self.fbb_.required(o, PartAttributeSignal::VT_PARAMS,"params");
12999 ::flatbuffers::WIPOffset::new(o.value())
13000 }
13001}
13002
13003impl ::core::fmt::Debug for PartAttributeSignal<'_> {
13004 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
13005 let mut ds = f.debug_struct("PartAttributeSignal");
13006 ds.field("active", &self.active());
13007 ds.field("command_id", &self.command_id());
13008 ds.field("params", &self.params());
13009 ds.finish()
13010 }
13011}
13012#[non_exhaustive]
13013#[derive(Debug, Clone, PartialEq)]
13014pub struct PartAttributeSignalT {
13015 pub active: bool,
13016 pub command_id: alloc::string::String,
13017 pub params: alloc::vec::Vec<SignalCommandParamT>,
13018}
13019impl Default for PartAttributeSignalT {
13020 fn default() -> Self {
13021 Self {
13022 active: false,
13023 command_id: alloc::string::ToString::to_string(""),
13024 params: Default::default(),
13025 }
13026 }
13027}
13028impl PartAttributeSignalT {
13029 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
13030 &self,
13031 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
13032 ) -> ::flatbuffers::WIPOffset<PartAttributeSignal<'b>> {
13033 let active = self.active;
13034 let command_id = Some({
13035 let x = &self.command_id;
13036 _fbb.create_string(x)
13037 });
13038 let params = Some({
13039 let x = &self.params;
13040 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
13041 });
13042 PartAttributeSignal::create(_fbb, &PartAttributeSignalArgs{
13043 active,
13044 command_id,
13045 params,
13046 })
13047 }
13048}
13049pub enum PartAttributeAudioOffset {}
13050#[derive(Copy, Clone, PartialEq)]
13051
13052pub struct PartAttributeAudio<'a> {
13053 pub _tab: ::flatbuffers::Table<'a>,
13054}
13055
13056impl<'a> ::flatbuffers::Follow<'a> for PartAttributeAudio<'a> {
13057 type Inner = PartAttributeAudio<'a>;
13058 #[inline]
13059 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
13060 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
13061 }
13062}
13063
13064impl<'a> PartAttributeAudio<'a> {
13065 pub const VT_SOUND_LIST_NAME_HASH: ::flatbuffers::VOffsetT = 4;
13066 pub const VT_SOUND_NAME_HASH: ::flatbuffers::VOffsetT = 6;
13067 pub const VT_SOUND_NAME: ::flatbuffers::VOffsetT = 8;
13068 pub const VT_LOOP_NUM: ::flatbuffers::VOffsetT = 10;
13069
13070 #[inline]
13071 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
13072 PartAttributeAudio { _tab: table }
13073 }
13074 #[allow(unused_mut)]
13075 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
13076 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
13077 args: &'args PartAttributeAudioArgs<'args>
13078 ) -> ::flatbuffers::WIPOffset<PartAttributeAudio<'bldr>> {
13079 let mut builder = PartAttributeAudioBuilder::new(_fbb);
13080 builder.add_loop_num(args.loop_num);
13081 if let Some(x) = args.sound_name { builder.add_sound_name(x); }
13082 builder.add_sound_name_hash(args.sound_name_hash);
13083 builder.add_sound_list_name_hash(args.sound_list_name_hash);
13084 builder.finish()
13085 }
13086
13087 pub fn unpack(&self) -> PartAttributeAudioT {
13088 let sound_list_name_hash = self.sound_list_name_hash();
13089 let sound_name_hash = self.sound_name_hash();
13090 let sound_name = {
13091 let x = self.sound_name();
13092 alloc::string::ToString::to_string(x)
13093 };
13094 let loop_num = self.loop_num();
13095 PartAttributeAudioT {
13096 sound_list_name_hash,
13097 sound_name_hash,
13098 sound_name,
13099 loop_num,
13100 }
13101 }
13102
13103 #[inline]
13104 pub fn sound_list_name_hash(&self) -> u32 {
13105 unsafe { self._tab.get::<u32>(PartAttributeAudio::VT_SOUND_LIST_NAME_HASH, Some(0)).unwrap()}
13109 }
13110 #[inline]
13111 pub fn sound_name_hash(&self) -> u32 {
13112 unsafe { self._tab.get::<u32>(PartAttributeAudio::VT_SOUND_NAME_HASH, Some(0)).unwrap()}
13116 }
13117 #[inline]
13118 pub fn sound_name(&self) -> &'a str {
13119 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(PartAttributeAudio::VT_SOUND_NAME, None).unwrap()}
13123 }
13124 #[inline]
13125 pub fn loop_num(&self) -> i32 {
13126 unsafe { self._tab.get::<i32>(PartAttributeAudio::VT_LOOP_NUM, Some(0)).unwrap()}
13130 }
13131}
13132
13133impl ::flatbuffers::Verifiable for PartAttributeAudio<'_> {
13134 #[inline]
13135 fn run_verifier(
13136 v: &mut ::flatbuffers::Verifier, pos: usize
13137 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
13138 v.visit_table(pos)?
13139 .visit_field::<u32>("sound_list_name_hash", Self::VT_SOUND_LIST_NAME_HASH, false)?
13140 .visit_field::<u32>("sound_name_hash", Self::VT_SOUND_NAME_HASH, false)?
13141 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("sound_name", Self::VT_SOUND_NAME, true)?
13142 .visit_field::<i32>("loop_num", Self::VT_LOOP_NUM, false)?
13143 .finish();
13144 Ok(())
13145 }
13146}
13147pub struct PartAttributeAudioArgs<'a> {
13148 pub sound_list_name_hash: u32,
13149 pub sound_name_hash: u32,
13150 pub sound_name: Option<::flatbuffers::WIPOffset<&'a str>>,
13151 pub loop_num: i32,
13152}
13153impl<'a> Default for PartAttributeAudioArgs<'a> {
13154 #[inline]
13155 fn default() -> Self {
13156 PartAttributeAudioArgs {
13157 sound_list_name_hash: 0,
13158 sound_name_hash: 0,
13159 sound_name: None, loop_num: 0,
13161 }
13162 }
13163}
13164
13165pub struct PartAttributeAudioBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
13166 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
13167 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
13168}
13169impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartAttributeAudioBuilder<'a, 'b, A> {
13170 #[inline]
13171 pub fn add_sound_list_name_hash(&mut self, sound_list_name_hash: u32) {
13172 self.fbb_.push_slot::<u32>(PartAttributeAudio::VT_SOUND_LIST_NAME_HASH, sound_list_name_hash, 0);
13173 }
13174 #[inline]
13175 pub fn add_sound_name_hash(&mut self, sound_name_hash: u32) {
13176 self.fbb_.push_slot::<u32>(PartAttributeAudio::VT_SOUND_NAME_HASH, sound_name_hash, 0);
13177 }
13178 #[inline]
13179 pub fn add_sound_name(&mut self, sound_name: ::flatbuffers::WIPOffset<&'b str>) {
13180 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartAttributeAudio::VT_SOUND_NAME, sound_name);
13181 }
13182 #[inline]
13183 pub fn add_loop_num(&mut self, loop_num: i32) {
13184 self.fbb_.push_slot::<i32>(PartAttributeAudio::VT_LOOP_NUM, loop_num, 0);
13185 }
13186 #[inline]
13187 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartAttributeAudioBuilder<'a, 'b, A> {
13188 let start = _fbb.start_table();
13189 PartAttributeAudioBuilder {
13190 fbb_: _fbb,
13191 start_: start,
13192 }
13193 }
13194 #[inline]
13195 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartAttributeAudio<'a>> {
13196 let o = self.fbb_.end_table(self.start_);
13197 self.fbb_.required(o, PartAttributeAudio::VT_SOUND_NAME,"sound_name");
13198 ::flatbuffers::WIPOffset::new(o.value())
13199 }
13200}
13201
13202impl ::core::fmt::Debug for PartAttributeAudio<'_> {
13203 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
13204 let mut ds = f.debug_struct("PartAttributeAudio");
13205 ds.field("sound_list_name_hash", &self.sound_list_name_hash());
13206 ds.field("sound_name_hash", &self.sound_name_hash());
13207 ds.field("sound_name", &self.sound_name());
13208 ds.field("loop_num", &self.loop_num());
13209 ds.finish()
13210 }
13211}
13212#[non_exhaustive]
13213#[derive(Debug, Clone, PartialEq)]
13214pub struct PartAttributeAudioT {
13215 pub sound_list_name_hash: u32,
13216 pub sound_name_hash: u32,
13217 pub sound_name: alloc::string::String,
13218 pub loop_num: i32,
13219}
13220impl Default for PartAttributeAudioT {
13221 fn default() -> Self {
13222 Self {
13223 sound_list_name_hash: 0,
13224 sound_name_hash: 0,
13225 sound_name: alloc::string::ToString::to_string(""),
13226 loop_num: 0,
13227 }
13228 }
13229}
13230impl PartAttributeAudioT {
13231 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
13232 &self,
13233 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
13234 ) -> ::flatbuffers::WIPOffset<PartAttributeAudio<'b>> {
13235 let sound_list_name_hash = self.sound_list_name_hash;
13236 let sound_name_hash = self.sound_name_hash;
13237 let sound_name = Some({
13238 let x = &self.sound_name;
13239 _fbb.create_string(x)
13240 });
13241 let loop_num = self.loop_num;
13242 PartAttributeAudio::create(_fbb, &PartAttributeAudioArgs{
13243 sound_list_name_hash,
13244 sound_name_hash,
13245 sound_name,
13246 loop_num,
13247 })
13248 }
13249}
13250pub enum InitialPartAttributesOffset {}
13251#[derive(Copy, Clone, PartialEq)]
13252
13253pub struct InitialPartAttributes<'a> {
13254 pub _tab: ::flatbuffers::Table<'a>,
13255}
13256
13257impl<'a> ::flatbuffers::Follow<'a> for InitialPartAttributes<'a> {
13258 type Inner = InitialPartAttributes<'a>;
13259 #[inline]
13260 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
13261 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
13262 }
13263}
13264
13265impl<'a> InitialPartAttributes<'a> {
13266 pub const VT_UPDATE_FLAG: ::flatbuffers::VOffsetT = 4;
13267 pub const VT_CELL: ::flatbuffers::VOffsetT = 6;
13268 pub const VT_POSITION_X: ::flatbuffers::VOffsetT = 8;
13269 pub const VT_POSITION_Y: ::flatbuffers::VOffsetT = 10;
13270 pub const VT_POSITION_Z: ::flatbuffers::VOffsetT = 12;
13271 pub const VT_ROTATION_X: ::flatbuffers::VOffsetT = 14;
13272 pub const VT_ROTATION_Y: ::flatbuffers::VOffsetT = 16;
13273 pub const VT_ROTATION_Z: ::flatbuffers::VOffsetT = 18;
13274 pub const VT_SCALE_X: ::flatbuffers::VOffsetT = 20;
13275 pub const VT_SCALE_Y: ::flatbuffers::VOffsetT = 22;
13276 pub const VT_LOCAL_SCALE_X: ::flatbuffers::VOffsetT = 24;
13277 pub const VT_LOCAL_SCALE_Y: ::flatbuffers::VOffsetT = 26;
13278 pub const VT_ALPHA: ::flatbuffers::VOffsetT = 28;
13279 pub const VT_LOCAL_ALPHA: ::flatbuffers::VOffsetT = 30;
13280 pub const VT_PRIORITY: ::flatbuffers::VOffsetT = 32;
13281 pub const VT_FLIP_H: ::flatbuffers::VOffsetT = 34;
13282 pub const VT_FLIP_V: ::flatbuffers::VOffsetT = 36;
13283 pub const VT_HIDE: ::flatbuffers::VOffsetT = 38;
13284 pub const VT_PART_COLOR: ::flatbuffers::VOffsetT = 40;
13285 pub const VT_SHADER: ::flatbuffers::VOffsetT = 42;
13286 pub const VT_VERTEX: ::flatbuffers::VOffsetT = 44;
13287 pub const VT_PIVOT_X: ::flatbuffers::VOffsetT = 46;
13288 pub const VT_PIVOT_Y: ::flatbuffers::VOffsetT = 48;
13289 pub const VT_ANCHOR_X: ::flatbuffers::VOffsetT = 50;
13290 pub const VT_ANCHOR_Y: ::flatbuffers::VOffsetT = 52;
13291 pub const VT_SIZE_X: ::flatbuffers::VOffsetT = 54;
13292 pub const VT_SIZE_Y: ::flatbuffers::VOffsetT = 56;
13293 pub const VT_IMG_FLIP_H: ::flatbuffers::VOffsetT = 58;
13294 pub const VT_IMG_FLIP_V: ::flatbuffers::VOffsetT = 60;
13295 pub const VT_UV_TRANSLATION_X: ::flatbuffers::VOffsetT = 62;
13296 pub const VT_UV_TRANSLATION_Y: ::flatbuffers::VOffsetT = 64;
13297 pub const VT_UV_ROTATION_Z: ::flatbuffers::VOffsetT = 66;
13298 pub const VT_UV_SCALE_X: ::flatbuffers::VOffsetT = 68;
13299 pub const VT_UV_SCALE_Y: ::flatbuffers::VOffsetT = 70;
13300 pub const VT_BOUNDING_RADIUS: ::flatbuffers::VOffsetT = 72;
13301 pub const VT_MASK: ::flatbuffers::VOffsetT = 74;
13302 pub const VT_SKEW_X: ::flatbuffers::VOffsetT = 76;
13303 pub const VT_SKEW_Y: ::flatbuffers::VOffsetT = 78;
13304 pub const VT_DEFORM: ::flatbuffers::VOffsetT = 80;
13305 pub const VT_TEXTURE: ::flatbuffers::VOffsetT = 82;
13306
13307 #[inline]
13308 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
13309 InitialPartAttributes { _tab: table }
13310 }
13311 #[allow(unused_mut)]
13312 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
13313 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
13314 args: &'args InitialPartAttributesArgs<'args>
13315 ) -> ::flatbuffers::WIPOffset<InitialPartAttributes<'bldr>> {
13316 let mut builder = InitialPartAttributesBuilder::new(_fbb);
13317 builder.add_update_flag(args.update_flag);
13318 builder.add_texture(args.texture);
13319 if let Some(x) = args.deform { builder.add_deform(x); }
13320 builder.add_skew_y(args.skew_y);
13321 builder.add_skew_x(args.skew_x);
13322 builder.add_mask(args.mask);
13323 builder.add_bounding_radius(args.bounding_radius);
13324 builder.add_uv_scale_y(args.uv_scale_y);
13325 builder.add_uv_scale_x(args.uv_scale_x);
13326 builder.add_uv_rotation_z(args.uv_rotation_z);
13327 builder.add_uv_translation_y(args.uv_translation_y);
13328 builder.add_uv_translation_x(args.uv_translation_x);
13329 builder.add_size_y(args.size_y);
13330 builder.add_size_x(args.size_x);
13331 builder.add_anchor_y(args.anchor_y);
13332 builder.add_anchor_x(args.anchor_x);
13333 builder.add_pivot_y(args.pivot_y);
13334 builder.add_pivot_x(args.pivot_x);
13335 if let Some(x) = args.vertex { builder.add_vertex(x); }
13336 if let Some(x) = args.shader { builder.add_shader(x); }
13337 if let Some(x) = args.part_color { builder.add_part_color(x); }
13338 builder.add_priority(args.priority);
13339 builder.add_local_alpha(args.local_alpha);
13340 builder.add_alpha(args.alpha);
13341 builder.add_local_scale_y(args.local_scale_y);
13342 builder.add_local_scale_x(args.local_scale_x);
13343 builder.add_scale_y(args.scale_y);
13344 builder.add_scale_x(args.scale_x);
13345 builder.add_rotation_z(args.rotation_z);
13346 builder.add_rotation_y(args.rotation_y);
13347 builder.add_rotation_x(args.rotation_x);
13348 builder.add_position_z(args.position_z);
13349 builder.add_position_y(args.position_y);
13350 builder.add_position_x(args.position_x);
13351 if let Some(x) = args.cell { builder.add_cell(x); }
13352 builder.add_img_flip_v(args.img_flip_v);
13353 builder.add_img_flip_h(args.img_flip_h);
13354 builder.add_hide(args.hide);
13355 builder.add_flip_v(args.flip_v);
13356 builder.add_flip_h(args.flip_h);
13357 builder.finish()
13358 }
13359
13360 pub fn unpack(&self) -> InitialPartAttributesT {
13361 let update_flag = self.update_flag();
13362 let cell = self.cell().map(|x| {
13363 alloc::boxed::Box::new(x.unpack())
13364 });
13365 let position_x = self.position_x();
13366 let position_y = self.position_y();
13367 let position_z = self.position_z();
13368 let rotation_x = self.rotation_x();
13369 let rotation_y = self.rotation_y();
13370 let rotation_z = self.rotation_z();
13371 let scale_x = self.scale_x();
13372 let scale_y = self.scale_y();
13373 let local_scale_x = self.local_scale_x();
13374 let local_scale_y = self.local_scale_y();
13375 let alpha = self.alpha();
13376 let local_alpha = self.local_alpha();
13377 let priority = self.priority();
13378 let flip_h = self.flip_h();
13379 let flip_v = self.flip_v();
13380 let hide = self.hide();
13381 let part_color = self.part_color().map(|x| {
13382 alloc::boxed::Box::new(x.unpack())
13383 });
13384 let shader = self.shader().map(|x| {
13385 alloc::boxed::Box::new(x.unpack())
13386 });
13387 let vertex = self.vertex().map(|x| {
13388 alloc::boxed::Box::new(x.unpack())
13389 });
13390 let pivot_x = self.pivot_x();
13391 let pivot_y = self.pivot_y();
13392 let anchor_x = self.anchor_x();
13393 let anchor_y = self.anchor_y();
13394 let size_x = self.size_x();
13395 let size_y = self.size_y();
13396 let img_flip_h = self.img_flip_h();
13397 let img_flip_v = self.img_flip_v();
13398 let uv_translation_x = self.uv_translation_x();
13399 let uv_translation_y = self.uv_translation_y();
13400 let uv_rotation_z = self.uv_rotation_z();
13401 let uv_scale_x = self.uv_scale_x();
13402 let uv_scale_y = self.uv_scale_y();
13403 let bounding_radius = self.bounding_radius();
13404 let mask = self.mask();
13405 let skew_x = self.skew_x();
13406 let skew_y = self.skew_y();
13407 let deform = self.deform().map(|x| {
13408 alloc::boxed::Box::new(x.unpack())
13409 });
13410 let texture = self.texture();
13411 InitialPartAttributesT {
13412 update_flag,
13413 cell,
13414 position_x,
13415 position_y,
13416 position_z,
13417 rotation_x,
13418 rotation_y,
13419 rotation_z,
13420 scale_x,
13421 scale_y,
13422 local_scale_x,
13423 local_scale_y,
13424 alpha,
13425 local_alpha,
13426 priority,
13427 flip_h,
13428 flip_v,
13429 hide,
13430 part_color,
13431 shader,
13432 vertex,
13433 pivot_x,
13434 pivot_y,
13435 anchor_x,
13436 anchor_y,
13437 size_x,
13438 size_y,
13439 img_flip_h,
13440 img_flip_v,
13441 uv_translation_x,
13442 uv_translation_y,
13443 uv_rotation_z,
13444 uv_scale_x,
13445 uv_scale_y,
13446 bounding_radius,
13447 mask,
13448 skew_x,
13449 skew_y,
13450 deform,
13451 texture,
13452 }
13453 }
13454
13455 #[inline]
13456 pub fn update_flag(&self) -> PartAttributesUpdateFlags {
13457 unsafe { self._tab.get::<PartAttributesUpdateFlags>(InitialPartAttributes::VT_UPDATE_FLAG, Some(Default::default())).unwrap()}
13461 }
13462 #[inline]
13463 pub fn cell(&self) -> Option<PartAttributeCell<'a>> {
13464 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartAttributeCell>>(InitialPartAttributes::VT_CELL, None)}
13468 }
13469 #[inline]
13470 pub fn position_x(&self) -> f32 {
13471 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_POSITION_X, Some(0.0)).unwrap()}
13475 }
13476 #[inline]
13477 pub fn position_y(&self) -> f32 {
13478 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_POSITION_Y, Some(0.0)).unwrap()}
13482 }
13483 #[inline]
13484 pub fn position_z(&self) -> f32 {
13485 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_POSITION_Z, Some(0.0)).unwrap()}
13489 }
13490 #[inline]
13491 pub fn rotation_x(&self) -> f32 {
13492 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_ROTATION_X, Some(0.0)).unwrap()}
13496 }
13497 #[inline]
13498 pub fn rotation_y(&self) -> f32 {
13499 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_ROTATION_Y, Some(0.0)).unwrap()}
13503 }
13504 #[inline]
13505 pub fn rotation_z(&self) -> f32 {
13506 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_ROTATION_Z, Some(0.0)).unwrap()}
13510 }
13511 #[inline]
13512 pub fn scale_x(&self) -> f32 {
13513 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_SCALE_X, Some(1.0)).unwrap()}
13517 }
13518 #[inline]
13519 pub fn scale_y(&self) -> f32 {
13520 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_SCALE_Y, Some(1.0)).unwrap()}
13524 }
13525 #[inline]
13526 pub fn local_scale_x(&self) -> f32 {
13527 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_LOCAL_SCALE_X, Some(1.0)).unwrap()}
13531 }
13532 #[inline]
13533 pub fn local_scale_y(&self) -> f32 {
13534 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_LOCAL_SCALE_Y, Some(1.0)).unwrap()}
13538 }
13539 #[inline]
13540 pub fn alpha(&self) -> f32 {
13541 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_ALPHA, Some(1.0)).unwrap()}
13545 }
13546 #[inline]
13547 pub fn local_alpha(&self) -> f32 {
13548 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_LOCAL_ALPHA, Some(1.0)).unwrap()}
13552 }
13553 #[inline]
13554 pub fn priority(&self) -> i32 {
13555 unsafe { self._tab.get::<i32>(InitialPartAttributes::VT_PRIORITY, Some(0)).unwrap()}
13559 }
13560 #[inline]
13561 pub fn flip_h(&self) -> bool {
13562 unsafe { self._tab.get::<bool>(InitialPartAttributes::VT_FLIP_H, Some(false)).unwrap()}
13566 }
13567 #[inline]
13568 pub fn flip_v(&self) -> bool {
13569 unsafe { self._tab.get::<bool>(InitialPartAttributes::VT_FLIP_V, Some(false)).unwrap()}
13573 }
13574 #[inline]
13575 pub fn hide(&self) -> bool {
13576 unsafe { self._tab.get::<bool>(InitialPartAttributes::VT_HIDE, Some(false)).unwrap()}
13580 }
13581 #[inline]
13582 pub fn part_color(&self) -> Option<PartAttributePartColor<'a>> {
13583 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartAttributePartColor>>(InitialPartAttributes::VT_PART_COLOR, None)}
13587 }
13588 #[inline]
13589 pub fn shader(&self) -> Option<PartAttributeShader<'a>> {
13590 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartAttributeShader>>(InitialPartAttributes::VT_SHADER, None)}
13594 }
13595 #[inline]
13596 pub fn vertex(&self) -> Option<PartAttributeVertex<'a>> {
13597 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartAttributeVertex>>(InitialPartAttributes::VT_VERTEX, None)}
13601 }
13602 #[inline]
13603 pub fn pivot_x(&self) -> f32 {
13604 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_PIVOT_X, Some(0.0)).unwrap()}
13608 }
13609 #[inline]
13610 pub fn pivot_y(&self) -> f32 {
13611 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_PIVOT_Y, Some(0.0)).unwrap()}
13615 }
13616 #[inline]
13617 pub fn anchor_x(&self) -> f32 {
13618 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_ANCHOR_X, Some(0.0)).unwrap()}
13622 }
13623 #[inline]
13624 pub fn anchor_y(&self) -> f32 {
13625 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_ANCHOR_Y, Some(0.0)).unwrap()}
13629 }
13630 #[inline]
13631 pub fn size_x(&self) -> f32 {
13632 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_SIZE_X, Some(1.0)).unwrap()}
13636 }
13637 #[inline]
13638 pub fn size_y(&self) -> f32 {
13639 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_SIZE_Y, Some(1.0)).unwrap()}
13643 }
13644 #[inline]
13645 pub fn img_flip_h(&self) -> bool {
13646 unsafe { self._tab.get::<bool>(InitialPartAttributes::VT_IMG_FLIP_H, Some(false)).unwrap()}
13650 }
13651 #[inline]
13652 pub fn img_flip_v(&self) -> bool {
13653 unsafe { self._tab.get::<bool>(InitialPartAttributes::VT_IMG_FLIP_V, Some(false)).unwrap()}
13657 }
13658 #[inline]
13659 pub fn uv_translation_x(&self) -> f32 {
13660 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_UV_TRANSLATION_X, Some(0.0)).unwrap()}
13664 }
13665 #[inline]
13666 pub fn uv_translation_y(&self) -> f32 {
13667 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_UV_TRANSLATION_Y, Some(0.0)).unwrap()}
13671 }
13672 #[inline]
13673 pub fn uv_rotation_z(&self) -> f32 {
13674 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_UV_ROTATION_Z, Some(0.0)).unwrap()}
13678 }
13679 #[inline]
13680 pub fn uv_scale_x(&self) -> f32 {
13681 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_UV_SCALE_X, Some(1.0)).unwrap()}
13685 }
13686 #[inline]
13687 pub fn uv_scale_y(&self) -> f32 {
13688 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_UV_SCALE_Y, Some(1.0)).unwrap()}
13692 }
13693 #[inline]
13694 pub fn bounding_radius(&self) -> f32 {
13695 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_BOUNDING_RADIUS, Some(0.0)).unwrap()}
13699 }
13700 #[inline]
13701 pub fn mask(&self) -> f32 {
13702 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_MASK, Some(0.0)).unwrap()}
13706 }
13707 #[inline]
13708 pub fn skew_x(&self) -> f32 {
13709 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_SKEW_X, Some(0.0)).unwrap()}
13713 }
13714 #[inline]
13715 pub fn skew_y(&self) -> f32 {
13716 unsafe { self._tab.get::<f32>(InitialPartAttributes::VT_SKEW_Y, Some(0.0)).unwrap()}
13720 }
13721 #[inline]
13722 pub fn deform(&self) -> Option<PartAttributeDeform<'a>> {
13723 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartAttributeDeform>>(InitialPartAttributes::VT_DEFORM, None)}
13727 }
13728 #[inline]
13729 pub fn texture(&self) -> u32 {
13730 unsafe { self._tab.get::<u32>(InitialPartAttributes::VT_TEXTURE, Some(0)).unwrap()}
13734 }
13735}
13736
13737impl ::flatbuffers::Verifiable for InitialPartAttributes<'_> {
13738 #[inline]
13739 fn run_verifier(
13740 v: &mut ::flatbuffers::Verifier, pos: usize
13741 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
13742 v.visit_table(pos)?
13743 .visit_field::<PartAttributesUpdateFlags>("update_flag", Self::VT_UPDATE_FLAG, false)?
13744 .visit_field::<::flatbuffers::ForwardsUOffset<PartAttributeCell>>("cell", Self::VT_CELL, false)?
13745 .visit_field::<f32>("position_x", Self::VT_POSITION_X, false)?
13746 .visit_field::<f32>("position_y", Self::VT_POSITION_Y, false)?
13747 .visit_field::<f32>("position_z", Self::VT_POSITION_Z, false)?
13748 .visit_field::<f32>("rotation_x", Self::VT_ROTATION_X, false)?
13749 .visit_field::<f32>("rotation_y", Self::VT_ROTATION_Y, false)?
13750 .visit_field::<f32>("rotation_z", Self::VT_ROTATION_Z, false)?
13751 .visit_field::<f32>("scale_x", Self::VT_SCALE_X, false)?
13752 .visit_field::<f32>("scale_y", Self::VT_SCALE_Y, false)?
13753 .visit_field::<f32>("local_scale_x", Self::VT_LOCAL_SCALE_X, false)?
13754 .visit_field::<f32>("local_scale_y", Self::VT_LOCAL_SCALE_Y, false)?
13755 .visit_field::<f32>("alpha", Self::VT_ALPHA, false)?
13756 .visit_field::<f32>("local_alpha", Self::VT_LOCAL_ALPHA, false)?
13757 .visit_field::<i32>("priority", Self::VT_PRIORITY, false)?
13758 .visit_field::<bool>("flip_h", Self::VT_FLIP_H, false)?
13759 .visit_field::<bool>("flip_v", Self::VT_FLIP_V, false)?
13760 .visit_field::<bool>("hide", Self::VT_HIDE, false)?
13761 .visit_field::<::flatbuffers::ForwardsUOffset<PartAttributePartColor>>("part_color", Self::VT_PART_COLOR, false)?
13762 .visit_field::<::flatbuffers::ForwardsUOffset<PartAttributeShader>>("shader", Self::VT_SHADER, false)?
13763 .visit_field::<::flatbuffers::ForwardsUOffset<PartAttributeVertex>>("vertex", Self::VT_VERTEX, false)?
13764 .visit_field::<f32>("pivot_x", Self::VT_PIVOT_X, false)?
13765 .visit_field::<f32>("pivot_y", Self::VT_PIVOT_Y, false)?
13766 .visit_field::<f32>("anchor_x", Self::VT_ANCHOR_X, false)?
13767 .visit_field::<f32>("anchor_y", Self::VT_ANCHOR_Y, false)?
13768 .visit_field::<f32>("size_x", Self::VT_SIZE_X, false)?
13769 .visit_field::<f32>("size_y", Self::VT_SIZE_Y, false)?
13770 .visit_field::<bool>("img_flip_h", Self::VT_IMG_FLIP_H, false)?
13771 .visit_field::<bool>("img_flip_v", Self::VT_IMG_FLIP_V, false)?
13772 .visit_field::<f32>("uv_translation_x", Self::VT_UV_TRANSLATION_X, false)?
13773 .visit_field::<f32>("uv_translation_y", Self::VT_UV_TRANSLATION_Y, false)?
13774 .visit_field::<f32>("uv_rotation_z", Self::VT_UV_ROTATION_Z, false)?
13775 .visit_field::<f32>("uv_scale_x", Self::VT_UV_SCALE_X, false)?
13776 .visit_field::<f32>("uv_scale_y", Self::VT_UV_SCALE_Y, false)?
13777 .visit_field::<f32>("bounding_radius", Self::VT_BOUNDING_RADIUS, false)?
13778 .visit_field::<f32>("mask", Self::VT_MASK, false)?
13779 .visit_field::<f32>("skew_x", Self::VT_SKEW_X, false)?
13780 .visit_field::<f32>("skew_y", Self::VT_SKEW_Y, false)?
13781 .visit_field::<::flatbuffers::ForwardsUOffset<PartAttributeDeform>>("deform", Self::VT_DEFORM, false)?
13782 .visit_field::<u32>("texture", Self::VT_TEXTURE, false)?
13783 .finish();
13784 Ok(())
13785 }
13786}
13787pub struct InitialPartAttributesArgs<'a> {
13788 pub update_flag: PartAttributesUpdateFlags,
13789 pub cell: Option<::flatbuffers::WIPOffset<PartAttributeCell<'a>>>,
13790 pub position_x: f32,
13791 pub position_y: f32,
13792 pub position_z: f32,
13793 pub rotation_x: f32,
13794 pub rotation_y: f32,
13795 pub rotation_z: f32,
13796 pub scale_x: f32,
13797 pub scale_y: f32,
13798 pub local_scale_x: f32,
13799 pub local_scale_y: f32,
13800 pub alpha: f32,
13801 pub local_alpha: f32,
13802 pub priority: i32,
13803 pub flip_h: bool,
13804 pub flip_v: bool,
13805 pub hide: bool,
13806 pub part_color: Option<::flatbuffers::WIPOffset<PartAttributePartColor<'a>>>,
13807 pub shader: Option<::flatbuffers::WIPOffset<PartAttributeShader<'a>>>,
13808 pub vertex: Option<::flatbuffers::WIPOffset<PartAttributeVertex<'a>>>,
13809 pub pivot_x: f32,
13810 pub pivot_y: f32,
13811 pub anchor_x: f32,
13812 pub anchor_y: f32,
13813 pub size_x: f32,
13814 pub size_y: f32,
13815 pub img_flip_h: bool,
13816 pub img_flip_v: bool,
13817 pub uv_translation_x: f32,
13818 pub uv_translation_y: f32,
13819 pub uv_rotation_z: f32,
13820 pub uv_scale_x: f32,
13821 pub uv_scale_y: f32,
13822 pub bounding_radius: f32,
13823 pub mask: f32,
13824 pub skew_x: f32,
13825 pub skew_y: f32,
13826 pub deform: Option<::flatbuffers::WIPOffset<PartAttributeDeform<'a>>>,
13827 pub texture: u32,
13828}
13829impl<'a> Default for InitialPartAttributesArgs<'a> {
13830 #[inline]
13831 fn default() -> Self {
13832 InitialPartAttributesArgs {
13833 update_flag: Default::default(),
13834 cell: None,
13835 position_x: 0.0,
13836 position_y: 0.0,
13837 position_z: 0.0,
13838 rotation_x: 0.0,
13839 rotation_y: 0.0,
13840 rotation_z: 0.0,
13841 scale_x: 1.0,
13842 scale_y: 1.0,
13843 local_scale_x: 1.0,
13844 local_scale_y: 1.0,
13845 alpha: 1.0,
13846 local_alpha: 1.0,
13847 priority: 0,
13848 flip_h: false,
13849 flip_v: false,
13850 hide: false,
13851 part_color: None,
13852 shader: None,
13853 vertex: None,
13854 pivot_x: 0.0,
13855 pivot_y: 0.0,
13856 anchor_x: 0.0,
13857 anchor_y: 0.0,
13858 size_x: 1.0,
13859 size_y: 1.0,
13860 img_flip_h: false,
13861 img_flip_v: false,
13862 uv_translation_x: 0.0,
13863 uv_translation_y: 0.0,
13864 uv_rotation_z: 0.0,
13865 uv_scale_x: 1.0,
13866 uv_scale_y: 1.0,
13867 bounding_radius: 0.0,
13868 mask: 0.0,
13869 skew_x: 0.0,
13870 skew_y: 0.0,
13871 deform: None,
13872 texture: 0,
13873 }
13874 }
13875}
13876
13877pub struct InitialPartAttributesBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
13878 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
13879 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
13880}
13881impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> InitialPartAttributesBuilder<'a, 'b, A> {
13882 #[inline]
13883 pub fn add_update_flag(&mut self, update_flag: PartAttributesUpdateFlags) {
13884 self.fbb_.push_slot::<PartAttributesUpdateFlags>(InitialPartAttributes::VT_UPDATE_FLAG, update_flag, Default::default());
13885 }
13886 #[inline]
13887 pub fn add_cell(&mut self, cell: ::flatbuffers::WIPOffset<PartAttributeCell<'b >>) {
13888 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartAttributeCell>>(InitialPartAttributes::VT_CELL, cell);
13889 }
13890 #[inline]
13891 pub fn add_position_x(&mut self, position_x: f32) {
13892 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_POSITION_X, position_x, 0.0);
13893 }
13894 #[inline]
13895 pub fn add_position_y(&mut self, position_y: f32) {
13896 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_POSITION_Y, position_y, 0.0);
13897 }
13898 #[inline]
13899 pub fn add_position_z(&mut self, position_z: f32) {
13900 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_POSITION_Z, position_z, 0.0);
13901 }
13902 #[inline]
13903 pub fn add_rotation_x(&mut self, rotation_x: f32) {
13904 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_ROTATION_X, rotation_x, 0.0);
13905 }
13906 #[inline]
13907 pub fn add_rotation_y(&mut self, rotation_y: f32) {
13908 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_ROTATION_Y, rotation_y, 0.0);
13909 }
13910 #[inline]
13911 pub fn add_rotation_z(&mut self, rotation_z: f32) {
13912 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_ROTATION_Z, rotation_z, 0.0);
13913 }
13914 #[inline]
13915 pub fn add_scale_x(&mut self, scale_x: f32) {
13916 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_SCALE_X, scale_x, 1.0);
13917 }
13918 #[inline]
13919 pub fn add_scale_y(&mut self, scale_y: f32) {
13920 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_SCALE_Y, scale_y, 1.0);
13921 }
13922 #[inline]
13923 pub fn add_local_scale_x(&mut self, local_scale_x: f32) {
13924 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_LOCAL_SCALE_X, local_scale_x, 1.0);
13925 }
13926 #[inline]
13927 pub fn add_local_scale_y(&mut self, local_scale_y: f32) {
13928 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_LOCAL_SCALE_Y, local_scale_y, 1.0);
13929 }
13930 #[inline]
13931 pub fn add_alpha(&mut self, alpha: f32) {
13932 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_ALPHA, alpha, 1.0);
13933 }
13934 #[inline]
13935 pub fn add_local_alpha(&mut self, local_alpha: f32) {
13936 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_LOCAL_ALPHA, local_alpha, 1.0);
13937 }
13938 #[inline]
13939 pub fn add_priority(&mut self, priority: i32) {
13940 self.fbb_.push_slot::<i32>(InitialPartAttributes::VT_PRIORITY, priority, 0);
13941 }
13942 #[inline]
13943 pub fn add_flip_h(&mut self, flip_h: bool) {
13944 self.fbb_.push_slot::<bool>(InitialPartAttributes::VT_FLIP_H, flip_h, false);
13945 }
13946 #[inline]
13947 pub fn add_flip_v(&mut self, flip_v: bool) {
13948 self.fbb_.push_slot::<bool>(InitialPartAttributes::VT_FLIP_V, flip_v, false);
13949 }
13950 #[inline]
13951 pub fn add_hide(&mut self, hide: bool) {
13952 self.fbb_.push_slot::<bool>(InitialPartAttributes::VT_HIDE, hide, false);
13953 }
13954 #[inline]
13955 pub fn add_part_color(&mut self, part_color: ::flatbuffers::WIPOffset<PartAttributePartColor<'b >>) {
13956 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartAttributePartColor>>(InitialPartAttributes::VT_PART_COLOR, part_color);
13957 }
13958 #[inline]
13959 pub fn add_shader(&mut self, shader: ::flatbuffers::WIPOffset<PartAttributeShader<'b >>) {
13960 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartAttributeShader>>(InitialPartAttributes::VT_SHADER, shader);
13961 }
13962 #[inline]
13963 pub fn add_vertex(&mut self, vertex: ::flatbuffers::WIPOffset<PartAttributeVertex<'b >>) {
13964 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartAttributeVertex>>(InitialPartAttributes::VT_VERTEX, vertex);
13965 }
13966 #[inline]
13967 pub fn add_pivot_x(&mut self, pivot_x: f32) {
13968 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_PIVOT_X, pivot_x, 0.0);
13969 }
13970 #[inline]
13971 pub fn add_pivot_y(&mut self, pivot_y: f32) {
13972 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_PIVOT_Y, pivot_y, 0.0);
13973 }
13974 #[inline]
13975 pub fn add_anchor_x(&mut self, anchor_x: f32) {
13976 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_ANCHOR_X, anchor_x, 0.0);
13977 }
13978 #[inline]
13979 pub fn add_anchor_y(&mut self, anchor_y: f32) {
13980 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_ANCHOR_Y, anchor_y, 0.0);
13981 }
13982 #[inline]
13983 pub fn add_size_x(&mut self, size_x: f32) {
13984 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_SIZE_X, size_x, 1.0);
13985 }
13986 #[inline]
13987 pub fn add_size_y(&mut self, size_y: f32) {
13988 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_SIZE_Y, size_y, 1.0);
13989 }
13990 #[inline]
13991 pub fn add_img_flip_h(&mut self, img_flip_h: bool) {
13992 self.fbb_.push_slot::<bool>(InitialPartAttributes::VT_IMG_FLIP_H, img_flip_h, false);
13993 }
13994 #[inline]
13995 pub fn add_img_flip_v(&mut self, img_flip_v: bool) {
13996 self.fbb_.push_slot::<bool>(InitialPartAttributes::VT_IMG_FLIP_V, img_flip_v, false);
13997 }
13998 #[inline]
13999 pub fn add_uv_translation_x(&mut self, uv_translation_x: f32) {
14000 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_UV_TRANSLATION_X, uv_translation_x, 0.0);
14001 }
14002 #[inline]
14003 pub fn add_uv_translation_y(&mut self, uv_translation_y: f32) {
14004 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_UV_TRANSLATION_Y, uv_translation_y, 0.0);
14005 }
14006 #[inline]
14007 pub fn add_uv_rotation_z(&mut self, uv_rotation_z: f32) {
14008 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_UV_ROTATION_Z, uv_rotation_z, 0.0);
14009 }
14010 #[inline]
14011 pub fn add_uv_scale_x(&mut self, uv_scale_x: f32) {
14012 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_UV_SCALE_X, uv_scale_x, 1.0);
14013 }
14014 #[inline]
14015 pub fn add_uv_scale_y(&mut self, uv_scale_y: f32) {
14016 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_UV_SCALE_Y, uv_scale_y, 1.0);
14017 }
14018 #[inline]
14019 pub fn add_bounding_radius(&mut self, bounding_radius: f32) {
14020 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_BOUNDING_RADIUS, bounding_radius, 0.0);
14021 }
14022 #[inline]
14023 pub fn add_mask(&mut self, mask: f32) {
14024 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_MASK, mask, 0.0);
14025 }
14026 #[inline]
14027 pub fn add_skew_x(&mut self, skew_x: f32) {
14028 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_SKEW_X, skew_x, 0.0);
14029 }
14030 #[inline]
14031 pub fn add_skew_y(&mut self, skew_y: f32) {
14032 self.fbb_.push_slot::<f32>(InitialPartAttributes::VT_SKEW_Y, skew_y, 0.0);
14033 }
14034 #[inline]
14035 pub fn add_deform(&mut self, deform: ::flatbuffers::WIPOffset<PartAttributeDeform<'b >>) {
14036 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartAttributeDeform>>(InitialPartAttributes::VT_DEFORM, deform);
14037 }
14038 #[inline]
14039 pub fn add_texture(&mut self, texture: u32) {
14040 self.fbb_.push_slot::<u32>(InitialPartAttributes::VT_TEXTURE, texture, 0);
14041 }
14042 #[inline]
14043 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> InitialPartAttributesBuilder<'a, 'b, A> {
14044 let start = _fbb.start_table();
14045 InitialPartAttributesBuilder {
14046 fbb_: _fbb,
14047 start_: start,
14048 }
14049 }
14050 #[inline]
14051 pub fn finish(self) -> ::flatbuffers::WIPOffset<InitialPartAttributes<'a>> {
14052 let o = self.fbb_.end_table(self.start_);
14053 ::flatbuffers::WIPOffset::new(o.value())
14054 }
14055}
14056
14057impl ::core::fmt::Debug for InitialPartAttributes<'_> {
14058 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
14059 let mut ds = f.debug_struct("InitialPartAttributes");
14060 ds.field("update_flag", &self.update_flag());
14061 ds.field("cell", &self.cell());
14062 ds.field("position_x", &self.position_x());
14063 ds.field("position_y", &self.position_y());
14064 ds.field("position_z", &self.position_z());
14065 ds.field("rotation_x", &self.rotation_x());
14066 ds.field("rotation_y", &self.rotation_y());
14067 ds.field("rotation_z", &self.rotation_z());
14068 ds.field("scale_x", &self.scale_x());
14069 ds.field("scale_y", &self.scale_y());
14070 ds.field("local_scale_x", &self.local_scale_x());
14071 ds.field("local_scale_y", &self.local_scale_y());
14072 ds.field("alpha", &self.alpha());
14073 ds.field("local_alpha", &self.local_alpha());
14074 ds.field("priority", &self.priority());
14075 ds.field("flip_h", &self.flip_h());
14076 ds.field("flip_v", &self.flip_v());
14077 ds.field("hide", &self.hide());
14078 ds.field("part_color", &self.part_color());
14079 ds.field("shader", &self.shader());
14080 ds.field("vertex", &self.vertex());
14081 ds.field("pivot_x", &self.pivot_x());
14082 ds.field("pivot_y", &self.pivot_y());
14083 ds.field("anchor_x", &self.anchor_x());
14084 ds.field("anchor_y", &self.anchor_y());
14085 ds.field("size_x", &self.size_x());
14086 ds.field("size_y", &self.size_y());
14087 ds.field("img_flip_h", &self.img_flip_h());
14088 ds.field("img_flip_v", &self.img_flip_v());
14089 ds.field("uv_translation_x", &self.uv_translation_x());
14090 ds.field("uv_translation_y", &self.uv_translation_y());
14091 ds.field("uv_rotation_z", &self.uv_rotation_z());
14092 ds.field("uv_scale_x", &self.uv_scale_x());
14093 ds.field("uv_scale_y", &self.uv_scale_y());
14094 ds.field("bounding_radius", &self.bounding_radius());
14095 ds.field("mask", &self.mask());
14096 ds.field("skew_x", &self.skew_x());
14097 ds.field("skew_y", &self.skew_y());
14098 ds.field("deform", &self.deform());
14099 ds.field("texture", &self.texture());
14100 ds.finish()
14101 }
14102}
14103#[non_exhaustive]
14104#[derive(Debug, Clone, PartialEq)]
14105pub struct InitialPartAttributesT {
14106 pub update_flag: PartAttributesUpdateFlags,
14107 pub cell: Option<alloc::boxed::Box<PartAttributeCellT>>,
14108 pub position_x: f32,
14109 pub position_y: f32,
14110 pub position_z: f32,
14111 pub rotation_x: f32,
14112 pub rotation_y: f32,
14113 pub rotation_z: f32,
14114 pub scale_x: f32,
14115 pub scale_y: f32,
14116 pub local_scale_x: f32,
14117 pub local_scale_y: f32,
14118 pub alpha: f32,
14119 pub local_alpha: f32,
14120 pub priority: i32,
14121 pub flip_h: bool,
14122 pub flip_v: bool,
14123 pub hide: bool,
14124 pub part_color: Option<alloc::boxed::Box<PartAttributePartColorT>>,
14125 pub shader: Option<alloc::boxed::Box<PartAttributeShaderT>>,
14126 pub vertex: Option<alloc::boxed::Box<PartAttributeVertexT>>,
14127 pub pivot_x: f32,
14128 pub pivot_y: f32,
14129 pub anchor_x: f32,
14130 pub anchor_y: f32,
14131 pub size_x: f32,
14132 pub size_y: f32,
14133 pub img_flip_h: bool,
14134 pub img_flip_v: bool,
14135 pub uv_translation_x: f32,
14136 pub uv_translation_y: f32,
14137 pub uv_rotation_z: f32,
14138 pub uv_scale_x: f32,
14139 pub uv_scale_y: f32,
14140 pub bounding_radius: f32,
14141 pub mask: f32,
14142 pub skew_x: f32,
14143 pub skew_y: f32,
14144 pub deform: Option<alloc::boxed::Box<PartAttributeDeformT>>,
14145 pub texture: u32,
14146}
14147impl Default for InitialPartAttributesT {
14148 fn default() -> Self {
14149 Self {
14150 update_flag: Default::default(),
14151 cell: None,
14152 position_x: 0.0,
14153 position_y: 0.0,
14154 position_z: 0.0,
14155 rotation_x: 0.0,
14156 rotation_y: 0.0,
14157 rotation_z: 0.0,
14158 scale_x: 1.0,
14159 scale_y: 1.0,
14160 local_scale_x: 1.0,
14161 local_scale_y: 1.0,
14162 alpha: 1.0,
14163 local_alpha: 1.0,
14164 priority: 0,
14165 flip_h: false,
14166 flip_v: false,
14167 hide: false,
14168 part_color: None,
14169 shader: None,
14170 vertex: None,
14171 pivot_x: 0.0,
14172 pivot_y: 0.0,
14173 anchor_x: 0.0,
14174 anchor_y: 0.0,
14175 size_x: 1.0,
14176 size_y: 1.0,
14177 img_flip_h: false,
14178 img_flip_v: false,
14179 uv_translation_x: 0.0,
14180 uv_translation_y: 0.0,
14181 uv_rotation_z: 0.0,
14182 uv_scale_x: 1.0,
14183 uv_scale_y: 1.0,
14184 bounding_radius: 0.0,
14185 mask: 0.0,
14186 skew_x: 0.0,
14187 skew_y: 0.0,
14188 deform: None,
14189 texture: 0,
14190 }
14191 }
14192}
14193impl InitialPartAttributesT {
14194 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
14195 &self,
14196 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
14197 ) -> ::flatbuffers::WIPOffset<InitialPartAttributes<'b>> {
14198 let update_flag = self.update_flag;
14199 let cell = self.cell.as_ref().map(|x|{
14200 x.pack(_fbb)
14201 });
14202 let position_x = self.position_x;
14203 let position_y = self.position_y;
14204 let position_z = self.position_z;
14205 let rotation_x = self.rotation_x;
14206 let rotation_y = self.rotation_y;
14207 let rotation_z = self.rotation_z;
14208 let scale_x = self.scale_x;
14209 let scale_y = self.scale_y;
14210 let local_scale_x = self.local_scale_x;
14211 let local_scale_y = self.local_scale_y;
14212 let alpha = self.alpha;
14213 let local_alpha = self.local_alpha;
14214 let priority = self.priority;
14215 let flip_h = self.flip_h;
14216 let flip_v = self.flip_v;
14217 let hide = self.hide;
14218 let part_color = self.part_color.as_ref().map(|x|{
14219 x.pack(_fbb)
14220 });
14221 let shader = self.shader.as_ref().map(|x|{
14222 x.pack(_fbb)
14223 });
14224 let vertex = self.vertex.as_ref().map(|x|{
14225 x.pack(_fbb)
14226 });
14227 let pivot_x = self.pivot_x;
14228 let pivot_y = self.pivot_y;
14229 let anchor_x = self.anchor_x;
14230 let anchor_y = self.anchor_y;
14231 let size_x = self.size_x;
14232 let size_y = self.size_y;
14233 let img_flip_h = self.img_flip_h;
14234 let img_flip_v = self.img_flip_v;
14235 let uv_translation_x = self.uv_translation_x;
14236 let uv_translation_y = self.uv_translation_y;
14237 let uv_rotation_z = self.uv_rotation_z;
14238 let uv_scale_x = self.uv_scale_x;
14239 let uv_scale_y = self.uv_scale_y;
14240 let bounding_radius = self.bounding_radius;
14241 let mask = self.mask;
14242 let skew_x = self.skew_x;
14243 let skew_y = self.skew_y;
14244 let deform = self.deform.as_ref().map(|x|{
14245 x.pack(_fbb)
14246 });
14247 let texture = self.texture;
14248 InitialPartAttributes::create(_fbb, &InitialPartAttributesArgs{
14249 update_flag,
14250 cell,
14251 position_x,
14252 position_y,
14253 position_z,
14254 rotation_x,
14255 rotation_y,
14256 rotation_z,
14257 scale_x,
14258 scale_y,
14259 local_scale_x,
14260 local_scale_y,
14261 alpha,
14262 local_alpha,
14263 priority,
14264 flip_h,
14265 flip_v,
14266 hide,
14267 part_color,
14268 shader,
14269 vertex,
14270 pivot_x,
14271 pivot_y,
14272 anchor_x,
14273 anchor_y,
14274 size_x,
14275 size_y,
14276 img_flip_h,
14277 img_flip_v,
14278 uv_translation_x,
14279 uv_translation_y,
14280 uv_rotation_z,
14281 uv_scale_x,
14282 uv_scale_y,
14283 bounding_radius,
14284 mask,
14285 skew_x,
14286 skew_y,
14287 deform,
14288 texture,
14289 })
14290 }
14291}
14292pub enum InitialEventsOffset {}
14293#[derive(Copy, Clone, PartialEq)]
14294
14295pub struct InitialEvents<'a> {
14296 pub _tab: ::flatbuffers::Table<'a>,
14297}
14298
14299impl<'a> ::flatbuffers::Follow<'a> for InitialEvents<'a> {
14300 type Inner = InitialEvents<'a>;
14301 #[inline]
14302 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
14303 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
14304 }
14305}
14306
14307impl<'a> InitialEvents<'a> {
14308 pub const VT_USER: ::flatbuffers::VOffsetT = 4;
14309 pub const VT_SIGNAL: ::flatbuffers::VOffsetT = 6;
14310 pub const VT_AUDIO: ::flatbuffers::VOffsetT = 8;
14311 pub const VT_INSTANCE: ::flatbuffers::VOffsetT = 10;
14312 pub const VT_EFFECT: ::flatbuffers::VOffsetT = 12;
14313
14314 #[inline]
14315 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
14316 InitialEvents { _tab: table }
14317 }
14318 #[allow(unused_mut)]
14319 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
14320 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
14321 args: &'args InitialEventsArgs<'args>
14322 ) -> ::flatbuffers::WIPOffset<InitialEvents<'bldr>> {
14323 let mut builder = InitialEventsBuilder::new(_fbb);
14324 if let Some(x) = args.effect { builder.add_effect(x); }
14325 if let Some(x) = args.instance { builder.add_instance(x); }
14326 if let Some(x) = args.audio { builder.add_audio(x); }
14327 if let Some(x) = args.signal { builder.add_signal(x); }
14328 if let Some(x) = args.user { builder.add_user(x); }
14329 builder.finish()
14330 }
14331
14332 pub fn unpack(&self) -> InitialEventsT {
14333 let user = self.user().map(|x| {
14334 alloc::boxed::Box::new(x.unpack())
14335 });
14336 let signal = self.signal().map(|x| {
14337 alloc::boxed::Box::new(x.unpack())
14338 });
14339 let audio = self.audio().map(|x| {
14340 alloc::boxed::Box::new(x.unpack())
14341 });
14342 let instance = self.instance().map(|x| {
14343 alloc::boxed::Box::new(x.unpack())
14344 });
14345 let effect = self.effect().map(|x| {
14346 alloc::boxed::Box::new(x.unpack())
14347 });
14348 InitialEventsT {
14349 user,
14350 signal,
14351 audio,
14352 instance,
14353 effect,
14354 }
14355 }
14356
14357 #[inline]
14358 pub fn user(&self) -> Option<PartAttributeUserData<'a>> {
14359 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartAttributeUserData>>(InitialEvents::VT_USER, None)}
14363 }
14364 #[inline]
14365 pub fn signal(&self) -> Option<PartAttributeSignal<'a>> {
14366 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartAttributeSignal>>(InitialEvents::VT_SIGNAL, None)}
14370 }
14371 #[inline]
14372 pub fn audio(&self) -> Option<PartAttributeAudio<'a>> {
14373 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartAttributeAudio>>(InitialEvents::VT_AUDIO, None)}
14377 }
14378 #[inline]
14379 pub fn instance(&self) -> Option<PartAttributeInstance<'a>> {
14380 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartAttributeInstance>>(InitialEvents::VT_INSTANCE, None)}
14384 }
14385 #[inline]
14386 pub fn effect(&self) -> Option<PartAttributeEffect<'a>> {
14387 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartAttributeEffect>>(InitialEvents::VT_EFFECT, None)}
14391 }
14392}
14393
14394impl ::flatbuffers::Verifiable for InitialEvents<'_> {
14395 #[inline]
14396 fn run_verifier(
14397 v: &mut ::flatbuffers::Verifier, pos: usize
14398 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
14399 v.visit_table(pos)?
14400 .visit_field::<::flatbuffers::ForwardsUOffset<PartAttributeUserData>>("user", Self::VT_USER, false)?
14401 .visit_field::<::flatbuffers::ForwardsUOffset<PartAttributeSignal>>("signal", Self::VT_SIGNAL, false)?
14402 .visit_field::<::flatbuffers::ForwardsUOffset<PartAttributeAudio>>("audio", Self::VT_AUDIO, false)?
14403 .visit_field::<::flatbuffers::ForwardsUOffset<PartAttributeInstance>>("instance", Self::VT_INSTANCE, false)?
14404 .visit_field::<::flatbuffers::ForwardsUOffset<PartAttributeEffect>>("effect", Self::VT_EFFECT, false)?
14405 .finish();
14406 Ok(())
14407 }
14408}
14409pub struct InitialEventsArgs<'a> {
14410 pub user: Option<::flatbuffers::WIPOffset<PartAttributeUserData<'a>>>,
14411 pub signal: Option<::flatbuffers::WIPOffset<PartAttributeSignal<'a>>>,
14412 pub audio: Option<::flatbuffers::WIPOffset<PartAttributeAudio<'a>>>,
14413 pub instance: Option<::flatbuffers::WIPOffset<PartAttributeInstance<'a>>>,
14414 pub effect: Option<::flatbuffers::WIPOffset<PartAttributeEffect<'a>>>,
14415}
14416impl<'a> Default for InitialEventsArgs<'a> {
14417 #[inline]
14418 fn default() -> Self {
14419 InitialEventsArgs {
14420 user: None,
14421 signal: None,
14422 audio: None,
14423 instance: None,
14424 effect: None,
14425 }
14426 }
14427}
14428
14429pub struct InitialEventsBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
14430 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
14431 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
14432}
14433impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> InitialEventsBuilder<'a, 'b, A> {
14434 #[inline]
14435 pub fn add_user(&mut self, user: ::flatbuffers::WIPOffset<PartAttributeUserData<'b >>) {
14436 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartAttributeUserData>>(InitialEvents::VT_USER, user);
14437 }
14438 #[inline]
14439 pub fn add_signal(&mut self, signal: ::flatbuffers::WIPOffset<PartAttributeSignal<'b >>) {
14440 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartAttributeSignal>>(InitialEvents::VT_SIGNAL, signal);
14441 }
14442 #[inline]
14443 pub fn add_audio(&mut self, audio: ::flatbuffers::WIPOffset<PartAttributeAudio<'b >>) {
14444 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartAttributeAudio>>(InitialEvents::VT_AUDIO, audio);
14445 }
14446 #[inline]
14447 pub fn add_instance(&mut self, instance: ::flatbuffers::WIPOffset<PartAttributeInstance<'b >>) {
14448 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartAttributeInstance>>(InitialEvents::VT_INSTANCE, instance);
14449 }
14450 #[inline]
14451 pub fn add_effect(&mut self, effect: ::flatbuffers::WIPOffset<PartAttributeEffect<'b >>) {
14452 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartAttributeEffect>>(InitialEvents::VT_EFFECT, effect);
14453 }
14454 #[inline]
14455 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> InitialEventsBuilder<'a, 'b, A> {
14456 let start = _fbb.start_table();
14457 InitialEventsBuilder {
14458 fbb_: _fbb,
14459 start_: start,
14460 }
14461 }
14462 #[inline]
14463 pub fn finish(self) -> ::flatbuffers::WIPOffset<InitialEvents<'a>> {
14464 let o = self.fbb_.end_table(self.start_);
14465 ::flatbuffers::WIPOffset::new(o.value())
14466 }
14467}
14468
14469impl ::core::fmt::Debug for InitialEvents<'_> {
14470 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
14471 let mut ds = f.debug_struct("InitialEvents");
14472 ds.field("user", &self.user());
14473 ds.field("signal", &self.signal());
14474 ds.field("audio", &self.audio());
14475 ds.field("instance", &self.instance());
14476 ds.field("effect", &self.effect());
14477 ds.finish()
14478 }
14479}
14480#[non_exhaustive]
14481#[derive(Debug, Clone, PartialEq)]
14482pub struct InitialEventsT {
14483 pub user: Option<alloc::boxed::Box<PartAttributeUserDataT>>,
14484 pub signal: Option<alloc::boxed::Box<PartAttributeSignalT>>,
14485 pub audio: Option<alloc::boxed::Box<PartAttributeAudioT>>,
14486 pub instance: Option<alloc::boxed::Box<PartAttributeInstanceT>>,
14487 pub effect: Option<alloc::boxed::Box<PartAttributeEffectT>>,
14488}
14489impl Default for InitialEventsT {
14490 fn default() -> Self {
14491 Self {
14492 user: None,
14493 signal: None,
14494 audio: None,
14495 instance: None,
14496 effect: None,
14497 }
14498 }
14499}
14500impl InitialEventsT {
14501 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
14502 &self,
14503 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
14504 ) -> ::flatbuffers::WIPOffset<InitialEvents<'b>> {
14505 let user = self.user.as_ref().map(|x|{
14506 x.pack(_fbb)
14507 });
14508 let signal = self.signal.as_ref().map(|x|{
14509 x.pack(_fbb)
14510 });
14511 let audio = self.audio.as_ref().map(|x|{
14512 x.pack(_fbb)
14513 });
14514 let instance = self.instance.as_ref().map(|x|{
14515 x.pack(_fbb)
14516 });
14517 let effect = self.effect.as_ref().map(|x|{
14518 x.pack(_fbb)
14519 });
14520 InitialEvents::create(_fbb, &InitialEventsArgs{
14521 user,
14522 signal,
14523 audio,
14524 instance,
14525 effect,
14526 })
14527 }
14528}
14529pub enum PartTypeShapeOffset {}
14530#[derive(Copy, Clone, PartialEq)]
14531
14532pub struct PartTypeShape<'a> {
14533 pub _tab: ::flatbuffers::Table<'a>,
14534}
14535
14536impl<'a> ::flatbuffers::Follow<'a> for PartTypeShape<'a> {
14537 type Inner = PartTypeShape<'a>;
14538 #[inline]
14539 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
14540 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
14541 }
14542}
14543
14544impl<'a> PartTypeShape<'a> {
14545 pub const VT_SHAPE_TYPE: ::flatbuffers::VOffsetT = 4;
14546
14547 #[inline]
14548 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
14549 PartTypeShape { _tab: table }
14550 }
14551 #[allow(unused_mut)]
14552 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
14553 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
14554 args: &'args PartTypeShapeArgs
14555 ) -> ::flatbuffers::WIPOffset<PartTypeShape<'bldr>> {
14556 let mut builder = PartTypeShapeBuilder::new(_fbb);
14557 builder.add_shape_type(args.shape_type);
14558 builder.finish()
14559 }
14560
14561 pub fn unpack(&self) -> PartTypeShapeT {
14562 let shape_type = self.shape_type();
14563 PartTypeShapeT {
14564 shape_type,
14565 }
14566 }
14567
14568 #[inline]
14569 pub fn shape_type(&self) -> ShapeType {
14570 unsafe { self._tab.get::<ShapeType>(PartTypeShape::VT_SHAPE_TYPE, Some(ShapeType::Unknown)).unwrap()}
14574 }
14575}
14576
14577impl ::flatbuffers::Verifiable for PartTypeShape<'_> {
14578 #[inline]
14579 fn run_verifier(
14580 v: &mut ::flatbuffers::Verifier, pos: usize
14581 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
14582 v.visit_table(pos)?
14583 .visit_field::<ShapeType>("shape_type", Self::VT_SHAPE_TYPE, false)?
14584 .finish();
14585 Ok(())
14586 }
14587}
14588pub struct PartTypeShapeArgs {
14589 pub shape_type: ShapeType,
14590}
14591impl<'a> Default for PartTypeShapeArgs {
14592 #[inline]
14593 fn default() -> Self {
14594 PartTypeShapeArgs {
14595 shape_type: ShapeType::Unknown,
14596 }
14597 }
14598}
14599
14600pub struct PartTypeShapeBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
14601 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
14602 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
14603}
14604impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartTypeShapeBuilder<'a, 'b, A> {
14605 #[inline]
14606 pub fn add_shape_type(&mut self, shape_type: ShapeType) {
14607 self.fbb_.push_slot::<ShapeType>(PartTypeShape::VT_SHAPE_TYPE, shape_type, ShapeType::Unknown);
14608 }
14609 #[inline]
14610 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartTypeShapeBuilder<'a, 'b, A> {
14611 let start = _fbb.start_table();
14612 PartTypeShapeBuilder {
14613 fbb_: _fbb,
14614 start_: start,
14615 }
14616 }
14617 #[inline]
14618 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartTypeShape<'a>> {
14619 let o = self.fbb_.end_table(self.start_);
14620 ::flatbuffers::WIPOffset::new(o.value())
14621 }
14622}
14623
14624impl ::core::fmt::Debug for PartTypeShape<'_> {
14625 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
14626 let mut ds = f.debug_struct("PartTypeShape");
14627 ds.field("shape_type", &self.shape_type());
14628 ds.finish()
14629 }
14630}
14631#[non_exhaustive]
14632#[derive(Debug, Clone, PartialEq)]
14633pub struct PartTypeShapeT {
14634 pub shape_type: ShapeType,
14635}
14636impl Default for PartTypeShapeT {
14637 fn default() -> Self {
14638 Self {
14639 shape_type: ShapeType::Unknown,
14640 }
14641 }
14642}
14643impl PartTypeShapeT {
14644 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
14645 &self,
14646 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
14647 ) -> ::flatbuffers::WIPOffset<PartTypeShape<'b>> {
14648 let shape_type = self.shape_type;
14649 PartTypeShape::create(_fbb, &PartTypeShapeArgs{
14650 shape_type,
14651 })
14652 }
14653}
14654pub enum PartTypeTextOffset {}
14655#[derive(Copy, Clone, PartialEq)]
14656
14657pub struct PartTypeText<'a> {
14658 pub _tab: ::flatbuffers::Table<'a>,
14659}
14660
14661impl<'a> ::flatbuffers::Follow<'a> for PartTypeText<'a> {
14662 type Inner = PartTypeText<'a>;
14663 #[inline]
14664 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
14665 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
14666 }
14667}
14668
14669impl<'a> PartTypeText<'a> {
14670 pub const VT_TEXT: ::flatbuffers::VOffsetT = 4;
14671 pub const VT_TEXT_BITMAP: ::flatbuffers::VOffsetT = 6;
14672 pub const VT_TEXT_FAMILY: ::flatbuffers::VOffsetT = 8;
14673 pub const VT_TEXT_CHAR_MAP: ::flatbuffers::VOffsetT = 10;
14674 pub const VT_TEXT_SIZE: ::flatbuffers::VOffsetT = 12;
14675 pub const VT_TEXT_SPACE: ::flatbuffers::VOffsetT = 14;
14676 pub const VT_TEXT_SMOOTH: ::flatbuffers::VOffsetT = 16;
14677 pub const VT_TEXT_WIDTH: ::flatbuffers::VOffsetT = 18;
14678 pub const VT_TEXT_HEIGHT: ::flatbuffers::VOffsetT = 20;
14679 pub const VT_E_ANCHOR: ::flatbuffers::VOffsetT = 22;
14680
14681 #[inline]
14682 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
14683 PartTypeText { _tab: table }
14684 }
14685 #[allow(unused_mut)]
14686 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
14687 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
14688 args: &'args PartTypeTextArgs<'args>
14689 ) -> ::flatbuffers::WIPOffset<PartTypeText<'bldr>> {
14690 let mut builder = PartTypeTextBuilder::new(_fbb);
14691 builder.add_text_height(args.text_height);
14692 builder.add_text_width(args.text_width);
14693 builder.add_text_space(args.text_space);
14694 builder.add_text_size(args.text_size);
14695 if let Some(x) = args.text_char_map { builder.add_text_char_map(x); }
14696 if let Some(x) = args.text_family { builder.add_text_family(x); }
14697 if let Some(x) = args.text { builder.add_text(x); }
14698 builder.add_e_anchor(args.e_anchor);
14699 builder.add_text_smooth(args.text_smooth);
14700 builder.add_text_bitmap(args.text_bitmap);
14701 builder.finish()
14702 }
14703
14704 pub fn unpack(&self) -> PartTypeTextT {
14705 let text = self.text().map(|x| {
14706 alloc::string::ToString::to_string(x)
14707 });
14708 let text_bitmap = self.text_bitmap();
14709 let text_family = self.text_family().map(|x| {
14710 alloc::string::ToString::to_string(x)
14711 });
14712 let text_char_map = self.text_char_map().map(|x| {
14713 alloc::string::ToString::to_string(x)
14714 });
14715 let text_size = self.text_size();
14716 let text_space = self.text_space();
14717 let text_smooth = self.text_smooth();
14718 let text_width = self.text_width();
14719 let text_height = self.text_height();
14720 let e_anchor = self.e_anchor();
14721 PartTypeTextT {
14722 text,
14723 text_bitmap,
14724 text_family,
14725 text_char_map,
14726 text_size,
14727 text_space,
14728 text_smooth,
14729 text_width,
14730 text_height,
14731 e_anchor,
14732 }
14733 }
14734
14735 #[inline]
14736 pub fn text(&self) -> Option<&'a str> {
14737 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(PartTypeText::VT_TEXT, None)}
14741 }
14742 #[inline]
14743 pub fn text_bitmap(&self) -> bool {
14744 unsafe { self._tab.get::<bool>(PartTypeText::VT_TEXT_BITMAP, Some(false)).unwrap()}
14748 }
14749 #[inline]
14750 pub fn text_family(&self) -> Option<&'a str> {
14751 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(PartTypeText::VT_TEXT_FAMILY, None)}
14755 }
14756 #[inline]
14757 pub fn text_char_map(&self) -> Option<&'a str> {
14758 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(PartTypeText::VT_TEXT_CHAR_MAP, None)}
14762 }
14763 #[inline]
14764 pub fn text_size(&self) -> i32 {
14765 unsafe { self._tab.get::<i32>(PartTypeText::VT_TEXT_SIZE, Some(0)).unwrap()}
14769 }
14770 #[inline]
14771 pub fn text_space(&self) -> f32 {
14772 unsafe { self._tab.get::<f32>(PartTypeText::VT_TEXT_SPACE, Some(0.0)).unwrap()}
14776 }
14777 #[inline]
14778 pub fn text_smooth(&self) -> bool {
14779 unsafe { self._tab.get::<bool>(PartTypeText::VT_TEXT_SMOOTH, Some(false)).unwrap()}
14783 }
14784 #[inline]
14785 pub fn text_width(&self) -> i32 {
14786 unsafe { self._tab.get::<i32>(PartTypeText::VT_TEXT_WIDTH, Some(0)).unwrap()}
14790 }
14791 #[inline]
14792 pub fn text_height(&self) -> i32 {
14793 unsafe { self._tab.get::<i32>(PartTypeText::VT_TEXT_HEIGHT, Some(0)).unwrap()}
14797 }
14798 #[inline]
14799 pub fn e_anchor(&self) -> TextAnchor {
14800 unsafe { self._tab.get::<TextAnchor>(PartTypeText::VT_E_ANCHOR, Some(TextAnchor::LT)).unwrap()}
14804 }
14805}
14806
14807impl ::flatbuffers::Verifiable for PartTypeText<'_> {
14808 #[inline]
14809 fn run_verifier(
14810 v: &mut ::flatbuffers::Verifier, pos: usize
14811 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
14812 v.visit_table(pos)?
14813 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("text", Self::VT_TEXT, false)?
14814 .visit_field::<bool>("text_bitmap", Self::VT_TEXT_BITMAP, false)?
14815 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("text_family", Self::VT_TEXT_FAMILY, false)?
14816 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("text_char_map", Self::VT_TEXT_CHAR_MAP, false)?
14817 .visit_field::<i32>("text_size", Self::VT_TEXT_SIZE, false)?
14818 .visit_field::<f32>("text_space", Self::VT_TEXT_SPACE, false)?
14819 .visit_field::<bool>("text_smooth", Self::VT_TEXT_SMOOTH, false)?
14820 .visit_field::<i32>("text_width", Self::VT_TEXT_WIDTH, false)?
14821 .visit_field::<i32>("text_height", Self::VT_TEXT_HEIGHT, false)?
14822 .visit_field::<TextAnchor>("e_anchor", Self::VT_E_ANCHOR, false)?
14823 .finish();
14824 Ok(())
14825 }
14826}
14827pub struct PartTypeTextArgs<'a> {
14828 pub text: Option<::flatbuffers::WIPOffset<&'a str>>,
14829 pub text_bitmap: bool,
14830 pub text_family: Option<::flatbuffers::WIPOffset<&'a str>>,
14831 pub text_char_map: Option<::flatbuffers::WIPOffset<&'a str>>,
14832 pub text_size: i32,
14833 pub text_space: f32,
14834 pub text_smooth: bool,
14835 pub text_width: i32,
14836 pub text_height: i32,
14837 pub e_anchor: TextAnchor,
14838}
14839impl<'a> Default for PartTypeTextArgs<'a> {
14840 #[inline]
14841 fn default() -> Self {
14842 PartTypeTextArgs {
14843 text: None,
14844 text_bitmap: false,
14845 text_family: None,
14846 text_char_map: None,
14847 text_size: 0,
14848 text_space: 0.0,
14849 text_smooth: false,
14850 text_width: 0,
14851 text_height: 0,
14852 e_anchor: TextAnchor::LT,
14853 }
14854 }
14855}
14856
14857pub struct PartTypeTextBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
14858 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
14859 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
14860}
14861impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartTypeTextBuilder<'a, 'b, A> {
14862 #[inline]
14863 pub fn add_text(&mut self, text: ::flatbuffers::WIPOffset<&'b str>) {
14864 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartTypeText::VT_TEXT, text);
14865 }
14866 #[inline]
14867 pub fn add_text_bitmap(&mut self, text_bitmap: bool) {
14868 self.fbb_.push_slot::<bool>(PartTypeText::VT_TEXT_BITMAP, text_bitmap, false);
14869 }
14870 #[inline]
14871 pub fn add_text_family(&mut self, text_family: ::flatbuffers::WIPOffset<&'b str>) {
14872 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartTypeText::VT_TEXT_FAMILY, text_family);
14873 }
14874 #[inline]
14875 pub fn add_text_char_map(&mut self, text_char_map: ::flatbuffers::WIPOffset<&'b str>) {
14876 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartTypeText::VT_TEXT_CHAR_MAP, text_char_map);
14877 }
14878 #[inline]
14879 pub fn add_text_size(&mut self, text_size: i32) {
14880 self.fbb_.push_slot::<i32>(PartTypeText::VT_TEXT_SIZE, text_size, 0);
14881 }
14882 #[inline]
14883 pub fn add_text_space(&mut self, text_space: f32) {
14884 self.fbb_.push_slot::<f32>(PartTypeText::VT_TEXT_SPACE, text_space, 0.0);
14885 }
14886 #[inline]
14887 pub fn add_text_smooth(&mut self, text_smooth: bool) {
14888 self.fbb_.push_slot::<bool>(PartTypeText::VT_TEXT_SMOOTH, text_smooth, false);
14889 }
14890 #[inline]
14891 pub fn add_text_width(&mut self, text_width: i32) {
14892 self.fbb_.push_slot::<i32>(PartTypeText::VT_TEXT_WIDTH, text_width, 0);
14893 }
14894 #[inline]
14895 pub fn add_text_height(&mut self, text_height: i32) {
14896 self.fbb_.push_slot::<i32>(PartTypeText::VT_TEXT_HEIGHT, text_height, 0);
14897 }
14898 #[inline]
14899 pub fn add_e_anchor(&mut self, e_anchor: TextAnchor) {
14900 self.fbb_.push_slot::<TextAnchor>(PartTypeText::VT_E_ANCHOR, e_anchor, TextAnchor::LT);
14901 }
14902 #[inline]
14903 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartTypeTextBuilder<'a, 'b, A> {
14904 let start = _fbb.start_table();
14905 PartTypeTextBuilder {
14906 fbb_: _fbb,
14907 start_: start,
14908 }
14909 }
14910 #[inline]
14911 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartTypeText<'a>> {
14912 let o = self.fbb_.end_table(self.start_);
14913 ::flatbuffers::WIPOffset::new(o.value())
14914 }
14915}
14916
14917impl ::core::fmt::Debug for PartTypeText<'_> {
14918 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
14919 let mut ds = f.debug_struct("PartTypeText");
14920 ds.field("text", &self.text());
14921 ds.field("text_bitmap", &self.text_bitmap());
14922 ds.field("text_family", &self.text_family());
14923 ds.field("text_char_map", &self.text_char_map());
14924 ds.field("text_size", &self.text_size());
14925 ds.field("text_space", &self.text_space());
14926 ds.field("text_smooth", &self.text_smooth());
14927 ds.field("text_width", &self.text_width());
14928 ds.field("text_height", &self.text_height());
14929 ds.field("e_anchor", &self.e_anchor());
14930 ds.finish()
14931 }
14932}
14933#[non_exhaustive]
14934#[derive(Debug, Clone, PartialEq)]
14935pub struct PartTypeTextT {
14936 pub text: Option<alloc::string::String>,
14937 pub text_bitmap: bool,
14938 pub text_family: Option<alloc::string::String>,
14939 pub text_char_map: Option<alloc::string::String>,
14940 pub text_size: i32,
14941 pub text_space: f32,
14942 pub text_smooth: bool,
14943 pub text_width: i32,
14944 pub text_height: i32,
14945 pub e_anchor: TextAnchor,
14946}
14947impl Default for PartTypeTextT {
14948 fn default() -> Self {
14949 Self {
14950 text: None,
14951 text_bitmap: false,
14952 text_family: None,
14953 text_char_map: None,
14954 text_size: 0,
14955 text_space: 0.0,
14956 text_smooth: false,
14957 text_width: 0,
14958 text_height: 0,
14959 e_anchor: TextAnchor::LT,
14960 }
14961 }
14962}
14963impl PartTypeTextT {
14964 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
14965 &self,
14966 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
14967 ) -> ::flatbuffers::WIPOffset<PartTypeText<'b>> {
14968 let text = self.text.as_ref().map(|x|{
14969 _fbb.create_string(x)
14970 });
14971 let text_bitmap = self.text_bitmap;
14972 let text_family = self.text_family.as_ref().map(|x|{
14973 _fbb.create_string(x)
14974 });
14975 let text_char_map = self.text_char_map.as_ref().map(|x|{
14976 _fbb.create_string(x)
14977 });
14978 let text_size = self.text_size;
14979 let text_space = self.text_space;
14980 let text_smooth = self.text_smooth;
14981 let text_width = self.text_width;
14982 let text_height = self.text_height;
14983 let e_anchor = self.e_anchor;
14984 PartTypeText::create(_fbb, &PartTypeTextArgs{
14985 text,
14986 text_bitmap,
14987 text_family,
14988 text_char_map,
14989 text_size,
14990 text_space,
14991 text_smooth,
14992 text_width,
14993 text_height,
14994 e_anchor,
14995 })
14996 }
14997}
14998pub enum PartTypeNinesOffset {}
14999#[derive(Copy, Clone, PartialEq)]
15000
15001pub struct PartTypeNines<'a> {
15002 pub _tab: ::flatbuffers::Table<'a>,
15003}
15004
15005impl<'a> ::flatbuffers::Follow<'a> for PartTypeNines<'a> {
15006 type Inner = PartTypeNines<'a>;
15007 #[inline]
15008 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
15009 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
15010 }
15011}
15012
15013impl<'a> PartTypeNines<'a> {
15014 pub const VT_NINES_MARGIN_L: ::flatbuffers::VOffsetT = 4;
15015 pub const VT_NINES_MARGIN_R: ::flatbuffers::VOffsetT = 6;
15016 pub const VT_NINES_MARGIN_T: ::flatbuffers::VOffsetT = 8;
15017 pub const VT_NINES_MARGIN_B: ::flatbuffers::VOffsetT = 10;
15018 pub const VT_NINES_FILL_MODE: ::flatbuffers::VOffsetT = 12;
15019
15020 #[inline]
15021 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
15022 PartTypeNines { _tab: table }
15023 }
15024 #[allow(unused_mut)]
15025 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
15026 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
15027 args: &'args PartTypeNinesArgs
15028 ) -> ::flatbuffers::WIPOffset<PartTypeNines<'bldr>> {
15029 let mut builder = PartTypeNinesBuilder::new(_fbb);
15030 builder.add_nines_fill_mode(args.nines_fill_mode);
15031 builder.add_nines_margin_b(args.nines_margin_b);
15032 builder.add_nines_margin_t(args.nines_margin_t);
15033 builder.add_nines_margin_r(args.nines_margin_r);
15034 builder.add_nines_margin_l(args.nines_margin_l);
15035 builder.finish()
15036 }
15037
15038 pub fn unpack(&self) -> PartTypeNinesT {
15039 let nines_margin_l = self.nines_margin_l();
15040 let nines_margin_r = self.nines_margin_r();
15041 let nines_margin_t = self.nines_margin_t();
15042 let nines_margin_b = self.nines_margin_b();
15043 let nines_fill_mode = self.nines_fill_mode();
15044 PartTypeNinesT {
15045 nines_margin_l,
15046 nines_margin_r,
15047 nines_margin_t,
15048 nines_margin_b,
15049 nines_fill_mode,
15050 }
15051 }
15052
15053 #[inline]
15054 pub fn nines_margin_l(&self) -> i32 {
15055 unsafe { self._tab.get::<i32>(PartTypeNines::VT_NINES_MARGIN_L, Some(0)).unwrap()}
15059 }
15060 #[inline]
15061 pub fn nines_margin_r(&self) -> i32 {
15062 unsafe { self._tab.get::<i32>(PartTypeNines::VT_NINES_MARGIN_R, Some(0)).unwrap()}
15066 }
15067 #[inline]
15068 pub fn nines_margin_t(&self) -> i32 {
15069 unsafe { self._tab.get::<i32>(PartTypeNines::VT_NINES_MARGIN_T, Some(0)).unwrap()}
15073 }
15074 #[inline]
15075 pub fn nines_margin_b(&self) -> i32 {
15076 unsafe { self._tab.get::<i32>(PartTypeNines::VT_NINES_MARGIN_B, Some(0)).unwrap()}
15080 }
15081 #[inline]
15082 pub fn nines_fill_mode(&self) -> i32 {
15083 unsafe { self._tab.get::<i32>(PartTypeNines::VT_NINES_FILL_MODE, Some(0)).unwrap()}
15087 }
15088}
15089
15090impl ::flatbuffers::Verifiable for PartTypeNines<'_> {
15091 #[inline]
15092 fn run_verifier(
15093 v: &mut ::flatbuffers::Verifier, pos: usize
15094 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
15095 v.visit_table(pos)?
15096 .visit_field::<i32>("nines_margin_l", Self::VT_NINES_MARGIN_L, false)?
15097 .visit_field::<i32>("nines_margin_r", Self::VT_NINES_MARGIN_R, false)?
15098 .visit_field::<i32>("nines_margin_t", Self::VT_NINES_MARGIN_T, false)?
15099 .visit_field::<i32>("nines_margin_b", Self::VT_NINES_MARGIN_B, false)?
15100 .visit_field::<i32>("nines_fill_mode", Self::VT_NINES_FILL_MODE, false)?
15101 .finish();
15102 Ok(())
15103 }
15104}
15105pub struct PartTypeNinesArgs {
15106 pub nines_margin_l: i32,
15107 pub nines_margin_r: i32,
15108 pub nines_margin_t: i32,
15109 pub nines_margin_b: i32,
15110 pub nines_fill_mode: i32,
15111}
15112impl<'a> Default for PartTypeNinesArgs {
15113 #[inline]
15114 fn default() -> Self {
15115 PartTypeNinesArgs {
15116 nines_margin_l: 0,
15117 nines_margin_r: 0,
15118 nines_margin_t: 0,
15119 nines_margin_b: 0,
15120 nines_fill_mode: 0,
15121 }
15122 }
15123}
15124
15125pub struct PartTypeNinesBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
15126 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
15127 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
15128}
15129impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartTypeNinesBuilder<'a, 'b, A> {
15130 #[inline]
15131 pub fn add_nines_margin_l(&mut self, nines_margin_l: i32) {
15132 self.fbb_.push_slot::<i32>(PartTypeNines::VT_NINES_MARGIN_L, nines_margin_l, 0);
15133 }
15134 #[inline]
15135 pub fn add_nines_margin_r(&mut self, nines_margin_r: i32) {
15136 self.fbb_.push_slot::<i32>(PartTypeNines::VT_NINES_MARGIN_R, nines_margin_r, 0);
15137 }
15138 #[inline]
15139 pub fn add_nines_margin_t(&mut self, nines_margin_t: i32) {
15140 self.fbb_.push_slot::<i32>(PartTypeNines::VT_NINES_MARGIN_T, nines_margin_t, 0);
15141 }
15142 #[inline]
15143 pub fn add_nines_margin_b(&mut self, nines_margin_b: i32) {
15144 self.fbb_.push_slot::<i32>(PartTypeNines::VT_NINES_MARGIN_B, nines_margin_b, 0);
15145 }
15146 #[inline]
15147 pub fn add_nines_fill_mode(&mut self, nines_fill_mode: i32) {
15148 self.fbb_.push_slot::<i32>(PartTypeNines::VT_NINES_FILL_MODE, nines_fill_mode, 0);
15149 }
15150 #[inline]
15151 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartTypeNinesBuilder<'a, 'b, A> {
15152 let start = _fbb.start_table();
15153 PartTypeNinesBuilder {
15154 fbb_: _fbb,
15155 start_: start,
15156 }
15157 }
15158 #[inline]
15159 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartTypeNines<'a>> {
15160 let o = self.fbb_.end_table(self.start_);
15161 ::flatbuffers::WIPOffset::new(o.value())
15162 }
15163}
15164
15165impl ::core::fmt::Debug for PartTypeNines<'_> {
15166 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15167 let mut ds = f.debug_struct("PartTypeNines");
15168 ds.field("nines_margin_l", &self.nines_margin_l());
15169 ds.field("nines_margin_r", &self.nines_margin_r());
15170 ds.field("nines_margin_t", &self.nines_margin_t());
15171 ds.field("nines_margin_b", &self.nines_margin_b());
15172 ds.field("nines_fill_mode", &self.nines_fill_mode());
15173 ds.finish()
15174 }
15175}
15176#[non_exhaustive]
15177#[derive(Debug, Clone, PartialEq)]
15178pub struct PartTypeNinesT {
15179 pub nines_margin_l: i32,
15180 pub nines_margin_r: i32,
15181 pub nines_margin_t: i32,
15182 pub nines_margin_b: i32,
15183 pub nines_fill_mode: i32,
15184}
15185impl Default for PartTypeNinesT {
15186 fn default() -> Self {
15187 Self {
15188 nines_margin_l: 0,
15189 nines_margin_r: 0,
15190 nines_margin_t: 0,
15191 nines_margin_b: 0,
15192 nines_fill_mode: 0,
15193 }
15194 }
15195}
15196impl PartTypeNinesT {
15197 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
15198 &self,
15199 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
15200 ) -> ::flatbuffers::WIPOffset<PartTypeNines<'b>> {
15201 let nines_margin_l = self.nines_margin_l;
15202 let nines_margin_r = self.nines_margin_r;
15203 let nines_margin_t = self.nines_margin_t;
15204 let nines_margin_b = self.nines_margin_b;
15205 let nines_fill_mode = self.nines_fill_mode;
15206 PartTypeNines::create(_fbb, &PartTypeNinesArgs{
15207 nines_margin_l,
15208 nines_margin_r,
15209 nines_margin_t,
15210 nines_margin_b,
15211 nines_fill_mode,
15212 })
15213 }
15214}
15215pub enum PartTypeInstanceOffset {}
15216#[derive(Copy, Clone, PartialEq)]
15217
15218pub struct PartTypeInstance<'a> {
15219 pub _tab: ::flatbuffers::Table<'a>,
15220}
15221
15222impl<'a> ::flatbuffers::Follow<'a> for PartTypeInstance<'a> {
15223 type Inner = PartTypeInstance<'a>;
15224 #[inline]
15225 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
15226 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
15227 }
15228}
15229
15230impl<'a> PartTypeInstance<'a> {
15231 pub const VT_REF_ANIME_PACK: ::flatbuffers::VOffsetT = 4;
15232 pub const VT_REF_ANIME_PACK_HASH: ::flatbuffers::VOffsetT = 6;
15233 pub const VT_REF_ANIME_NAME: ::flatbuffers::VOffsetT = 8;
15234 pub const VT_REF_ANIME_NAME_HASH: ::flatbuffers::VOffsetT = 10;
15235
15236 #[inline]
15237 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
15238 PartTypeInstance { _tab: table }
15239 }
15240 #[allow(unused_mut)]
15241 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
15242 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
15243 args: &'args PartTypeInstanceArgs<'args>
15244 ) -> ::flatbuffers::WIPOffset<PartTypeInstance<'bldr>> {
15245 let mut builder = PartTypeInstanceBuilder::new(_fbb);
15246 builder.add_ref_anime_name_hash(args.ref_anime_name_hash);
15247 if let Some(x) = args.ref_anime_name { builder.add_ref_anime_name(x); }
15248 builder.add_ref_anime_pack_hash(args.ref_anime_pack_hash);
15249 if let Some(x) = args.ref_anime_pack { builder.add_ref_anime_pack(x); }
15250 builder.finish()
15251 }
15252
15253 pub fn unpack(&self) -> PartTypeInstanceT {
15254 let ref_anime_pack = {
15255 let x = self.ref_anime_pack();
15256 alloc::string::ToString::to_string(x)
15257 };
15258 let ref_anime_pack_hash = self.ref_anime_pack_hash();
15259 let ref_anime_name = {
15260 let x = self.ref_anime_name();
15261 alloc::string::ToString::to_string(x)
15262 };
15263 let ref_anime_name_hash = self.ref_anime_name_hash();
15264 PartTypeInstanceT {
15265 ref_anime_pack,
15266 ref_anime_pack_hash,
15267 ref_anime_name,
15268 ref_anime_name_hash,
15269 }
15270 }
15271
15272 #[inline]
15273 pub fn ref_anime_pack(&self) -> &'a str {
15274 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(PartTypeInstance::VT_REF_ANIME_PACK, None).unwrap()}
15278 }
15279 #[inline]
15280 pub fn ref_anime_pack_hash(&self) -> u32 {
15281 unsafe { self._tab.get::<u32>(PartTypeInstance::VT_REF_ANIME_PACK_HASH, Some(0)).unwrap()}
15285 }
15286 #[inline]
15287 pub fn ref_anime_name(&self) -> &'a str {
15288 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(PartTypeInstance::VT_REF_ANIME_NAME, None).unwrap()}
15292 }
15293 #[inline]
15294 pub fn ref_anime_name_hash(&self) -> u32 {
15295 unsafe { self._tab.get::<u32>(PartTypeInstance::VT_REF_ANIME_NAME_HASH, Some(0)).unwrap()}
15299 }
15300}
15301
15302impl ::flatbuffers::Verifiable for PartTypeInstance<'_> {
15303 #[inline]
15304 fn run_verifier(
15305 v: &mut ::flatbuffers::Verifier, pos: usize
15306 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
15307 v.visit_table(pos)?
15308 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("ref_anime_pack", Self::VT_REF_ANIME_PACK, true)?
15309 .visit_field::<u32>("ref_anime_pack_hash", Self::VT_REF_ANIME_PACK_HASH, false)?
15310 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("ref_anime_name", Self::VT_REF_ANIME_NAME, true)?
15311 .visit_field::<u32>("ref_anime_name_hash", Self::VT_REF_ANIME_NAME_HASH, false)?
15312 .finish();
15313 Ok(())
15314 }
15315}
15316pub struct PartTypeInstanceArgs<'a> {
15317 pub ref_anime_pack: Option<::flatbuffers::WIPOffset<&'a str>>,
15318 pub ref_anime_pack_hash: u32,
15319 pub ref_anime_name: Option<::flatbuffers::WIPOffset<&'a str>>,
15320 pub ref_anime_name_hash: u32,
15321}
15322impl<'a> Default for PartTypeInstanceArgs<'a> {
15323 #[inline]
15324 fn default() -> Self {
15325 PartTypeInstanceArgs {
15326 ref_anime_pack: None, ref_anime_pack_hash: 0,
15328 ref_anime_name: None, ref_anime_name_hash: 0,
15330 }
15331 }
15332}
15333
15334pub struct PartTypeInstanceBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
15335 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
15336 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
15337}
15338impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartTypeInstanceBuilder<'a, 'b, A> {
15339 #[inline]
15340 pub fn add_ref_anime_pack(&mut self, ref_anime_pack: ::flatbuffers::WIPOffset<&'b str>) {
15341 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartTypeInstance::VT_REF_ANIME_PACK, ref_anime_pack);
15342 }
15343 #[inline]
15344 pub fn add_ref_anime_pack_hash(&mut self, ref_anime_pack_hash: u32) {
15345 self.fbb_.push_slot::<u32>(PartTypeInstance::VT_REF_ANIME_PACK_HASH, ref_anime_pack_hash, 0);
15346 }
15347 #[inline]
15348 pub fn add_ref_anime_name(&mut self, ref_anime_name: ::flatbuffers::WIPOffset<&'b str>) {
15349 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartTypeInstance::VT_REF_ANIME_NAME, ref_anime_name);
15350 }
15351 #[inline]
15352 pub fn add_ref_anime_name_hash(&mut self, ref_anime_name_hash: u32) {
15353 self.fbb_.push_slot::<u32>(PartTypeInstance::VT_REF_ANIME_NAME_HASH, ref_anime_name_hash, 0);
15354 }
15355 #[inline]
15356 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartTypeInstanceBuilder<'a, 'b, A> {
15357 let start = _fbb.start_table();
15358 PartTypeInstanceBuilder {
15359 fbb_: _fbb,
15360 start_: start,
15361 }
15362 }
15363 #[inline]
15364 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartTypeInstance<'a>> {
15365 let o = self.fbb_.end_table(self.start_);
15366 self.fbb_.required(o, PartTypeInstance::VT_REF_ANIME_PACK,"ref_anime_pack");
15367 self.fbb_.required(o, PartTypeInstance::VT_REF_ANIME_NAME,"ref_anime_name");
15368 ::flatbuffers::WIPOffset::new(o.value())
15369 }
15370}
15371
15372impl ::core::fmt::Debug for PartTypeInstance<'_> {
15373 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15374 let mut ds = f.debug_struct("PartTypeInstance");
15375 ds.field("ref_anime_pack", &self.ref_anime_pack());
15376 ds.field("ref_anime_pack_hash", &self.ref_anime_pack_hash());
15377 ds.field("ref_anime_name", &self.ref_anime_name());
15378 ds.field("ref_anime_name_hash", &self.ref_anime_name_hash());
15379 ds.finish()
15380 }
15381}
15382#[non_exhaustive]
15383#[derive(Debug, Clone, PartialEq)]
15384pub struct PartTypeInstanceT {
15385 pub ref_anime_pack: alloc::string::String,
15386 pub ref_anime_pack_hash: u32,
15387 pub ref_anime_name: alloc::string::String,
15388 pub ref_anime_name_hash: u32,
15389}
15390impl Default for PartTypeInstanceT {
15391 fn default() -> Self {
15392 Self {
15393 ref_anime_pack: alloc::string::ToString::to_string(""),
15394 ref_anime_pack_hash: 0,
15395 ref_anime_name: alloc::string::ToString::to_string(""),
15396 ref_anime_name_hash: 0,
15397 }
15398 }
15399}
15400impl PartTypeInstanceT {
15401 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
15402 &self,
15403 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
15404 ) -> ::flatbuffers::WIPOffset<PartTypeInstance<'b>> {
15405 let ref_anime_pack = Some({
15406 let x = &self.ref_anime_pack;
15407 _fbb.create_string(x)
15408 });
15409 let ref_anime_pack_hash = self.ref_anime_pack_hash;
15410 let ref_anime_name = Some({
15411 let x = &self.ref_anime_name;
15412 _fbb.create_string(x)
15413 });
15414 let ref_anime_name_hash = self.ref_anime_name_hash;
15415 PartTypeInstance::create(_fbb, &PartTypeInstanceArgs{
15416 ref_anime_pack,
15417 ref_anime_pack_hash,
15418 ref_anime_name,
15419 ref_anime_name_hash,
15420 })
15421 }
15422}
15423pub enum PartTypeEffectOffset {}
15424#[derive(Copy, Clone, PartialEq)]
15425
15426pub struct PartTypeEffect<'a> {
15427 pub _tab: ::flatbuffers::Table<'a>,
15428}
15429
15430impl<'a> ::flatbuffers::Follow<'a> for PartTypeEffect<'a> {
15431 type Inner = PartTypeEffect<'a>;
15432 #[inline]
15433 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
15434 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
15435 }
15436}
15437
15438impl<'a> PartTypeEffect<'a> {
15439 pub const VT_REF_EFFECT_NAME_HASH: ::flatbuffers::VOffsetT = 4;
15440
15441 #[inline]
15442 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
15443 PartTypeEffect { _tab: table }
15444 }
15445 #[allow(unused_mut)]
15446 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
15447 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
15448 args: &'args PartTypeEffectArgs
15449 ) -> ::flatbuffers::WIPOffset<PartTypeEffect<'bldr>> {
15450 let mut builder = PartTypeEffectBuilder::new(_fbb);
15451 builder.add_ref_effect_name_hash(args.ref_effect_name_hash);
15452 builder.finish()
15453 }
15454
15455 pub fn unpack(&self) -> PartTypeEffectT {
15456 let ref_effect_name_hash = self.ref_effect_name_hash();
15457 PartTypeEffectT {
15458 ref_effect_name_hash,
15459 }
15460 }
15461
15462 #[inline]
15463 pub fn ref_effect_name_hash(&self) -> u32 {
15464 unsafe { self._tab.get::<u32>(PartTypeEffect::VT_REF_EFFECT_NAME_HASH, Some(0)).unwrap()}
15468 }
15469}
15470
15471impl ::flatbuffers::Verifiable for PartTypeEffect<'_> {
15472 #[inline]
15473 fn run_verifier(
15474 v: &mut ::flatbuffers::Verifier, pos: usize
15475 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
15476 v.visit_table(pos)?
15477 .visit_field::<u32>("ref_effect_name_hash", Self::VT_REF_EFFECT_NAME_HASH, false)?
15478 .finish();
15479 Ok(())
15480 }
15481}
15482pub struct PartTypeEffectArgs {
15483 pub ref_effect_name_hash: u32,
15484}
15485impl<'a> Default for PartTypeEffectArgs {
15486 #[inline]
15487 fn default() -> Self {
15488 PartTypeEffectArgs {
15489 ref_effect_name_hash: 0,
15490 }
15491 }
15492}
15493
15494pub struct PartTypeEffectBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
15495 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
15496 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
15497}
15498impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartTypeEffectBuilder<'a, 'b, A> {
15499 #[inline]
15500 pub fn add_ref_effect_name_hash(&mut self, ref_effect_name_hash: u32) {
15501 self.fbb_.push_slot::<u32>(PartTypeEffect::VT_REF_EFFECT_NAME_HASH, ref_effect_name_hash, 0);
15502 }
15503 #[inline]
15504 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartTypeEffectBuilder<'a, 'b, A> {
15505 let start = _fbb.start_table();
15506 PartTypeEffectBuilder {
15507 fbb_: _fbb,
15508 start_: start,
15509 }
15510 }
15511 #[inline]
15512 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartTypeEffect<'a>> {
15513 let o = self.fbb_.end_table(self.start_);
15514 ::flatbuffers::WIPOffset::new(o.value())
15515 }
15516}
15517
15518impl ::core::fmt::Debug for PartTypeEffect<'_> {
15519 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15520 let mut ds = f.debug_struct("PartTypeEffect");
15521 ds.field("ref_effect_name_hash", &self.ref_effect_name_hash());
15522 ds.finish()
15523 }
15524}
15525#[non_exhaustive]
15526#[derive(Debug, Clone, PartialEq)]
15527pub struct PartTypeEffectT {
15528 pub ref_effect_name_hash: u32,
15529}
15530impl Default for PartTypeEffectT {
15531 fn default() -> Self {
15532 Self {
15533 ref_effect_name_hash: 0,
15534 }
15535 }
15536}
15537impl PartTypeEffectT {
15538 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
15539 &self,
15540 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
15541 ) -> ::flatbuffers::WIPOffset<PartTypeEffect<'b>> {
15542 let ref_effect_name_hash = self.ref_effect_name_hash;
15543 PartTypeEffect::create(_fbb, &PartTypeEffectArgs{
15544 ref_effect_name_hash,
15545 })
15546 }
15547}
15548pub enum PartDataOffset {}
15549#[derive(Copy, Clone, PartialEq)]
15550
15551pub struct PartData<'a> {
15552 pub _tab: ::flatbuffers::Table<'a>,
15553}
15554
15555impl<'a> ::flatbuffers::Follow<'a> for PartData<'a> {
15556 type Inner = PartData<'a>;
15557 #[inline]
15558 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
15559 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
15560 }
15561}
15562
15563impl<'a> PartData<'a> {
15564 pub const VT_NAME: ::flatbuffers::VOffsetT = 4;
15565 pub const VT_PARENT_INDEX: ::flatbuffers::VOffsetT = 6;
15566 pub const VT_BOUNDS_TYPE: ::flatbuffers::VOffsetT = 8;
15567 pub const VT_BLEND_TYPE: ::flatbuffers::VOffsetT = 10;
15568 pub const VT_VISIBLE_INSIDE_MASK: ::flatbuffers::VOffsetT = 12;
15569 pub const VT_MASK_WRITE: ::flatbuffers::VOffsetT = 14;
15570 pub const VT_MASK_INFLUENCE: ::flatbuffers::VOffsetT = 16;
15571 pub const VT_DRAW_AS_MASK: ::flatbuffers::VOffsetT = 18;
15572 pub const VT_OUTPUT_INFLUENCE: ::flatbuffers::VOffsetT = 20;
15573 pub const VT_MESH_BINDING: ::flatbuffers::VOffsetT = 22;
15574 pub const VT_PART_TYPE_TYPE: ::flatbuffers::VOffsetT = 24;
15575 pub const VT_PART_TYPE: ::flatbuffers::VOffsetT = 26;
15576
15577 #[inline]
15578 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
15579 PartData { _tab: table }
15580 }
15581 #[allow(unused_mut)]
15582 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
15583 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
15584 args: &'args PartDataArgs<'args>
15585 ) -> ::flatbuffers::WIPOffset<PartData<'bldr>> {
15586 let mut builder = PartDataBuilder::new(_fbb);
15587 if let Some(x) = args.part_type { builder.add_part_type(x); }
15588 if let Some(x) = args.mesh_binding { builder.add_mesh_binding(x); }
15589 if let Some(x) = args.name { builder.add_name(x); }
15590 builder.add_parent_index(args.parent_index);
15591 builder.add_part_type_type(args.part_type_type);
15592 builder.add_output_influence(args.output_influence);
15593 builder.add_draw_as_mask(args.draw_as_mask);
15594 builder.add_mask_influence(args.mask_influence);
15595 builder.add_mask_write(args.mask_write);
15596 builder.add_visible_inside_mask(args.visible_inside_mask);
15597 builder.add_blend_type(args.blend_type);
15598 builder.add_bounds_type(args.bounds_type);
15599 builder.finish()
15600 }
15601
15602 pub fn unpack(&self) -> PartDataT {
15603 let name = {
15604 let x = self.name();
15605 alloc::string::ToString::to_string(x)
15606 };
15607 let parent_index = self.parent_index();
15608 let bounds_type = self.bounds_type();
15609 let blend_type = self.blend_type();
15610 let visible_inside_mask = self.visible_inside_mask();
15611 let mask_write = self.mask_write();
15612 let mask_influence = self.mask_influence();
15613 let draw_as_mask = self.draw_as_mask();
15614 let output_influence = self.output_influence();
15615 let mesh_binding = self.mesh_binding().map(|x| {
15616 alloc::boxed::Box::new(x.unpack())
15617 });
15618 let part_type = match self.part_type_type() {
15619 PartType::NONE => PartTypeT::NONE,
15620 PartType::PartTypeNull => PartTypeT::PartTypeNull(alloc::boxed::Box::new(
15621 self.part_type_as_part_type_null()
15622 .expect("Invalid union table, expected `PartType::PartTypeNull`.")
15623 .unpack()
15624 )),
15625 PartType::PartTypeNormal => PartTypeT::PartTypeNormal(alloc::boxed::Box::new(
15626 self.part_type_as_part_type_normal()
15627 .expect("Invalid union table, expected `PartType::PartTypeNormal`.")
15628 .unpack()
15629 )),
15630 PartType::PartTypeShape => PartTypeT::PartTypeShape(alloc::boxed::Box::new(
15631 self.part_type_as_part_type_shape()
15632 .expect("Invalid union table, expected `PartType::PartTypeShape`.")
15633 .unpack()
15634 )),
15635 PartType::PartTypeText => PartTypeT::PartTypeText(alloc::boxed::Box::new(
15636 self.part_type_as_part_type_text()
15637 .expect("Invalid union table, expected `PartType::PartTypeText`.")
15638 .unpack()
15639 )),
15640 PartType::PartTypeNines => PartTypeT::PartTypeNines(alloc::boxed::Box::new(
15641 self.part_type_as_part_type_nines()
15642 .expect("Invalid union table, expected `PartType::PartTypeNines`.")
15643 .unpack()
15644 )),
15645 PartType::PartTypeInstance => PartTypeT::PartTypeInstance(alloc::boxed::Box::new(
15646 self.part_type_as_part_type_instance()
15647 .expect("Invalid union table, expected `PartType::PartTypeInstance`.")
15648 .unpack()
15649 )),
15650 PartType::PartTypeArmature => PartTypeT::PartTypeArmature(alloc::boxed::Box::new(
15651 self.part_type_as_part_type_armature()
15652 .expect("Invalid union table, expected `PartType::PartTypeArmature`.")
15653 .unpack()
15654 )),
15655 PartType::PartTypeEffect => PartTypeT::PartTypeEffect(alloc::boxed::Box::new(
15656 self.part_type_as_part_type_effect()
15657 .expect("Invalid union table, expected `PartType::PartTypeEffect`.")
15658 .unpack()
15659 )),
15660 PartType::PartTypeMesh => PartTypeT::PartTypeMesh(alloc::boxed::Box::new(
15661 self.part_type_as_part_type_mesh()
15662 .expect("Invalid union table, expected `PartType::PartTypeMesh`.")
15663 .unpack()
15664 )),
15665 PartType::PartTypeMovenode => PartTypeT::PartTypeMovenode(alloc::boxed::Box::new(
15666 self.part_type_as_part_type_movenode()
15667 .expect("Invalid union table, expected `PartType::PartTypeMovenode`.")
15668 .unpack()
15669 )),
15670 PartType::PartTypeConstraint => PartTypeT::PartTypeConstraint(alloc::boxed::Box::new(
15671 self.part_type_as_part_type_constraint()
15672 .expect("Invalid union table, expected `PartType::PartTypeConstraint`.")
15673 .unpack()
15674 )),
15675 PartType::PartTypeMask => PartTypeT::PartTypeMask(alloc::boxed::Box::new(
15676 self.part_type_as_part_type_mask()
15677 .expect("Invalid union table, expected `PartType::PartTypeMask`.")
15678 .unpack()
15679 )),
15680 PartType::PartTypeJoint => PartTypeT::PartTypeJoint(alloc::boxed::Box::new(
15681 self.part_type_as_part_type_joint()
15682 .expect("Invalid union table, expected `PartType::PartTypeJoint`.")
15683 .unpack()
15684 )),
15685 PartType::PartTypeBonepoint => PartTypeT::PartTypeBonepoint(alloc::boxed::Box::new(
15686 self.part_type_as_part_type_bonepoint()
15687 .expect("Invalid union table, expected `PartType::PartTypeBonepoint`.")
15688 .unpack()
15689 )),
15690 PartType::PartTypeTransformConstraint => PartTypeT::PartTypeTransformConstraint(alloc::boxed::Box::new(
15691 self.part_type_as_part_type_transform_constraint()
15692 .expect("Invalid union table, expected `PartType::PartTypeTransformConstraint`.")
15693 .unpack()
15694 )),
15695 PartType::PartTypeCamera => PartTypeT::PartTypeCamera(alloc::boxed::Box::new(
15696 self.part_type_as_part_type_camera()
15697 .expect("Invalid union table, expected `PartType::PartTypeCamera`.")
15698 .unpack()
15699 )),
15700 PartType::PartTypeAudio => PartTypeT::PartTypeAudio(alloc::boxed::Box::new(
15701 self.part_type_as_part_type_audio()
15702 .expect("Invalid union table, expected `PartType::PartTypeAudio`.")
15703 .unpack()
15704 )),
15705 _ => PartTypeT::NONE,
15706 };
15707 PartDataT {
15708 name,
15709 parent_index,
15710 bounds_type,
15711 blend_type,
15712 visible_inside_mask,
15713 mask_write,
15714 mask_influence,
15715 draw_as_mask,
15716 output_influence,
15717 mesh_binding,
15718 part_type,
15719 }
15720 }
15721
15722 #[inline]
15723 pub fn name(&self) -> &'a str {
15724 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(PartData::VT_NAME, None).unwrap()}
15728 }
15729 #[inline]
15730 pub fn parent_index(&self) -> i16 {
15731 unsafe { self._tab.get::<i16>(PartData::VT_PARENT_INDEX, Some(0)).unwrap()}
15735 }
15736 #[inline]
15737 pub fn bounds_type(&self) -> BoundsType {
15738 unsafe { self._tab.get::<BoundsType>(PartData::VT_BOUNDS_TYPE, Some(BoundsType::None)).unwrap()}
15742 }
15743 #[inline]
15744 pub fn blend_type(&self) -> BlendType {
15745 unsafe { self._tab.get::<BlendType>(PartData::VT_BLEND_TYPE, Some(BlendType::Mix)).unwrap()}
15749 }
15750 #[inline]
15751 pub fn visible_inside_mask(&self) -> bool {
15752 unsafe { self._tab.get::<bool>(PartData::VT_VISIBLE_INSIDE_MASK, Some(false)).unwrap()}
15756 }
15757 #[inline]
15758 pub fn mask_write(&self) -> bool {
15759 unsafe { self._tab.get::<bool>(PartData::VT_MASK_WRITE, Some(false)).unwrap()}
15763 }
15764 #[inline]
15765 pub fn mask_influence(&self) -> bool {
15766 unsafe { self._tab.get::<bool>(PartData::VT_MASK_INFLUENCE, Some(false)).unwrap()}
15770 }
15771 #[inline]
15772 pub fn draw_as_mask(&self) -> bool {
15773 unsafe { self._tab.get::<bool>(PartData::VT_DRAW_AS_MASK, Some(false)).unwrap()}
15777 }
15778 #[inline]
15779 pub fn output_influence(&self) -> bool {
15780 unsafe { self._tab.get::<bool>(PartData::VT_OUTPUT_INFLUENCE, Some(true)).unwrap()}
15784 }
15785 #[inline]
15786 pub fn mesh_binding(&self) -> Option<PartMeshBinding<'a>> {
15787 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PartMeshBinding>>(PartData::VT_MESH_BINDING, None)}
15791 }
15792 #[inline]
15793 pub fn part_type_type(&self) -> PartType {
15794 unsafe { self._tab.get::<PartType>(PartData::VT_PART_TYPE_TYPE, Some(PartType::NONE)).unwrap()}
15798 }
15799 #[inline]
15800 pub fn part_type(&self) -> Option<::flatbuffers::Table<'a>> {
15801 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>(PartData::VT_PART_TYPE, None)}
15805 }
15806 #[inline]
15807 #[allow(non_snake_case)]
15808 pub fn part_type_as_part_type_null(&self) -> Option<NoneValueEntry<'a>> {
15809 if self.part_type_type() == PartType::PartTypeNull {
15810 self.part_type().map(|t| {
15811 unsafe { NoneValueEntry::init_from_table(t) }
15815 })
15816 } else {
15817 None
15818 }
15819 }
15820
15821 #[inline]
15822 #[allow(non_snake_case)]
15823 pub fn part_type_as_part_type_normal(&self) -> Option<NoneValueEntry<'a>> {
15824 if self.part_type_type() == PartType::PartTypeNormal {
15825 self.part_type().map(|t| {
15826 unsafe { NoneValueEntry::init_from_table(t) }
15830 })
15831 } else {
15832 None
15833 }
15834 }
15835
15836 #[inline]
15837 #[allow(non_snake_case)]
15838 pub fn part_type_as_part_type_shape(&self) -> Option<PartTypeShape<'a>> {
15839 if self.part_type_type() == PartType::PartTypeShape {
15840 self.part_type().map(|t| {
15841 unsafe { PartTypeShape::init_from_table(t) }
15845 })
15846 } else {
15847 None
15848 }
15849 }
15850
15851 #[inline]
15852 #[allow(non_snake_case)]
15853 pub fn part_type_as_part_type_text(&self) -> Option<PartTypeText<'a>> {
15854 if self.part_type_type() == PartType::PartTypeText {
15855 self.part_type().map(|t| {
15856 unsafe { PartTypeText::init_from_table(t) }
15860 })
15861 } else {
15862 None
15863 }
15864 }
15865
15866 #[inline]
15867 #[allow(non_snake_case)]
15868 pub fn part_type_as_part_type_nines(&self) -> Option<PartTypeNines<'a>> {
15869 if self.part_type_type() == PartType::PartTypeNines {
15870 self.part_type().map(|t| {
15871 unsafe { PartTypeNines::init_from_table(t) }
15875 })
15876 } else {
15877 None
15878 }
15879 }
15880
15881 #[inline]
15882 #[allow(non_snake_case)]
15883 pub fn part_type_as_part_type_instance(&self) -> Option<PartTypeInstance<'a>> {
15884 if self.part_type_type() == PartType::PartTypeInstance {
15885 self.part_type().map(|t| {
15886 unsafe { PartTypeInstance::init_from_table(t) }
15890 })
15891 } else {
15892 None
15893 }
15894 }
15895
15896 #[inline]
15897 #[allow(non_snake_case)]
15898 pub fn part_type_as_part_type_armature(&self) -> Option<NoneValueEntry<'a>> {
15899 if self.part_type_type() == PartType::PartTypeArmature {
15900 self.part_type().map(|t| {
15901 unsafe { NoneValueEntry::init_from_table(t) }
15905 })
15906 } else {
15907 None
15908 }
15909 }
15910
15911 #[inline]
15912 #[allow(non_snake_case)]
15913 pub fn part_type_as_part_type_effect(&self) -> Option<PartTypeEffect<'a>> {
15914 if self.part_type_type() == PartType::PartTypeEffect {
15915 self.part_type().map(|t| {
15916 unsafe { PartTypeEffect::init_from_table(t) }
15920 })
15921 } else {
15922 None
15923 }
15924 }
15925
15926 #[inline]
15927 #[allow(non_snake_case)]
15928 pub fn part_type_as_part_type_mesh(&self) -> Option<NoneValueEntry<'a>> {
15929 if self.part_type_type() == PartType::PartTypeMesh {
15930 self.part_type().map(|t| {
15931 unsafe { NoneValueEntry::init_from_table(t) }
15935 })
15936 } else {
15937 None
15938 }
15939 }
15940
15941 #[inline]
15942 #[allow(non_snake_case)]
15943 pub fn part_type_as_part_type_movenode(&self) -> Option<NoneValueEntry<'a>> {
15944 if self.part_type_type() == PartType::PartTypeMovenode {
15945 self.part_type().map(|t| {
15946 unsafe { NoneValueEntry::init_from_table(t) }
15950 })
15951 } else {
15952 None
15953 }
15954 }
15955
15956 #[inline]
15957 #[allow(non_snake_case)]
15958 pub fn part_type_as_part_type_constraint(&self) -> Option<NoneValueEntry<'a>> {
15959 if self.part_type_type() == PartType::PartTypeConstraint {
15960 self.part_type().map(|t| {
15961 unsafe { NoneValueEntry::init_from_table(t) }
15965 })
15966 } else {
15967 None
15968 }
15969 }
15970
15971 #[inline]
15972 #[allow(non_snake_case)]
15973 pub fn part_type_as_part_type_mask(&self) -> Option<NoneValueEntry<'a>> {
15974 if self.part_type_type() == PartType::PartTypeMask {
15975 self.part_type().map(|t| {
15976 unsafe { NoneValueEntry::init_from_table(t) }
15980 })
15981 } else {
15982 None
15983 }
15984 }
15985
15986 #[inline]
15987 #[allow(non_snake_case)]
15988 pub fn part_type_as_part_type_joint(&self) -> Option<NoneValueEntry<'a>> {
15989 if self.part_type_type() == PartType::PartTypeJoint {
15990 self.part_type().map(|t| {
15991 unsafe { NoneValueEntry::init_from_table(t) }
15995 })
15996 } else {
15997 None
15998 }
15999 }
16000
16001 #[inline]
16002 #[allow(non_snake_case)]
16003 pub fn part_type_as_part_type_bonepoint(&self) -> Option<NoneValueEntry<'a>> {
16004 if self.part_type_type() == PartType::PartTypeBonepoint {
16005 self.part_type().map(|t| {
16006 unsafe { NoneValueEntry::init_from_table(t) }
16010 })
16011 } else {
16012 None
16013 }
16014 }
16015
16016 #[inline]
16017 #[allow(non_snake_case)]
16018 pub fn part_type_as_part_type_transform_constraint(&self) -> Option<NoneValueEntry<'a>> {
16019 if self.part_type_type() == PartType::PartTypeTransformConstraint {
16020 self.part_type().map(|t| {
16021 unsafe { NoneValueEntry::init_from_table(t) }
16025 })
16026 } else {
16027 None
16028 }
16029 }
16030
16031 #[inline]
16032 #[allow(non_snake_case)]
16033 pub fn part_type_as_part_type_camera(&self) -> Option<NoneValueEntry<'a>> {
16034 if self.part_type_type() == PartType::PartTypeCamera {
16035 self.part_type().map(|t| {
16036 unsafe { NoneValueEntry::init_from_table(t) }
16040 })
16041 } else {
16042 None
16043 }
16044 }
16045
16046 #[inline]
16047 #[allow(non_snake_case)]
16048 pub fn part_type_as_part_type_audio(&self) -> Option<NoneValueEntry<'a>> {
16049 if self.part_type_type() == PartType::PartTypeAudio {
16050 self.part_type().map(|t| {
16051 unsafe { NoneValueEntry::init_from_table(t) }
16055 })
16056 } else {
16057 None
16058 }
16059 }
16060
16061}
16062
16063impl ::flatbuffers::Verifiable for PartData<'_> {
16064 #[inline]
16065 fn run_verifier(
16066 v: &mut ::flatbuffers::Verifier, pos: usize
16067 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
16068 v.visit_table(pos)?
16069 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
16070 .visit_field::<i16>("parent_index", Self::VT_PARENT_INDEX, false)?
16071 .visit_field::<BoundsType>("bounds_type", Self::VT_BOUNDS_TYPE, false)?
16072 .visit_field::<BlendType>("blend_type", Self::VT_BLEND_TYPE, false)?
16073 .visit_field::<bool>("visible_inside_mask", Self::VT_VISIBLE_INSIDE_MASK, false)?
16074 .visit_field::<bool>("mask_write", Self::VT_MASK_WRITE, false)?
16075 .visit_field::<bool>("mask_influence", Self::VT_MASK_INFLUENCE, false)?
16076 .visit_field::<bool>("draw_as_mask", Self::VT_DRAW_AS_MASK, false)?
16077 .visit_field::<bool>("output_influence", Self::VT_OUTPUT_INFLUENCE, false)?
16078 .visit_field::<::flatbuffers::ForwardsUOffset<PartMeshBinding>>("mesh_binding", Self::VT_MESH_BINDING, false)?
16079 .visit_union::<PartType, _>("part_type_type", Self::VT_PART_TYPE_TYPE, "part_type", Self::VT_PART_TYPE, false, |key, v, pos| {
16080 match key {
16081 PartType::PartTypeNull => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<NoneValueEntry>>("PartType::PartTypeNull", pos),
16082 PartType::PartTypeNormal => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<NoneValueEntry>>("PartType::PartTypeNormal", pos),
16083 PartType::PartTypeShape => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<PartTypeShape>>("PartType::PartTypeShape", pos),
16084 PartType::PartTypeText => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<PartTypeText>>("PartType::PartTypeText", pos),
16085 PartType::PartTypeNines => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<PartTypeNines>>("PartType::PartTypeNines", pos),
16086 PartType::PartTypeInstance => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<PartTypeInstance>>("PartType::PartTypeInstance", pos),
16087 PartType::PartTypeArmature => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<NoneValueEntry>>("PartType::PartTypeArmature", pos),
16088 PartType::PartTypeEffect => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<PartTypeEffect>>("PartType::PartTypeEffect", pos),
16089 PartType::PartTypeMesh => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<NoneValueEntry>>("PartType::PartTypeMesh", pos),
16090 PartType::PartTypeMovenode => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<NoneValueEntry>>("PartType::PartTypeMovenode", pos),
16091 PartType::PartTypeConstraint => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<NoneValueEntry>>("PartType::PartTypeConstraint", pos),
16092 PartType::PartTypeMask => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<NoneValueEntry>>("PartType::PartTypeMask", pos),
16093 PartType::PartTypeJoint => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<NoneValueEntry>>("PartType::PartTypeJoint", pos),
16094 PartType::PartTypeBonepoint => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<NoneValueEntry>>("PartType::PartTypeBonepoint", pos),
16095 PartType::PartTypeTransformConstraint => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<NoneValueEntry>>("PartType::PartTypeTransformConstraint", pos),
16096 PartType::PartTypeCamera => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<NoneValueEntry>>("PartType::PartTypeCamera", pos),
16097 PartType::PartTypeAudio => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<NoneValueEntry>>("PartType::PartTypeAudio", pos),
16098 _ => Ok(()),
16099 }
16100 })?
16101 .finish();
16102 Ok(())
16103 }
16104}
16105pub struct PartDataArgs<'a> {
16106 pub name: Option<::flatbuffers::WIPOffset<&'a str>>,
16107 pub parent_index: i16,
16108 pub bounds_type: BoundsType,
16109 pub blend_type: BlendType,
16110 pub visible_inside_mask: bool,
16111 pub mask_write: bool,
16112 pub mask_influence: bool,
16113 pub draw_as_mask: bool,
16114 pub output_influence: bool,
16115 pub mesh_binding: Option<::flatbuffers::WIPOffset<PartMeshBinding<'a>>>,
16116 pub part_type_type: PartType,
16117 pub part_type: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>,
16118}
16119impl<'a> Default for PartDataArgs<'a> {
16120 #[inline]
16121 fn default() -> Self {
16122 PartDataArgs {
16123 name: None, parent_index: 0,
16125 bounds_type: BoundsType::None,
16126 blend_type: BlendType::Mix,
16127 visible_inside_mask: false,
16128 mask_write: false,
16129 mask_influence: false,
16130 draw_as_mask: false,
16131 output_influence: true,
16132 mesh_binding: None,
16133 part_type_type: PartType::NONE,
16134 part_type: None,
16135 }
16136 }
16137}
16138
16139pub struct PartDataBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
16140 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
16141 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
16142}
16143impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartDataBuilder<'a, 'b, A> {
16144 #[inline]
16145 pub fn add_name(&mut self, name: ::flatbuffers::WIPOffset<&'b str>) {
16146 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartData::VT_NAME, name);
16147 }
16148 #[inline]
16149 pub fn add_parent_index(&mut self, parent_index: i16) {
16150 self.fbb_.push_slot::<i16>(PartData::VT_PARENT_INDEX, parent_index, 0);
16151 }
16152 #[inline]
16153 pub fn add_bounds_type(&mut self, bounds_type: BoundsType) {
16154 self.fbb_.push_slot::<BoundsType>(PartData::VT_BOUNDS_TYPE, bounds_type, BoundsType::None);
16155 }
16156 #[inline]
16157 pub fn add_blend_type(&mut self, blend_type: BlendType) {
16158 self.fbb_.push_slot::<BlendType>(PartData::VT_BLEND_TYPE, blend_type, BlendType::Mix);
16159 }
16160 #[inline]
16161 pub fn add_visible_inside_mask(&mut self, visible_inside_mask: bool) {
16162 self.fbb_.push_slot::<bool>(PartData::VT_VISIBLE_INSIDE_MASK, visible_inside_mask, false);
16163 }
16164 #[inline]
16165 pub fn add_mask_write(&mut self, mask_write: bool) {
16166 self.fbb_.push_slot::<bool>(PartData::VT_MASK_WRITE, mask_write, false);
16167 }
16168 #[inline]
16169 pub fn add_mask_influence(&mut self, mask_influence: bool) {
16170 self.fbb_.push_slot::<bool>(PartData::VT_MASK_INFLUENCE, mask_influence, false);
16171 }
16172 #[inline]
16173 pub fn add_draw_as_mask(&mut self, draw_as_mask: bool) {
16174 self.fbb_.push_slot::<bool>(PartData::VT_DRAW_AS_MASK, draw_as_mask, false);
16175 }
16176 #[inline]
16177 pub fn add_output_influence(&mut self, output_influence: bool) {
16178 self.fbb_.push_slot::<bool>(PartData::VT_OUTPUT_INFLUENCE, output_influence, true);
16179 }
16180 #[inline]
16181 pub fn add_mesh_binding(&mut self, mesh_binding: ::flatbuffers::WIPOffset<PartMeshBinding<'b >>) {
16182 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PartMeshBinding>>(PartData::VT_MESH_BINDING, mesh_binding);
16183 }
16184 #[inline]
16185 pub fn add_part_type_type(&mut self, part_type_type: PartType) {
16186 self.fbb_.push_slot::<PartType>(PartData::VT_PART_TYPE_TYPE, part_type_type, PartType::NONE);
16187 }
16188 #[inline]
16189 pub fn add_part_type(&mut self, part_type: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>) {
16190 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PartData::VT_PART_TYPE, part_type);
16191 }
16192 #[inline]
16193 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartDataBuilder<'a, 'b, A> {
16194 let start = _fbb.start_table();
16195 PartDataBuilder {
16196 fbb_: _fbb,
16197 start_: start,
16198 }
16199 }
16200 #[inline]
16201 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartData<'a>> {
16202 let o = self.fbb_.end_table(self.start_);
16203 self.fbb_.required(o, PartData::VT_NAME,"name");
16204 ::flatbuffers::WIPOffset::new(o.value())
16205 }
16206}
16207
16208impl ::core::fmt::Debug for PartData<'_> {
16209 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16210 let mut ds = f.debug_struct("PartData");
16211 ds.field("name", &self.name());
16212 ds.field("parent_index", &self.parent_index());
16213 ds.field("bounds_type", &self.bounds_type());
16214 ds.field("blend_type", &self.blend_type());
16215 ds.field("visible_inside_mask", &self.visible_inside_mask());
16216 ds.field("mask_write", &self.mask_write());
16217 ds.field("mask_influence", &self.mask_influence());
16218 ds.field("draw_as_mask", &self.draw_as_mask());
16219 ds.field("output_influence", &self.output_influence());
16220 ds.field("mesh_binding", &self.mesh_binding());
16221 ds.field("part_type_type", &self.part_type_type());
16222 match self.part_type_type() {
16223 PartType::PartTypeNull => {
16224 if let Some(x) = self.part_type_as_part_type_null() {
16225 ds.field("part_type", &x)
16226 } else {
16227 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16228 }
16229 },
16230 PartType::PartTypeNormal => {
16231 if let Some(x) = self.part_type_as_part_type_normal() {
16232 ds.field("part_type", &x)
16233 } else {
16234 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16235 }
16236 },
16237 PartType::PartTypeShape => {
16238 if let Some(x) = self.part_type_as_part_type_shape() {
16239 ds.field("part_type", &x)
16240 } else {
16241 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16242 }
16243 },
16244 PartType::PartTypeText => {
16245 if let Some(x) = self.part_type_as_part_type_text() {
16246 ds.field("part_type", &x)
16247 } else {
16248 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16249 }
16250 },
16251 PartType::PartTypeNines => {
16252 if let Some(x) = self.part_type_as_part_type_nines() {
16253 ds.field("part_type", &x)
16254 } else {
16255 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16256 }
16257 },
16258 PartType::PartTypeInstance => {
16259 if let Some(x) = self.part_type_as_part_type_instance() {
16260 ds.field("part_type", &x)
16261 } else {
16262 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16263 }
16264 },
16265 PartType::PartTypeArmature => {
16266 if let Some(x) = self.part_type_as_part_type_armature() {
16267 ds.field("part_type", &x)
16268 } else {
16269 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16270 }
16271 },
16272 PartType::PartTypeEffect => {
16273 if let Some(x) = self.part_type_as_part_type_effect() {
16274 ds.field("part_type", &x)
16275 } else {
16276 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16277 }
16278 },
16279 PartType::PartTypeMesh => {
16280 if let Some(x) = self.part_type_as_part_type_mesh() {
16281 ds.field("part_type", &x)
16282 } else {
16283 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16284 }
16285 },
16286 PartType::PartTypeMovenode => {
16287 if let Some(x) = self.part_type_as_part_type_movenode() {
16288 ds.field("part_type", &x)
16289 } else {
16290 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16291 }
16292 },
16293 PartType::PartTypeConstraint => {
16294 if let Some(x) = self.part_type_as_part_type_constraint() {
16295 ds.field("part_type", &x)
16296 } else {
16297 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16298 }
16299 },
16300 PartType::PartTypeMask => {
16301 if let Some(x) = self.part_type_as_part_type_mask() {
16302 ds.field("part_type", &x)
16303 } else {
16304 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16305 }
16306 },
16307 PartType::PartTypeJoint => {
16308 if let Some(x) = self.part_type_as_part_type_joint() {
16309 ds.field("part_type", &x)
16310 } else {
16311 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16312 }
16313 },
16314 PartType::PartTypeBonepoint => {
16315 if let Some(x) = self.part_type_as_part_type_bonepoint() {
16316 ds.field("part_type", &x)
16317 } else {
16318 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16319 }
16320 },
16321 PartType::PartTypeTransformConstraint => {
16322 if let Some(x) = self.part_type_as_part_type_transform_constraint() {
16323 ds.field("part_type", &x)
16324 } else {
16325 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16326 }
16327 },
16328 PartType::PartTypeCamera => {
16329 if let Some(x) = self.part_type_as_part_type_camera() {
16330 ds.field("part_type", &x)
16331 } else {
16332 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16333 }
16334 },
16335 PartType::PartTypeAudio => {
16336 if let Some(x) = self.part_type_as_part_type_audio() {
16337 ds.field("part_type", &x)
16338 } else {
16339 ds.field("part_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
16340 }
16341 },
16342 _ => {
16343 let x: Option<()> = None;
16344 ds.field("part_type", &x)
16345 },
16346 };
16347 ds.finish()
16348 }
16349}
16350#[non_exhaustive]
16351#[derive(Debug, Clone, PartialEq)]
16352pub struct PartDataT {
16353 pub name: alloc::string::String,
16354 pub parent_index: i16,
16355 pub bounds_type: BoundsType,
16356 pub blend_type: BlendType,
16357 pub visible_inside_mask: bool,
16358 pub mask_write: bool,
16359 pub mask_influence: bool,
16360 pub draw_as_mask: bool,
16361 pub output_influence: bool,
16362 pub mesh_binding: Option<alloc::boxed::Box<PartMeshBindingT>>,
16363 pub part_type: PartTypeT,
16364}
16365impl Default for PartDataT {
16366 fn default() -> Self {
16367 Self {
16368 name: alloc::string::ToString::to_string(""),
16369 parent_index: 0,
16370 bounds_type: BoundsType::None,
16371 blend_type: BlendType::Mix,
16372 visible_inside_mask: false,
16373 mask_write: false,
16374 mask_influence: false,
16375 draw_as_mask: false,
16376 output_influence: true,
16377 mesh_binding: None,
16378 part_type: PartTypeT::NONE,
16379 }
16380 }
16381}
16382impl PartDataT {
16383 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
16384 &self,
16385 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
16386 ) -> ::flatbuffers::WIPOffset<PartData<'b>> {
16387 let name = Some({
16388 let x = &self.name;
16389 _fbb.create_string(x)
16390 });
16391 let parent_index = self.parent_index;
16392 let bounds_type = self.bounds_type;
16393 let blend_type = self.blend_type;
16394 let visible_inside_mask = self.visible_inside_mask;
16395 let mask_write = self.mask_write;
16396 let mask_influence = self.mask_influence;
16397 let draw_as_mask = self.draw_as_mask;
16398 let output_influence = self.output_influence;
16399 let mesh_binding = self.mesh_binding.as_ref().map(|x|{
16400 x.pack(_fbb)
16401 });
16402 let part_type_type = self.part_type.part_type_type();
16403 let part_type = self.part_type.pack(_fbb);
16404 PartData::create(_fbb, &PartDataArgs{
16405 name,
16406 parent_index,
16407 bounds_type,
16408 blend_type,
16409 visible_inside_mask,
16410 mask_write,
16411 mask_influence,
16412 draw_as_mask,
16413 output_influence,
16414 mesh_binding,
16415 part_type_type,
16416 part_type,
16417 })
16418 }
16419}
16420pub enum LabelOffset {}
16421#[derive(Copy, Clone, PartialEq)]
16422
16423pub struct Label<'a> {
16424 pub _tab: ::flatbuffers::Table<'a>,
16425}
16426
16427impl<'a> ::flatbuffers::Follow<'a> for Label<'a> {
16428 type Inner = Label<'a>;
16429 #[inline]
16430 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
16431 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
16432 }
16433}
16434
16435impl<'a> Label<'a> {
16436 pub const VT_NAME_HASH: ::flatbuffers::VOffsetT = 4;
16437 pub const VT_NAME: ::flatbuffers::VOffsetT = 6;
16438 pub const VT_TIME: ::flatbuffers::VOffsetT = 8;
16439
16440 #[inline]
16441 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
16442 Label { _tab: table }
16443 }
16444 #[allow(unused_mut)]
16445 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
16446 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
16447 args: &'args LabelArgs<'args>
16448 ) -> ::flatbuffers::WIPOffset<Label<'bldr>> {
16449 let mut builder = LabelBuilder::new(_fbb);
16450 builder.add_time(args.time);
16451 if let Some(x) = args.name { builder.add_name(x); }
16452 builder.add_name_hash(args.name_hash);
16453 builder.finish()
16454 }
16455
16456 pub fn unpack(&self) -> LabelT {
16457 let name_hash = self.name_hash();
16458 let name = {
16459 let x = self.name();
16460 alloc::string::ToString::to_string(x)
16461 };
16462 let time = self.time();
16463 LabelT {
16464 name_hash,
16465 name,
16466 time,
16467 }
16468 }
16469
16470 #[inline]
16471 pub fn name_hash(&self) -> u32 {
16472 unsafe { self._tab.get::<u32>(Label::VT_NAME_HASH, Some(0)).unwrap()}
16476 }
16477 #[inline]
16478 pub fn key_compare_less_than(&self, o: &Label) -> bool {
16479 self.name_hash() < o.name_hash()
16480 }
16481
16482 #[inline]
16483 pub fn key_compare_with_value(&self, val: u32) -> ::core::cmp::Ordering {
16484 let key = self.name_hash();
16485 key.cmp(&val)
16486 }
16487 #[inline]
16488 pub fn name(&self) -> &'a str {
16489 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Label::VT_NAME, None).unwrap()}
16493 }
16494 #[inline]
16495 pub fn time(&self) -> i32 {
16496 unsafe { self._tab.get::<i32>(Label::VT_TIME, Some(0)).unwrap()}
16500 }
16501}
16502
16503impl ::flatbuffers::Verifiable for Label<'_> {
16504 #[inline]
16505 fn run_verifier(
16506 v: &mut ::flatbuffers::Verifier, pos: usize
16507 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
16508 v.visit_table(pos)?
16509 .visit_field::<u32>("name_hash", Self::VT_NAME_HASH, false)?
16510 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
16511 .visit_field::<i32>("time", Self::VT_TIME, false)?
16512 .finish();
16513 Ok(())
16514 }
16515}
16516pub struct LabelArgs<'a> {
16517 pub name_hash: u32,
16518 pub name: Option<::flatbuffers::WIPOffset<&'a str>>,
16519 pub time: i32,
16520}
16521impl<'a> Default for LabelArgs<'a> {
16522 #[inline]
16523 fn default() -> Self {
16524 LabelArgs {
16525 name_hash: 0,
16526 name: None, time: 0,
16528 }
16529 }
16530}
16531
16532pub struct LabelBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
16533 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
16534 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
16535}
16536impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> LabelBuilder<'a, 'b, A> {
16537 #[inline]
16538 pub fn add_name_hash(&mut self, name_hash: u32) {
16539 self.fbb_.push_slot::<u32>(Label::VT_NAME_HASH, name_hash, 0);
16540 }
16541 #[inline]
16542 pub fn add_name(&mut self, name: ::flatbuffers::WIPOffset<&'b str>) {
16543 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Label::VT_NAME, name);
16544 }
16545 #[inline]
16546 pub fn add_time(&mut self, time: i32) {
16547 self.fbb_.push_slot::<i32>(Label::VT_TIME, time, 0);
16548 }
16549 #[inline]
16550 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> LabelBuilder<'a, 'b, A> {
16551 let start = _fbb.start_table();
16552 LabelBuilder {
16553 fbb_: _fbb,
16554 start_: start,
16555 }
16556 }
16557 #[inline]
16558 pub fn finish(self) -> ::flatbuffers::WIPOffset<Label<'a>> {
16559 let o = self.fbb_.end_table(self.start_);
16560 self.fbb_.required(o, Label::VT_NAME,"name");
16561 ::flatbuffers::WIPOffset::new(o.value())
16562 }
16563}
16564
16565impl ::core::fmt::Debug for Label<'_> {
16566 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16567 let mut ds = f.debug_struct("Label");
16568 ds.field("name_hash", &self.name_hash());
16569 ds.field("name", &self.name());
16570 ds.field("time", &self.time());
16571 ds.finish()
16572 }
16573}
16574#[non_exhaustive]
16575#[derive(Debug, Clone, PartialEq)]
16576pub struct LabelT {
16577 pub name_hash: u32,
16578 pub name: alloc::string::String,
16579 pub time: i32,
16580}
16581impl Default for LabelT {
16582 fn default() -> Self {
16583 Self {
16584 name_hash: 0,
16585 name: alloc::string::ToString::to_string(""),
16586 time: 0,
16587 }
16588 }
16589}
16590impl LabelT {
16591 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
16592 &self,
16593 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
16594 ) -> ::flatbuffers::WIPOffset<Label<'b>> {
16595 let name_hash = self.name_hash;
16596 let name = Some({
16597 let x = &self.name;
16598 _fbb.create_string(x)
16599 });
16600 let time = self.time;
16601 Label::create(_fbb, &LabelArgs{
16602 name_hash,
16603 name,
16604 time,
16605 })
16606 }
16607}
16608pub enum PartAnimationDataOffset {}
16609#[derive(Copy, Clone, PartialEq)]
16610
16611pub struct PartAnimationData<'a> {
16612 pub _tab: ::flatbuffers::Table<'a>,
16613}
16614
16615impl<'a> ::flatbuffers::Follow<'a> for PartAnimationData<'a> {
16616 type Inner = PartAnimationData<'a>;
16617 #[inline]
16618 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
16619 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
16620 }
16621}
16622
16623impl<'a> PartAnimationData<'a> {
16624 pub const VT_CELL_KEYS: ::flatbuffers::VOffsetT = 4;
16625 pub const VT_POSITION_X_KEYS: ::flatbuffers::VOffsetT = 6;
16626 pub const VT_POSITION_Y_KEYS: ::flatbuffers::VOffsetT = 8;
16627 pub const VT_POSITION_Z_KEYS: ::flatbuffers::VOffsetT = 10;
16628 pub const VT_ROTATION_X_KEYS: ::flatbuffers::VOffsetT = 12;
16629 pub const VT_ROTATION_Y_KEYS: ::flatbuffers::VOffsetT = 14;
16630 pub const VT_ROTATION_Z_KEYS: ::flatbuffers::VOffsetT = 16;
16631 pub const VT_SCALE_X_KEYS: ::flatbuffers::VOffsetT = 18;
16632 pub const VT_SCALE_Y_KEYS: ::flatbuffers::VOffsetT = 20;
16633 pub const VT_LOCAL_SCALE_X_KEYS: ::flatbuffers::VOffsetT = 22;
16634 pub const VT_LOCAL_SCALE_Y_KEYS: ::flatbuffers::VOffsetT = 24;
16635 pub const VT_ALPHA_KEYS: ::flatbuffers::VOffsetT = 26;
16636 pub const VT_LOCAL_ALPHA_KEYS: ::flatbuffers::VOffsetT = 28;
16637 pub const VT_PRIORITY_KEYS: ::flatbuffers::VOffsetT = 30;
16638 pub const VT_FLIP_H_KEYS: ::flatbuffers::VOffsetT = 32;
16639 pub const VT_FLIP_V_KEYS: ::flatbuffers::VOffsetT = 34;
16640 pub const VT_HIDE_KEYS: ::flatbuffers::VOffsetT = 36;
16641 pub const VT_PART_COLOR_KEYS: ::flatbuffers::VOffsetT = 38;
16642 pub const VT_SHADER_KEYS: ::flatbuffers::VOffsetT = 40;
16643 pub const VT_VERTEX_KEYS: ::flatbuffers::VOffsetT = 42;
16644 pub const VT_PIVOT_X_KEYS: ::flatbuffers::VOffsetT = 44;
16645 pub const VT_PIVOT_Y_KEYS: ::flatbuffers::VOffsetT = 46;
16646 pub const VT_ANCHOR_X_KEYS: ::flatbuffers::VOffsetT = 48;
16647 pub const VT_ANCHOR_Y_KEYS: ::flatbuffers::VOffsetT = 50;
16648 pub const VT_SIZE_X_KEYS: ::flatbuffers::VOffsetT = 52;
16649 pub const VT_SIZE_Y_KEYS: ::flatbuffers::VOffsetT = 54;
16650 pub const VT_IMG_FLIP_H_KEYS: ::flatbuffers::VOffsetT = 56;
16651 pub const VT_IMG_FLIP_V_KEYS: ::flatbuffers::VOffsetT = 58;
16652 pub const VT_UV_TRANSLATION_X_KEYS: ::flatbuffers::VOffsetT = 60;
16653 pub const VT_UV_TRANSLATION_Y_KEYS: ::flatbuffers::VOffsetT = 62;
16654 pub const VT_UV_ROTATION_Z_KEYS: ::flatbuffers::VOffsetT = 64;
16655 pub const VT_UV_SCALE_X_KEYS: ::flatbuffers::VOffsetT = 66;
16656 pub const VT_UV_SCALE_Y_KEYS: ::flatbuffers::VOffsetT = 68;
16657 pub const VT_BOUNDING_RADIUS_KEYS: ::flatbuffers::VOffsetT = 70;
16658 pub const VT_MASK_KEYS: ::flatbuffers::VOffsetT = 72;
16659 pub const VT_SKEW_KEYS: ::flatbuffers::VOffsetT = 74;
16660 pub const VT_DEFORM_KEYS: ::flatbuffers::VOffsetT = 76;
16661 pub const VT_TEXTURE_KEYS: ::flatbuffers::VOffsetT = 78;
16662
16663 #[inline]
16664 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
16665 PartAnimationData { _tab: table }
16666 }
16667 #[allow(unused_mut)]
16668 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
16669 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
16670 args: &'args PartAnimationDataArgs
16671 ) -> ::flatbuffers::WIPOffset<PartAnimationData<'bldr>> {
16672 let mut builder = PartAnimationDataBuilder::new(_fbb);
16673 builder.add_texture_keys(args.texture_keys);
16674 builder.add_deform_keys(args.deform_keys);
16675 builder.add_skew_keys(args.skew_keys);
16676 builder.add_mask_keys(args.mask_keys);
16677 builder.add_bounding_radius_keys(args.bounding_radius_keys);
16678 builder.add_uv_scale_y_keys(args.uv_scale_y_keys);
16679 builder.add_uv_scale_x_keys(args.uv_scale_x_keys);
16680 builder.add_uv_rotation_z_keys(args.uv_rotation_z_keys);
16681 builder.add_uv_translation_y_keys(args.uv_translation_y_keys);
16682 builder.add_uv_translation_x_keys(args.uv_translation_x_keys);
16683 builder.add_img_flip_v_keys(args.img_flip_v_keys);
16684 builder.add_img_flip_h_keys(args.img_flip_h_keys);
16685 builder.add_size_y_keys(args.size_y_keys);
16686 builder.add_size_x_keys(args.size_x_keys);
16687 builder.add_anchor_y_keys(args.anchor_y_keys);
16688 builder.add_anchor_x_keys(args.anchor_x_keys);
16689 builder.add_pivot_y_keys(args.pivot_y_keys);
16690 builder.add_pivot_x_keys(args.pivot_x_keys);
16691 builder.add_vertex_keys(args.vertex_keys);
16692 builder.add_shader_keys(args.shader_keys);
16693 builder.add_part_color_keys(args.part_color_keys);
16694 builder.add_hide_keys(args.hide_keys);
16695 builder.add_flip_v_keys(args.flip_v_keys);
16696 builder.add_flip_h_keys(args.flip_h_keys);
16697 builder.add_priority_keys(args.priority_keys);
16698 builder.add_local_alpha_keys(args.local_alpha_keys);
16699 builder.add_alpha_keys(args.alpha_keys);
16700 builder.add_local_scale_y_keys(args.local_scale_y_keys);
16701 builder.add_local_scale_x_keys(args.local_scale_x_keys);
16702 builder.add_scale_y_keys(args.scale_y_keys);
16703 builder.add_scale_x_keys(args.scale_x_keys);
16704 builder.add_rotation_z_keys(args.rotation_z_keys);
16705 builder.add_rotation_y_keys(args.rotation_y_keys);
16706 builder.add_rotation_x_keys(args.rotation_x_keys);
16707 builder.add_position_z_keys(args.position_z_keys);
16708 builder.add_position_y_keys(args.position_y_keys);
16709 builder.add_position_x_keys(args.position_x_keys);
16710 builder.add_cell_keys(args.cell_keys);
16711 builder.finish()
16712 }
16713
16714 pub fn unpack(&self) -> PartAnimationDataT {
16715 let cell_keys = self.cell_keys();
16716 let position_x_keys = self.position_x_keys();
16717 let position_y_keys = self.position_y_keys();
16718 let position_z_keys = self.position_z_keys();
16719 let rotation_x_keys = self.rotation_x_keys();
16720 let rotation_y_keys = self.rotation_y_keys();
16721 let rotation_z_keys = self.rotation_z_keys();
16722 let scale_x_keys = self.scale_x_keys();
16723 let scale_y_keys = self.scale_y_keys();
16724 let local_scale_x_keys = self.local_scale_x_keys();
16725 let local_scale_y_keys = self.local_scale_y_keys();
16726 let alpha_keys = self.alpha_keys();
16727 let local_alpha_keys = self.local_alpha_keys();
16728 let priority_keys = self.priority_keys();
16729 let flip_h_keys = self.flip_h_keys();
16730 let flip_v_keys = self.flip_v_keys();
16731 let hide_keys = self.hide_keys();
16732 let part_color_keys = self.part_color_keys();
16733 let shader_keys = self.shader_keys();
16734 let vertex_keys = self.vertex_keys();
16735 let pivot_x_keys = self.pivot_x_keys();
16736 let pivot_y_keys = self.pivot_y_keys();
16737 let anchor_x_keys = self.anchor_x_keys();
16738 let anchor_y_keys = self.anchor_y_keys();
16739 let size_x_keys = self.size_x_keys();
16740 let size_y_keys = self.size_y_keys();
16741 let img_flip_h_keys = self.img_flip_h_keys();
16742 let img_flip_v_keys = self.img_flip_v_keys();
16743 let uv_translation_x_keys = self.uv_translation_x_keys();
16744 let uv_translation_y_keys = self.uv_translation_y_keys();
16745 let uv_rotation_z_keys = self.uv_rotation_z_keys();
16746 let uv_scale_x_keys = self.uv_scale_x_keys();
16747 let uv_scale_y_keys = self.uv_scale_y_keys();
16748 let bounding_radius_keys = self.bounding_radius_keys();
16749 let mask_keys = self.mask_keys();
16750 let skew_keys = self.skew_keys();
16751 let deform_keys = self.deform_keys();
16752 let texture_keys = self.texture_keys();
16753 PartAnimationDataT {
16754 cell_keys,
16755 position_x_keys,
16756 position_y_keys,
16757 position_z_keys,
16758 rotation_x_keys,
16759 rotation_y_keys,
16760 rotation_z_keys,
16761 scale_x_keys,
16762 scale_y_keys,
16763 local_scale_x_keys,
16764 local_scale_y_keys,
16765 alpha_keys,
16766 local_alpha_keys,
16767 priority_keys,
16768 flip_h_keys,
16769 flip_v_keys,
16770 hide_keys,
16771 part_color_keys,
16772 shader_keys,
16773 vertex_keys,
16774 pivot_x_keys,
16775 pivot_y_keys,
16776 anchor_x_keys,
16777 anchor_y_keys,
16778 size_x_keys,
16779 size_y_keys,
16780 img_flip_h_keys,
16781 img_flip_v_keys,
16782 uv_translation_x_keys,
16783 uv_translation_y_keys,
16784 uv_rotation_z_keys,
16785 uv_scale_x_keys,
16786 uv_scale_y_keys,
16787 bounding_radius_keys,
16788 mask_keys,
16789 skew_keys,
16790 deform_keys,
16791 texture_keys,
16792 }
16793 }
16794
16795 #[inline]
16796 pub fn cell_keys(&self) -> u32 {
16797 unsafe { self._tab.get::<u32>(PartAnimationData::VT_CELL_KEYS, Some(4294967295)).unwrap()}
16801 }
16802 #[inline]
16803 pub fn position_x_keys(&self) -> u32 {
16804 unsafe { self._tab.get::<u32>(PartAnimationData::VT_POSITION_X_KEYS, Some(4294967295)).unwrap()}
16808 }
16809 #[inline]
16810 pub fn position_y_keys(&self) -> u32 {
16811 unsafe { self._tab.get::<u32>(PartAnimationData::VT_POSITION_Y_KEYS, Some(4294967295)).unwrap()}
16815 }
16816 #[inline]
16817 pub fn position_z_keys(&self) -> u32 {
16818 unsafe { self._tab.get::<u32>(PartAnimationData::VT_POSITION_Z_KEYS, Some(4294967295)).unwrap()}
16822 }
16823 #[inline]
16824 pub fn rotation_x_keys(&self) -> u32 {
16825 unsafe { self._tab.get::<u32>(PartAnimationData::VT_ROTATION_X_KEYS, Some(4294967295)).unwrap()}
16829 }
16830 #[inline]
16831 pub fn rotation_y_keys(&self) -> u32 {
16832 unsafe { self._tab.get::<u32>(PartAnimationData::VT_ROTATION_Y_KEYS, Some(4294967295)).unwrap()}
16836 }
16837 #[inline]
16838 pub fn rotation_z_keys(&self) -> u32 {
16839 unsafe { self._tab.get::<u32>(PartAnimationData::VT_ROTATION_Z_KEYS, Some(4294967295)).unwrap()}
16843 }
16844 #[inline]
16845 pub fn scale_x_keys(&self) -> u32 {
16846 unsafe { self._tab.get::<u32>(PartAnimationData::VT_SCALE_X_KEYS, Some(4294967295)).unwrap()}
16850 }
16851 #[inline]
16852 pub fn scale_y_keys(&self) -> u32 {
16853 unsafe { self._tab.get::<u32>(PartAnimationData::VT_SCALE_Y_KEYS, Some(4294967295)).unwrap()}
16857 }
16858 #[inline]
16859 pub fn local_scale_x_keys(&self) -> u32 {
16860 unsafe { self._tab.get::<u32>(PartAnimationData::VT_LOCAL_SCALE_X_KEYS, Some(4294967295)).unwrap()}
16864 }
16865 #[inline]
16866 pub fn local_scale_y_keys(&self) -> u32 {
16867 unsafe { self._tab.get::<u32>(PartAnimationData::VT_LOCAL_SCALE_Y_KEYS, Some(4294967295)).unwrap()}
16871 }
16872 #[inline]
16873 pub fn alpha_keys(&self) -> u32 {
16874 unsafe { self._tab.get::<u32>(PartAnimationData::VT_ALPHA_KEYS, Some(4294967295)).unwrap()}
16878 }
16879 #[inline]
16880 pub fn local_alpha_keys(&self) -> u32 {
16881 unsafe { self._tab.get::<u32>(PartAnimationData::VT_LOCAL_ALPHA_KEYS, Some(4294967295)).unwrap()}
16885 }
16886 #[inline]
16887 pub fn priority_keys(&self) -> u32 {
16888 unsafe { self._tab.get::<u32>(PartAnimationData::VT_PRIORITY_KEYS, Some(4294967295)).unwrap()}
16892 }
16893 #[inline]
16894 pub fn flip_h_keys(&self) -> u32 {
16895 unsafe { self._tab.get::<u32>(PartAnimationData::VT_FLIP_H_KEYS, Some(4294967295)).unwrap()}
16899 }
16900 #[inline]
16901 pub fn flip_v_keys(&self) -> u32 {
16902 unsafe { self._tab.get::<u32>(PartAnimationData::VT_FLIP_V_KEYS, Some(4294967295)).unwrap()}
16906 }
16907 #[inline]
16908 pub fn hide_keys(&self) -> u32 {
16909 unsafe { self._tab.get::<u32>(PartAnimationData::VT_HIDE_KEYS, Some(4294967295)).unwrap()}
16913 }
16914 #[inline]
16915 pub fn part_color_keys(&self) -> u32 {
16916 unsafe { self._tab.get::<u32>(PartAnimationData::VT_PART_COLOR_KEYS, Some(4294967295)).unwrap()}
16920 }
16921 #[inline]
16922 pub fn shader_keys(&self) -> u32 {
16923 unsafe { self._tab.get::<u32>(PartAnimationData::VT_SHADER_KEYS, Some(4294967295)).unwrap()}
16927 }
16928 #[inline]
16929 pub fn vertex_keys(&self) -> u32 {
16930 unsafe { self._tab.get::<u32>(PartAnimationData::VT_VERTEX_KEYS, Some(4294967295)).unwrap()}
16934 }
16935 #[inline]
16936 pub fn pivot_x_keys(&self) -> u32 {
16937 unsafe { self._tab.get::<u32>(PartAnimationData::VT_PIVOT_X_KEYS, Some(4294967295)).unwrap()}
16941 }
16942 #[inline]
16943 pub fn pivot_y_keys(&self) -> u32 {
16944 unsafe { self._tab.get::<u32>(PartAnimationData::VT_PIVOT_Y_KEYS, Some(4294967295)).unwrap()}
16948 }
16949 #[inline]
16950 pub fn anchor_x_keys(&self) -> u32 {
16951 unsafe { self._tab.get::<u32>(PartAnimationData::VT_ANCHOR_X_KEYS, Some(4294967295)).unwrap()}
16955 }
16956 #[inline]
16957 pub fn anchor_y_keys(&self) -> u32 {
16958 unsafe { self._tab.get::<u32>(PartAnimationData::VT_ANCHOR_Y_KEYS, Some(4294967295)).unwrap()}
16962 }
16963 #[inline]
16964 pub fn size_x_keys(&self) -> u32 {
16965 unsafe { self._tab.get::<u32>(PartAnimationData::VT_SIZE_X_KEYS, Some(4294967295)).unwrap()}
16969 }
16970 #[inline]
16971 pub fn size_y_keys(&self) -> u32 {
16972 unsafe { self._tab.get::<u32>(PartAnimationData::VT_SIZE_Y_KEYS, Some(4294967295)).unwrap()}
16976 }
16977 #[inline]
16978 pub fn img_flip_h_keys(&self) -> u32 {
16979 unsafe { self._tab.get::<u32>(PartAnimationData::VT_IMG_FLIP_H_KEYS, Some(4294967295)).unwrap()}
16983 }
16984 #[inline]
16985 pub fn img_flip_v_keys(&self) -> u32 {
16986 unsafe { self._tab.get::<u32>(PartAnimationData::VT_IMG_FLIP_V_KEYS, Some(4294967295)).unwrap()}
16990 }
16991 #[inline]
16992 pub fn uv_translation_x_keys(&self) -> u32 {
16993 unsafe { self._tab.get::<u32>(PartAnimationData::VT_UV_TRANSLATION_X_KEYS, Some(4294967295)).unwrap()}
16997 }
16998 #[inline]
16999 pub fn uv_translation_y_keys(&self) -> u32 {
17000 unsafe { self._tab.get::<u32>(PartAnimationData::VT_UV_TRANSLATION_Y_KEYS, Some(4294967295)).unwrap()}
17004 }
17005 #[inline]
17006 pub fn uv_rotation_z_keys(&self) -> u32 {
17007 unsafe { self._tab.get::<u32>(PartAnimationData::VT_UV_ROTATION_Z_KEYS, Some(4294967295)).unwrap()}
17011 }
17012 #[inline]
17013 pub fn uv_scale_x_keys(&self) -> u32 {
17014 unsafe { self._tab.get::<u32>(PartAnimationData::VT_UV_SCALE_X_KEYS, Some(4294967295)).unwrap()}
17018 }
17019 #[inline]
17020 pub fn uv_scale_y_keys(&self) -> u32 {
17021 unsafe { self._tab.get::<u32>(PartAnimationData::VT_UV_SCALE_Y_KEYS, Some(4294967295)).unwrap()}
17025 }
17026 #[inline]
17027 pub fn bounding_radius_keys(&self) -> u32 {
17028 unsafe { self._tab.get::<u32>(PartAnimationData::VT_BOUNDING_RADIUS_KEYS, Some(4294967295)).unwrap()}
17032 }
17033 #[inline]
17034 pub fn mask_keys(&self) -> u32 {
17035 unsafe { self._tab.get::<u32>(PartAnimationData::VT_MASK_KEYS, Some(4294967295)).unwrap()}
17039 }
17040 #[inline]
17041 pub fn skew_keys(&self) -> u32 {
17042 unsafe { self._tab.get::<u32>(PartAnimationData::VT_SKEW_KEYS, Some(4294967295)).unwrap()}
17046 }
17047 #[inline]
17048 pub fn deform_keys(&self) -> u32 {
17049 unsafe { self._tab.get::<u32>(PartAnimationData::VT_DEFORM_KEYS, Some(4294967295)).unwrap()}
17053 }
17054 #[inline]
17055 pub fn texture_keys(&self) -> u32 {
17056 unsafe { self._tab.get::<u32>(PartAnimationData::VT_TEXTURE_KEYS, Some(4294967295)).unwrap()}
17060 }
17061}
17062
17063impl ::flatbuffers::Verifiable for PartAnimationData<'_> {
17064 #[inline]
17065 fn run_verifier(
17066 v: &mut ::flatbuffers::Verifier, pos: usize
17067 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
17068 v.visit_table(pos)?
17069 .visit_field::<u32>("cell_keys", Self::VT_CELL_KEYS, false)?
17070 .visit_field::<u32>("position_x_keys", Self::VT_POSITION_X_KEYS, false)?
17071 .visit_field::<u32>("position_y_keys", Self::VT_POSITION_Y_KEYS, false)?
17072 .visit_field::<u32>("position_z_keys", Self::VT_POSITION_Z_KEYS, false)?
17073 .visit_field::<u32>("rotation_x_keys", Self::VT_ROTATION_X_KEYS, false)?
17074 .visit_field::<u32>("rotation_y_keys", Self::VT_ROTATION_Y_KEYS, false)?
17075 .visit_field::<u32>("rotation_z_keys", Self::VT_ROTATION_Z_KEYS, false)?
17076 .visit_field::<u32>("scale_x_keys", Self::VT_SCALE_X_KEYS, false)?
17077 .visit_field::<u32>("scale_y_keys", Self::VT_SCALE_Y_KEYS, false)?
17078 .visit_field::<u32>("local_scale_x_keys", Self::VT_LOCAL_SCALE_X_KEYS, false)?
17079 .visit_field::<u32>("local_scale_y_keys", Self::VT_LOCAL_SCALE_Y_KEYS, false)?
17080 .visit_field::<u32>("alpha_keys", Self::VT_ALPHA_KEYS, false)?
17081 .visit_field::<u32>("local_alpha_keys", Self::VT_LOCAL_ALPHA_KEYS, false)?
17082 .visit_field::<u32>("priority_keys", Self::VT_PRIORITY_KEYS, false)?
17083 .visit_field::<u32>("flip_h_keys", Self::VT_FLIP_H_KEYS, false)?
17084 .visit_field::<u32>("flip_v_keys", Self::VT_FLIP_V_KEYS, false)?
17085 .visit_field::<u32>("hide_keys", Self::VT_HIDE_KEYS, false)?
17086 .visit_field::<u32>("part_color_keys", Self::VT_PART_COLOR_KEYS, false)?
17087 .visit_field::<u32>("shader_keys", Self::VT_SHADER_KEYS, false)?
17088 .visit_field::<u32>("vertex_keys", Self::VT_VERTEX_KEYS, false)?
17089 .visit_field::<u32>("pivot_x_keys", Self::VT_PIVOT_X_KEYS, false)?
17090 .visit_field::<u32>("pivot_y_keys", Self::VT_PIVOT_Y_KEYS, false)?
17091 .visit_field::<u32>("anchor_x_keys", Self::VT_ANCHOR_X_KEYS, false)?
17092 .visit_field::<u32>("anchor_y_keys", Self::VT_ANCHOR_Y_KEYS, false)?
17093 .visit_field::<u32>("size_x_keys", Self::VT_SIZE_X_KEYS, false)?
17094 .visit_field::<u32>("size_y_keys", Self::VT_SIZE_Y_KEYS, false)?
17095 .visit_field::<u32>("img_flip_h_keys", Self::VT_IMG_FLIP_H_KEYS, false)?
17096 .visit_field::<u32>("img_flip_v_keys", Self::VT_IMG_FLIP_V_KEYS, false)?
17097 .visit_field::<u32>("uv_translation_x_keys", Self::VT_UV_TRANSLATION_X_KEYS, false)?
17098 .visit_field::<u32>("uv_translation_y_keys", Self::VT_UV_TRANSLATION_Y_KEYS, false)?
17099 .visit_field::<u32>("uv_rotation_z_keys", Self::VT_UV_ROTATION_Z_KEYS, false)?
17100 .visit_field::<u32>("uv_scale_x_keys", Self::VT_UV_SCALE_X_KEYS, false)?
17101 .visit_field::<u32>("uv_scale_y_keys", Self::VT_UV_SCALE_Y_KEYS, false)?
17102 .visit_field::<u32>("bounding_radius_keys", Self::VT_BOUNDING_RADIUS_KEYS, false)?
17103 .visit_field::<u32>("mask_keys", Self::VT_MASK_KEYS, false)?
17104 .visit_field::<u32>("skew_keys", Self::VT_SKEW_KEYS, false)?
17105 .visit_field::<u32>("deform_keys", Self::VT_DEFORM_KEYS, false)?
17106 .visit_field::<u32>("texture_keys", Self::VT_TEXTURE_KEYS, false)?
17107 .finish();
17108 Ok(())
17109 }
17110}
17111pub struct PartAnimationDataArgs {
17112 pub cell_keys: u32,
17113 pub position_x_keys: u32,
17114 pub position_y_keys: u32,
17115 pub position_z_keys: u32,
17116 pub rotation_x_keys: u32,
17117 pub rotation_y_keys: u32,
17118 pub rotation_z_keys: u32,
17119 pub scale_x_keys: u32,
17120 pub scale_y_keys: u32,
17121 pub local_scale_x_keys: u32,
17122 pub local_scale_y_keys: u32,
17123 pub alpha_keys: u32,
17124 pub local_alpha_keys: u32,
17125 pub priority_keys: u32,
17126 pub flip_h_keys: u32,
17127 pub flip_v_keys: u32,
17128 pub hide_keys: u32,
17129 pub part_color_keys: u32,
17130 pub shader_keys: u32,
17131 pub vertex_keys: u32,
17132 pub pivot_x_keys: u32,
17133 pub pivot_y_keys: u32,
17134 pub anchor_x_keys: u32,
17135 pub anchor_y_keys: u32,
17136 pub size_x_keys: u32,
17137 pub size_y_keys: u32,
17138 pub img_flip_h_keys: u32,
17139 pub img_flip_v_keys: u32,
17140 pub uv_translation_x_keys: u32,
17141 pub uv_translation_y_keys: u32,
17142 pub uv_rotation_z_keys: u32,
17143 pub uv_scale_x_keys: u32,
17144 pub uv_scale_y_keys: u32,
17145 pub bounding_radius_keys: u32,
17146 pub mask_keys: u32,
17147 pub skew_keys: u32,
17148 pub deform_keys: u32,
17149 pub texture_keys: u32,
17150}
17151impl<'a> Default for PartAnimationDataArgs {
17152 #[inline]
17153 fn default() -> Self {
17154 PartAnimationDataArgs {
17155 cell_keys: 4294967295,
17156 position_x_keys: 4294967295,
17157 position_y_keys: 4294967295,
17158 position_z_keys: 4294967295,
17159 rotation_x_keys: 4294967295,
17160 rotation_y_keys: 4294967295,
17161 rotation_z_keys: 4294967295,
17162 scale_x_keys: 4294967295,
17163 scale_y_keys: 4294967295,
17164 local_scale_x_keys: 4294967295,
17165 local_scale_y_keys: 4294967295,
17166 alpha_keys: 4294967295,
17167 local_alpha_keys: 4294967295,
17168 priority_keys: 4294967295,
17169 flip_h_keys: 4294967295,
17170 flip_v_keys: 4294967295,
17171 hide_keys: 4294967295,
17172 part_color_keys: 4294967295,
17173 shader_keys: 4294967295,
17174 vertex_keys: 4294967295,
17175 pivot_x_keys: 4294967295,
17176 pivot_y_keys: 4294967295,
17177 anchor_x_keys: 4294967295,
17178 anchor_y_keys: 4294967295,
17179 size_x_keys: 4294967295,
17180 size_y_keys: 4294967295,
17181 img_flip_h_keys: 4294967295,
17182 img_flip_v_keys: 4294967295,
17183 uv_translation_x_keys: 4294967295,
17184 uv_translation_y_keys: 4294967295,
17185 uv_rotation_z_keys: 4294967295,
17186 uv_scale_x_keys: 4294967295,
17187 uv_scale_y_keys: 4294967295,
17188 bounding_radius_keys: 4294967295,
17189 mask_keys: 4294967295,
17190 skew_keys: 4294967295,
17191 deform_keys: 4294967295,
17192 texture_keys: 4294967295,
17193 }
17194 }
17195}
17196
17197pub struct PartAnimationDataBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
17198 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
17199 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
17200}
17201impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PartAnimationDataBuilder<'a, 'b, A> {
17202 #[inline]
17203 pub fn add_cell_keys(&mut self, cell_keys: u32) {
17204 self.fbb_.push_slot::<u32>(PartAnimationData::VT_CELL_KEYS, cell_keys, 4294967295);
17205 }
17206 #[inline]
17207 pub fn add_position_x_keys(&mut self, position_x_keys: u32) {
17208 self.fbb_.push_slot::<u32>(PartAnimationData::VT_POSITION_X_KEYS, position_x_keys, 4294967295);
17209 }
17210 #[inline]
17211 pub fn add_position_y_keys(&mut self, position_y_keys: u32) {
17212 self.fbb_.push_slot::<u32>(PartAnimationData::VT_POSITION_Y_KEYS, position_y_keys, 4294967295);
17213 }
17214 #[inline]
17215 pub fn add_position_z_keys(&mut self, position_z_keys: u32) {
17216 self.fbb_.push_slot::<u32>(PartAnimationData::VT_POSITION_Z_KEYS, position_z_keys, 4294967295);
17217 }
17218 #[inline]
17219 pub fn add_rotation_x_keys(&mut self, rotation_x_keys: u32) {
17220 self.fbb_.push_slot::<u32>(PartAnimationData::VT_ROTATION_X_KEYS, rotation_x_keys, 4294967295);
17221 }
17222 #[inline]
17223 pub fn add_rotation_y_keys(&mut self, rotation_y_keys: u32) {
17224 self.fbb_.push_slot::<u32>(PartAnimationData::VT_ROTATION_Y_KEYS, rotation_y_keys, 4294967295);
17225 }
17226 #[inline]
17227 pub fn add_rotation_z_keys(&mut self, rotation_z_keys: u32) {
17228 self.fbb_.push_slot::<u32>(PartAnimationData::VT_ROTATION_Z_KEYS, rotation_z_keys, 4294967295);
17229 }
17230 #[inline]
17231 pub fn add_scale_x_keys(&mut self, scale_x_keys: u32) {
17232 self.fbb_.push_slot::<u32>(PartAnimationData::VT_SCALE_X_KEYS, scale_x_keys, 4294967295);
17233 }
17234 #[inline]
17235 pub fn add_scale_y_keys(&mut self, scale_y_keys: u32) {
17236 self.fbb_.push_slot::<u32>(PartAnimationData::VT_SCALE_Y_KEYS, scale_y_keys, 4294967295);
17237 }
17238 #[inline]
17239 pub fn add_local_scale_x_keys(&mut self, local_scale_x_keys: u32) {
17240 self.fbb_.push_slot::<u32>(PartAnimationData::VT_LOCAL_SCALE_X_KEYS, local_scale_x_keys, 4294967295);
17241 }
17242 #[inline]
17243 pub fn add_local_scale_y_keys(&mut self, local_scale_y_keys: u32) {
17244 self.fbb_.push_slot::<u32>(PartAnimationData::VT_LOCAL_SCALE_Y_KEYS, local_scale_y_keys, 4294967295);
17245 }
17246 #[inline]
17247 pub fn add_alpha_keys(&mut self, alpha_keys: u32) {
17248 self.fbb_.push_slot::<u32>(PartAnimationData::VT_ALPHA_KEYS, alpha_keys, 4294967295);
17249 }
17250 #[inline]
17251 pub fn add_local_alpha_keys(&mut self, local_alpha_keys: u32) {
17252 self.fbb_.push_slot::<u32>(PartAnimationData::VT_LOCAL_ALPHA_KEYS, local_alpha_keys, 4294967295);
17253 }
17254 #[inline]
17255 pub fn add_priority_keys(&mut self, priority_keys: u32) {
17256 self.fbb_.push_slot::<u32>(PartAnimationData::VT_PRIORITY_KEYS, priority_keys, 4294967295);
17257 }
17258 #[inline]
17259 pub fn add_flip_h_keys(&mut self, flip_h_keys: u32) {
17260 self.fbb_.push_slot::<u32>(PartAnimationData::VT_FLIP_H_KEYS, flip_h_keys, 4294967295);
17261 }
17262 #[inline]
17263 pub fn add_flip_v_keys(&mut self, flip_v_keys: u32) {
17264 self.fbb_.push_slot::<u32>(PartAnimationData::VT_FLIP_V_KEYS, flip_v_keys, 4294967295);
17265 }
17266 #[inline]
17267 pub fn add_hide_keys(&mut self, hide_keys: u32) {
17268 self.fbb_.push_slot::<u32>(PartAnimationData::VT_HIDE_KEYS, hide_keys, 4294967295);
17269 }
17270 #[inline]
17271 pub fn add_part_color_keys(&mut self, part_color_keys: u32) {
17272 self.fbb_.push_slot::<u32>(PartAnimationData::VT_PART_COLOR_KEYS, part_color_keys, 4294967295);
17273 }
17274 #[inline]
17275 pub fn add_shader_keys(&mut self, shader_keys: u32) {
17276 self.fbb_.push_slot::<u32>(PartAnimationData::VT_SHADER_KEYS, shader_keys, 4294967295);
17277 }
17278 #[inline]
17279 pub fn add_vertex_keys(&mut self, vertex_keys: u32) {
17280 self.fbb_.push_slot::<u32>(PartAnimationData::VT_VERTEX_KEYS, vertex_keys, 4294967295);
17281 }
17282 #[inline]
17283 pub fn add_pivot_x_keys(&mut self, pivot_x_keys: u32) {
17284 self.fbb_.push_slot::<u32>(PartAnimationData::VT_PIVOT_X_KEYS, pivot_x_keys, 4294967295);
17285 }
17286 #[inline]
17287 pub fn add_pivot_y_keys(&mut self, pivot_y_keys: u32) {
17288 self.fbb_.push_slot::<u32>(PartAnimationData::VT_PIVOT_Y_KEYS, pivot_y_keys, 4294967295);
17289 }
17290 #[inline]
17291 pub fn add_anchor_x_keys(&mut self, anchor_x_keys: u32) {
17292 self.fbb_.push_slot::<u32>(PartAnimationData::VT_ANCHOR_X_KEYS, anchor_x_keys, 4294967295);
17293 }
17294 #[inline]
17295 pub fn add_anchor_y_keys(&mut self, anchor_y_keys: u32) {
17296 self.fbb_.push_slot::<u32>(PartAnimationData::VT_ANCHOR_Y_KEYS, anchor_y_keys, 4294967295);
17297 }
17298 #[inline]
17299 pub fn add_size_x_keys(&mut self, size_x_keys: u32) {
17300 self.fbb_.push_slot::<u32>(PartAnimationData::VT_SIZE_X_KEYS, size_x_keys, 4294967295);
17301 }
17302 #[inline]
17303 pub fn add_size_y_keys(&mut self, size_y_keys: u32) {
17304 self.fbb_.push_slot::<u32>(PartAnimationData::VT_SIZE_Y_KEYS, size_y_keys, 4294967295);
17305 }
17306 #[inline]
17307 pub fn add_img_flip_h_keys(&mut self, img_flip_h_keys: u32) {
17308 self.fbb_.push_slot::<u32>(PartAnimationData::VT_IMG_FLIP_H_KEYS, img_flip_h_keys, 4294967295);
17309 }
17310 #[inline]
17311 pub fn add_img_flip_v_keys(&mut self, img_flip_v_keys: u32) {
17312 self.fbb_.push_slot::<u32>(PartAnimationData::VT_IMG_FLIP_V_KEYS, img_flip_v_keys, 4294967295);
17313 }
17314 #[inline]
17315 pub fn add_uv_translation_x_keys(&mut self, uv_translation_x_keys: u32) {
17316 self.fbb_.push_slot::<u32>(PartAnimationData::VT_UV_TRANSLATION_X_KEYS, uv_translation_x_keys, 4294967295);
17317 }
17318 #[inline]
17319 pub fn add_uv_translation_y_keys(&mut self, uv_translation_y_keys: u32) {
17320 self.fbb_.push_slot::<u32>(PartAnimationData::VT_UV_TRANSLATION_Y_KEYS, uv_translation_y_keys, 4294967295);
17321 }
17322 #[inline]
17323 pub fn add_uv_rotation_z_keys(&mut self, uv_rotation_z_keys: u32) {
17324 self.fbb_.push_slot::<u32>(PartAnimationData::VT_UV_ROTATION_Z_KEYS, uv_rotation_z_keys, 4294967295);
17325 }
17326 #[inline]
17327 pub fn add_uv_scale_x_keys(&mut self, uv_scale_x_keys: u32) {
17328 self.fbb_.push_slot::<u32>(PartAnimationData::VT_UV_SCALE_X_KEYS, uv_scale_x_keys, 4294967295);
17329 }
17330 #[inline]
17331 pub fn add_uv_scale_y_keys(&mut self, uv_scale_y_keys: u32) {
17332 self.fbb_.push_slot::<u32>(PartAnimationData::VT_UV_SCALE_Y_KEYS, uv_scale_y_keys, 4294967295);
17333 }
17334 #[inline]
17335 pub fn add_bounding_radius_keys(&mut self, bounding_radius_keys: u32) {
17336 self.fbb_.push_slot::<u32>(PartAnimationData::VT_BOUNDING_RADIUS_KEYS, bounding_radius_keys, 4294967295);
17337 }
17338 #[inline]
17339 pub fn add_mask_keys(&mut self, mask_keys: u32) {
17340 self.fbb_.push_slot::<u32>(PartAnimationData::VT_MASK_KEYS, mask_keys, 4294967295);
17341 }
17342 #[inline]
17343 pub fn add_skew_keys(&mut self, skew_keys: u32) {
17344 self.fbb_.push_slot::<u32>(PartAnimationData::VT_SKEW_KEYS, skew_keys, 4294967295);
17345 }
17346 #[inline]
17347 pub fn add_deform_keys(&mut self, deform_keys: u32) {
17348 self.fbb_.push_slot::<u32>(PartAnimationData::VT_DEFORM_KEYS, deform_keys, 4294967295);
17349 }
17350 #[inline]
17351 pub fn add_texture_keys(&mut self, texture_keys: u32) {
17352 self.fbb_.push_slot::<u32>(PartAnimationData::VT_TEXTURE_KEYS, texture_keys, 4294967295);
17353 }
17354 #[inline]
17355 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PartAnimationDataBuilder<'a, 'b, A> {
17356 let start = _fbb.start_table();
17357 PartAnimationDataBuilder {
17358 fbb_: _fbb,
17359 start_: start,
17360 }
17361 }
17362 #[inline]
17363 pub fn finish(self) -> ::flatbuffers::WIPOffset<PartAnimationData<'a>> {
17364 let o = self.fbb_.end_table(self.start_);
17365 ::flatbuffers::WIPOffset::new(o.value())
17366 }
17367}
17368
17369impl ::core::fmt::Debug for PartAnimationData<'_> {
17370 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17371 let mut ds = f.debug_struct("PartAnimationData");
17372 ds.field("cell_keys", &self.cell_keys());
17373 ds.field("position_x_keys", &self.position_x_keys());
17374 ds.field("position_y_keys", &self.position_y_keys());
17375 ds.field("position_z_keys", &self.position_z_keys());
17376 ds.field("rotation_x_keys", &self.rotation_x_keys());
17377 ds.field("rotation_y_keys", &self.rotation_y_keys());
17378 ds.field("rotation_z_keys", &self.rotation_z_keys());
17379 ds.field("scale_x_keys", &self.scale_x_keys());
17380 ds.field("scale_y_keys", &self.scale_y_keys());
17381 ds.field("local_scale_x_keys", &self.local_scale_x_keys());
17382 ds.field("local_scale_y_keys", &self.local_scale_y_keys());
17383 ds.field("alpha_keys", &self.alpha_keys());
17384 ds.field("local_alpha_keys", &self.local_alpha_keys());
17385 ds.field("priority_keys", &self.priority_keys());
17386 ds.field("flip_h_keys", &self.flip_h_keys());
17387 ds.field("flip_v_keys", &self.flip_v_keys());
17388 ds.field("hide_keys", &self.hide_keys());
17389 ds.field("part_color_keys", &self.part_color_keys());
17390 ds.field("shader_keys", &self.shader_keys());
17391 ds.field("vertex_keys", &self.vertex_keys());
17392 ds.field("pivot_x_keys", &self.pivot_x_keys());
17393 ds.field("pivot_y_keys", &self.pivot_y_keys());
17394 ds.field("anchor_x_keys", &self.anchor_x_keys());
17395 ds.field("anchor_y_keys", &self.anchor_y_keys());
17396 ds.field("size_x_keys", &self.size_x_keys());
17397 ds.field("size_y_keys", &self.size_y_keys());
17398 ds.field("img_flip_h_keys", &self.img_flip_h_keys());
17399 ds.field("img_flip_v_keys", &self.img_flip_v_keys());
17400 ds.field("uv_translation_x_keys", &self.uv_translation_x_keys());
17401 ds.field("uv_translation_y_keys", &self.uv_translation_y_keys());
17402 ds.field("uv_rotation_z_keys", &self.uv_rotation_z_keys());
17403 ds.field("uv_scale_x_keys", &self.uv_scale_x_keys());
17404 ds.field("uv_scale_y_keys", &self.uv_scale_y_keys());
17405 ds.field("bounding_radius_keys", &self.bounding_radius_keys());
17406 ds.field("mask_keys", &self.mask_keys());
17407 ds.field("skew_keys", &self.skew_keys());
17408 ds.field("deform_keys", &self.deform_keys());
17409 ds.field("texture_keys", &self.texture_keys());
17410 ds.finish()
17411 }
17412}
17413#[non_exhaustive]
17414#[derive(Debug, Clone, PartialEq)]
17415pub struct PartAnimationDataT {
17416 pub cell_keys: u32,
17417 pub position_x_keys: u32,
17418 pub position_y_keys: u32,
17419 pub position_z_keys: u32,
17420 pub rotation_x_keys: u32,
17421 pub rotation_y_keys: u32,
17422 pub rotation_z_keys: u32,
17423 pub scale_x_keys: u32,
17424 pub scale_y_keys: u32,
17425 pub local_scale_x_keys: u32,
17426 pub local_scale_y_keys: u32,
17427 pub alpha_keys: u32,
17428 pub local_alpha_keys: u32,
17429 pub priority_keys: u32,
17430 pub flip_h_keys: u32,
17431 pub flip_v_keys: u32,
17432 pub hide_keys: u32,
17433 pub part_color_keys: u32,
17434 pub shader_keys: u32,
17435 pub vertex_keys: u32,
17436 pub pivot_x_keys: u32,
17437 pub pivot_y_keys: u32,
17438 pub anchor_x_keys: u32,
17439 pub anchor_y_keys: u32,
17440 pub size_x_keys: u32,
17441 pub size_y_keys: u32,
17442 pub img_flip_h_keys: u32,
17443 pub img_flip_v_keys: u32,
17444 pub uv_translation_x_keys: u32,
17445 pub uv_translation_y_keys: u32,
17446 pub uv_rotation_z_keys: u32,
17447 pub uv_scale_x_keys: u32,
17448 pub uv_scale_y_keys: u32,
17449 pub bounding_radius_keys: u32,
17450 pub mask_keys: u32,
17451 pub skew_keys: u32,
17452 pub deform_keys: u32,
17453 pub texture_keys: u32,
17454}
17455impl Default for PartAnimationDataT {
17456 fn default() -> Self {
17457 Self {
17458 cell_keys: 4294967295,
17459 position_x_keys: 4294967295,
17460 position_y_keys: 4294967295,
17461 position_z_keys: 4294967295,
17462 rotation_x_keys: 4294967295,
17463 rotation_y_keys: 4294967295,
17464 rotation_z_keys: 4294967295,
17465 scale_x_keys: 4294967295,
17466 scale_y_keys: 4294967295,
17467 local_scale_x_keys: 4294967295,
17468 local_scale_y_keys: 4294967295,
17469 alpha_keys: 4294967295,
17470 local_alpha_keys: 4294967295,
17471 priority_keys: 4294967295,
17472 flip_h_keys: 4294967295,
17473 flip_v_keys: 4294967295,
17474 hide_keys: 4294967295,
17475 part_color_keys: 4294967295,
17476 shader_keys: 4294967295,
17477 vertex_keys: 4294967295,
17478 pivot_x_keys: 4294967295,
17479 pivot_y_keys: 4294967295,
17480 anchor_x_keys: 4294967295,
17481 anchor_y_keys: 4294967295,
17482 size_x_keys: 4294967295,
17483 size_y_keys: 4294967295,
17484 img_flip_h_keys: 4294967295,
17485 img_flip_v_keys: 4294967295,
17486 uv_translation_x_keys: 4294967295,
17487 uv_translation_y_keys: 4294967295,
17488 uv_rotation_z_keys: 4294967295,
17489 uv_scale_x_keys: 4294967295,
17490 uv_scale_y_keys: 4294967295,
17491 bounding_radius_keys: 4294967295,
17492 mask_keys: 4294967295,
17493 skew_keys: 4294967295,
17494 deform_keys: 4294967295,
17495 texture_keys: 4294967295,
17496 }
17497 }
17498}
17499impl PartAnimationDataT {
17500 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
17501 &self,
17502 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
17503 ) -> ::flatbuffers::WIPOffset<PartAnimationData<'b>> {
17504 let cell_keys = self.cell_keys;
17505 let position_x_keys = self.position_x_keys;
17506 let position_y_keys = self.position_y_keys;
17507 let position_z_keys = self.position_z_keys;
17508 let rotation_x_keys = self.rotation_x_keys;
17509 let rotation_y_keys = self.rotation_y_keys;
17510 let rotation_z_keys = self.rotation_z_keys;
17511 let scale_x_keys = self.scale_x_keys;
17512 let scale_y_keys = self.scale_y_keys;
17513 let local_scale_x_keys = self.local_scale_x_keys;
17514 let local_scale_y_keys = self.local_scale_y_keys;
17515 let alpha_keys = self.alpha_keys;
17516 let local_alpha_keys = self.local_alpha_keys;
17517 let priority_keys = self.priority_keys;
17518 let flip_h_keys = self.flip_h_keys;
17519 let flip_v_keys = self.flip_v_keys;
17520 let hide_keys = self.hide_keys;
17521 let part_color_keys = self.part_color_keys;
17522 let shader_keys = self.shader_keys;
17523 let vertex_keys = self.vertex_keys;
17524 let pivot_x_keys = self.pivot_x_keys;
17525 let pivot_y_keys = self.pivot_y_keys;
17526 let anchor_x_keys = self.anchor_x_keys;
17527 let anchor_y_keys = self.anchor_y_keys;
17528 let size_x_keys = self.size_x_keys;
17529 let size_y_keys = self.size_y_keys;
17530 let img_flip_h_keys = self.img_flip_h_keys;
17531 let img_flip_v_keys = self.img_flip_v_keys;
17532 let uv_translation_x_keys = self.uv_translation_x_keys;
17533 let uv_translation_y_keys = self.uv_translation_y_keys;
17534 let uv_rotation_z_keys = self.uv_rotation_z_keys;
17535 let uv_scale_x_keys = self.uv_scale_x_keys;
17536 let uv_scale_y_keys = self.uv_scale_y_keys;
17537 let bounding_radius_keys = self.bounding_radius_keys;
17538 let mask_keys = self.mask_keys;
17539 let skew_keys = self.skew_keys;
17540 let deform_keys = self.deform_keys;
17541 let texture_keys = self.texture_keys;
17542 PartAnimationData::create(_fbb, &PartAnimationDataArgs{
17543 cell_keys,
17544 position_x_keys,
17545 position_y_keys,
17546 position_z_keys,
17547 rotation_x_keys,
17548 rotation_y_keys,
17549 rotation_z_keys,
17550 scale_x_keys,
17551 scale_y_keys,
17552 local_scale_x_keys,
17553 local_scale_y_keys,
17554 alpha_keys,
17555 local_alpha_keys,
17556 priority_keys,
17557 flip_h_keys,
17558 flip_v_keys,
17559 hide_keys,
17560 part_color_keys,
17561 shader_keys,
17562 vertex_keys,
17563 pivot_x_keys,
17564 pivot_y_keys,
17565 anchor_x_keys,
17566 anchor_y_keys,
17567 size_x_keys,
17568 size_y_keys,
17569 img_flip_h_keys,
17570 img_flip_v_keys,
17571 uv_translation_x_keys,
17572 uv_translation_y_keys,
17573 uv_rotation_z_keys,
17574 uv_scale_x_keys,
17575 uv_scale_y_keys,
17576 bounding_radius_keys,
17577 mask_keys,
17578 skew_keys,
17579 deform_keys,
17580 texture_keys,
17581 })
17582 }
17583}
17584pub enum KeyframesOffset {}
17585#[derive(Copy, Clone, PartialEq)]
17586
17587pub struct Keyframes<'a> {
17588 pub _tab: ::flatbuffers::Table<'a>,
17589}
17590
17591impl<'a> ::flatbuffers::Follow<'a> for Keyframes<'a> {
17592 type Inner = Keyframes<'a>;
17593 #[inline]
17594 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
17595 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
17596 }
17597}
17598
17599impl<'a> Keyframes<'a> {
17600 pub const VT_RUNS: ::flatbuffers::VOffsetT = 4;
17601 pub const VT_FRAME: ::flatbuffers::VOffsetT = 6;
17602 pub const VT_INTERPOLATION: ::flatbuffers::VOffsetT = 8;
17603 pub const VT_CURVE: ::flatbuffers::VOffsetT = 10;
17604 pub const VT_VALUE: ::flatbuffers::VOffsetT = 12;
17605 pub const VT_CURVES: ::flatbuffers::VOffsetT = 14;
17606 pub const VT_EASING_RATES: ::flatbuffers::VOffsetT = 16;
17607 pub const VT_CELLS: ::flatbuffers::VOffsetT = 18;
17608 pub const VT_PART_COLORS: ::flatbuffers::VOffsetT = 20;
17609 pub const VT_SHADERS: ::flatbuffers::VOffsetT = 22;
17610 pub const VT_VERTICES: ::flatbuffers::VOffsetT = 24;
17611 pub const VT_SKEWS: ::flatbuffers::VOffsetT = 26;
17612 pub const VT_DEFORMS: ::flatbuffers::VOffsetT = 28;
17613
17614 #[inline]
17615 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
17616 Keyframes { _tab: table }
17617 }
17618 #[allow(unused_mut)]
17619 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
17620 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
17621 args: &'args KeyframesArgs<'args>
17622 ) -> ::flatbuffers::WIPOffset<Keyframes<'bldr>> {
17623 let mut builder = KeyframesBuilder::new(_fbb);
17624 if let Some(x) = args.deforms { builder.add_deforms(x); }
17625 if let Some(x) = args.skews { builder.add_skews(x); }
17626 if let Some(x) = args.vertices { builder.add_vertices(x); }
17627 if let Some(x) = args.shaders { builder.add_shaders(x); }
17628 if let Some(x) = args.part_colors { builder.add_part_colors(x); }
17629 if let Some(x) = args.cells { builder.add_cells(x); }
17630 if let Some(x) = args.easing_rates { builder.add_easing_rates(x); }
17631 if let Some(x) = args.curves { builder.add_curves(x); }
17632 if let Some(x) = args.value { builder.add_value(x); }
17633 if let Some(x) = args.curve { builder.add_curve(x); }
17634 if let Some(x) = args.interpolation { builder.add_interpolation(x); }
17635 if let Some(x) = args.frame { builder.add_frame(x); }
17636 if let Some(x) = args.runs { builder.add_runs(x); }
17637 builder.finish()
17638 }
17639
17640 pub fn unpack(&self) -> KeyframesT {
17641 let runs = {
17642 let x = self.runs();
17643 x.into_iter().collect()
17644 };
17645 let frame = {
17646 let x = self.frame();
17647 x.into_iter().collect()
17648 };
17649 let interpolation = {
17650 let x = self.interpolation();
17651 x.into_iter().collect()
17652 };
17653 let curve = {
17654 let x = self.curve();
17655 x.into_iter().collect()
17656 };
17657 let value = {
17658 let x = self.value();
17659 x.into_iter().collect()
17660 };
17661 let curves = {
17662 let x = self.curves();
17663 x.iter().map(|t| t.unpack()).collect()
17664 };
17665 let easing_rates = {
17666 let x = self.easing_rates();
17667 x.into_iter().collect()
17668 };
17669 let cells = {
17670 let x = self.cells();
17671 x.iter().map(|t| t.unpack()).collect()
17672 };
17673 let part_colors = {
17674 let x = self.part_colors();
17675 x.iter().map(|t| t.unpack()).collect()
17676 };
17677 let shaders = {
17678 let x = self.shaders();
17679 x.iter().map(|t| t.unpack()).collect()
17680 };
17681 let vertices = {
17682 let x = self.vertices();
17683 x.iter().map(|t| t.unpack()).collect()
17684 };
17685 let skews = {
17686 let x = self.skews();
17687 x.iter().map(|t| t.unpack()).collect()
17688 };
17689 let deforms = {
17690 let x = self.deforms();
17691 x.iter().map(|t| t.unpack()).collect()
17692 };
17693 KeyframesT {
17694 runs,
17695 frame,
17696 interpolation,
17697 curve,
17698 value,
17699 curves,
17700 easing_rates,
17701 cells,
17702 part_colors,
17703 shaders,
17704 vertices,
17705 skews,
17706 deforms,
17707 }
17708 }
17709
17710 #[inline]
17711 pub fn runs(&self) -> ::flatbuffers::Vector<'a, u32> {
17712 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u32>>>(Keyframes::VT_RUNS, None).unwrap()}
17716 }
17717 #[inline]
17718 pub fn frame(&self) -> ::flatbuffers::Vector<'a, u16> {
17719 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u16>>>(Keyframes::VT_FRAME, None).unwrap()}
17723 }
17724 #[inline]
17725 pub fn interpolation(&self) -> ::flatbuffers::Vector<'a, InterpolationType> {
17726 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, InterpolationType>>>(Keyframes::VT_INTERPOLATION, None).unwrap()}
17730 }
17731 #[inline]
17732 pub fn curve(&self) -> ::flatbuffers::Vector<'a, u16> {
17733 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u16>>>(Keyframes::VT_CURVE, None).unwrap()}
17737 }
17738 #[inline]
17739 pub fn value(&self) -> ::flatbuffers::Vector<'a, u32> {
17740 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u32>>>(Keyframes::VT_VALUE, None).unwrap()}
17744 }
17745 #[inline]
17746 pub fn curves(&self) -> ::flatbuffers::Vector<'a, KeyCurve> {
17747 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, KeyCurve>>>(Keyframes::VT_CURVES, None).unwrap()}
17751 }
17752 #[inline]
17753 pub fn easing_rates(&self) -> ::flatbuffers::Vector<'a, f32> {
17754 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, f32>>>(Keyframes::VT_EASING_RATES, None).unwrap()}
17758 }
17759 #[inline]
17760 pub fn cells(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAttributeCell<'a>>> {
17761 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAttributeCell>>>>(Keyframes::VT_CELLS, None).unwrap()}
17765 }
17766 #[inline]
17767 pub fn part_colors(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAttributePartColor<'a>>> {
17768 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAttributePartColor>>>>(Keyframes::VT_PART_COLORS, None).unwrap()}
17772 }
17773 #[inline]
17774 pub fn shaders(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAttributeShader<'a>>> {
17775 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAttributeShader>>>>(Keyframes::VT_SHADERS, None).unwrap()}
17779 }
17780 #[inline]
17781 pub fn vertices(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAttributeVertex<'a>>> {
17782 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAttributeVertex>>>>(Keyframes::VT_VERTICES, None).unwrap()}
17786 }
17787 #[inline]
17788 pub fn skews(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Vec2<'a>>> {
17789 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Vec2>>>>(Keyframes::VT_SKEWS, None).unwrap()}
17793 }
17794 #[inline]
17795 pub fn deforms(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAttributeDeform<'a>>> {
17796 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAttributeDeform>>>>(Keyframes::VT_DEFORMS, None).unwrap()}
17800 }
17801}
17802
17803impl ::flatbuffers::Verifiable for Keyframes<'_> {
17804 #[inline]
17805 fn run_verifier(
17806 v: &mut ::flatbuffers::Verifier, pos: usize
17807 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
17808 v.visit_table(pos)?
17809 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u32>>>("runs", Self::VT_RUNS, true)?
17810 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u16>>>("frame", Self::VT_FRAME, true)?
17811 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, InterpolationType>>>("interpolation", Self::VT_INTERPOLATION, true)?
17812 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u16>>>("curve", Self::VT_CURVE, true)?
17813 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u32>>>("value", Self::VT_VALUE, true)?
17814 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, KeyCurve>>>("curves", Self::VT_CURVES, true)?
17815 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, f32>>>("easing_rates", Self::VT_EASING_RATES, true)?
17816 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<PartAttributeCell>>>>("cells", Self::VT_CELLS, true)?
17817 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<PartAttributePartColor>>>>("part_colors", Self::VT_PART_COLORS, true)?
17818 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<PartAttributeShader>>>>("shaders", Self::VT_SHADERS, true)?
17819 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<PartAttributeVertex>>>>("vertices", Self::VT_VERTICES, true)?
17820 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Vec2>>>>("skews", Self::VT_SKEWS, true)?
17821 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<PartAttributeDeform>>>>("deforms", Self::VT_DEFORMS, true)?
17822 .finish();
17823 Ok(())
17824 }
17825}
17826pub struct KeyframesArgs<'a> {
17827 pub runs: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u32>>>,
17828 pub frame: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u16>>>,
17829 pub interpolation: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, InterpolationType>>>,
17830 pub curve: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u16>>>,
17831 pub value: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u32>>>,
17832 pub curves: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, KeyCurve>>>,
17833 pub easing_rates: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, f32>>>,
17834 pub cells: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAttributeCell<'a>>>>>,
17835 pub part_colors: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAttributePartColor<'a>>>>>,
17836 pub shaders: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAttributeShader<'a>>>>>,
17837 pub vertices: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAttributeVertex<'a>>>>>,
17838 pub skews: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Vec2<'a>>>>>,
17839 pub deforms: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAttributeDeform<'a>>>>>,
17840}
17841impl<'a> Default for KeyframesArgs<'a> {
17842 #[inline]
17843 fn default() -> Self {
17844 KeyframesArgs {
17845 runs: None, frame: None, interpolation: None, curve: None, value: None, curves: None, easing_rates: None, cells: None, part_colors: None, shaders: None, vertices: None, skews: None, deforms: None, }
17859 }
17860}
17861
17862pub struct KeyframesBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
17863 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
17864 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
17865}
17866impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> KeyframesBuilder<'a, 'b, A> {
17867 #[inline]
17868 pub fn add_runs(&mut self, runs: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , u32>>) {
17869 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Keyframes::VT_RUNS, runs);
17870 }
17871 #[inline]
17872 pub fn add_frame(&mut self, frame: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , u16>>) {
17873 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Keyframes::VT_FRAME, frame);
17874 }
17875 #[inline]
17876 pub fn add_interpolation(&mut self, interpolation: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , InterpolationType>>) {
17877 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Keyframes::VT_INTERPOLATION, interpolation);
17878 }
17879 #[inline]
17880 pub fn add_curve(&mut self, curve: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , u16>>) {
17881 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Keyframes::VT_CURVE, curve);
17882 }
17883 #[inline]
17884 pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , u32>>) {
17885 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Keyframes::VT_VALUE, value);
17886 }
17887 #[inline]
17888 pub fn add_curves(&mut self, curves: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , KeyCurve>>) {
17889 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Keyframes::VT_CURVES, curves);
17890 }
17891 #[inline]
17892 pub fn add_easing_rates(&mut self, easing_rates: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , f32>>) {
17893 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Keyframes::VT_EASING_RATES, easing_rates);
17894 }
17895 #[inline]
17896 pub fn add_cells(&mut self, cells: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<PartAttributeCell<'b >>>>) {
17897 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Keyframes::VT_CELLS, cells);
17898 }
17899 #[inline]
17900 pub fn add_part_colors(&mut self, part_colors: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<PartAttributePartColor<'b >>>>) {
17901 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Keyframes::VT_PART_COLORS, part_colors);
17902 }
17903 #[inline]
17904 pub fn add_shaders(&mut self, shaders: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<PartAttributeShader<'b >>>>) {
17905 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Keyframes::VT_SHADERS, shaders);
17906 }
17907 #[inline]
17908 pub fn add_vertices(&mut self, vertices: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<PartAttributeVertex<'b >>>>) {
17909 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Keyframes::VT_VERTICES, vertices);
17910 }
17911 #[inline]
17912 pub fn add_skews(&mut self, skews: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Vec2<'b >>>>) {
17913 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Keyframes::VT_SKEWS, skews);
17914 }
17915 #[inline]
17916 pub fn add_deforms(&mut self, deforms: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<PartAttributeDeform<'b >>>>) {
17917 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Keyframes::VT_DEFORMS, deforms);
17918 }
17919 #[inline]
17920 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> KeyframesBuilder<'a, 'b, A> {
17921 let start = _fbb.start_table();
17922 KeyframesBuilder {
17923 fbb_: _fbb,
17924 start_: start,
17925 }
17926 }
17927 #[inline]
17928 pub fn finish(self) -> ::flatbuffers::WIPOffset<Keyframes<'a>> {
17929 let o = self.fbb_.end_table(self.start_);
17930 self.fbb_.required(o, Keyframes::VT_RUNS,"runs");
17931 self.fbb_.required(o, Keyframes::VT_FRAME,"frame");
17932 self.fbb_.required(o, Keyframes::VT_INTERPOLATION,"interpolation");
17933 self.fbb_.required(o, Keyframes::VT_CURVE,"curve");
17934 self.fbb_.required(o, Keyframes::VT_VALUE,"value");
17935 self.fbb_.required(o, Keyframes::VT_CURVES,"curves");
17936 self.fbb_.required(o, Keyframes::VT_EASING_RATES,"easing_rates");
17937 self.fbb_.required(o, Keyframes::VT_CELLS,"cells");
17938 self.fbb_.required(o, Keyframes::VT_PART_COLORS,"part_colors");
17939 self.fbb_.required(o, Keyframes::VT_SHADERS,"shaders");
17940 self.fbb_.required(o, Keyframes::VT_VERTICES,"vertices");
17941 self.fbb_.required(o, Keyframes::VT_SKEWS,"skews");
17942 self.fbb_.required(o, Keyframes::VT_DEFORMS,"deforms");
17943 ::flatbuffers::WIPOffset::new(o.value())
17944 }
17945}
17946
17947impl ::core::fmt::Debug for Keyframes<'_> {
17948 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
17949 let mut ds = f.debug_struct("Keyframes");
17950 ds.field("runs", &self.runs());
17951 ds.field("frame", &self.frame());
17952 ds.field("interpolation", &self.interpolation());
17953 ds.field("curve", &self.curve());
17954 ds.field("value", &self.value());
17955 ds.field("curves", &self.curves());
17956 ds.field("easing_rates", &self.easing_rates());
17957 ds.field("cells", &self.cells());
17958 ds.field("part_colors", &self.part_colors());
17959 ds.field("shaders", &self.shaders());
17960 ds.field("vertices", &self.vertices());
17961 ds.field("skews", &self.skews());
17962 ds.field("deforms", &self.deforms());
17963 ds.finish()
17964 }
17965}
17966#[non_exhaustive]
17967#[derive(Debug, Clone, PartialEq)]
17968pub struct KeyframesT {
17969 pub runs: alloc::vec::Vec<u32>,
17970 pub frame: alloc::vec::Vec<u16>,
17971 pub interpolation: alloc::vec::Vec<InterpolationType>,
17972 pub curve: alloc::vec::Vec<u16>,
17973 pub value: alloc::vec::Vec<u32>,
17974 pub curves: alloc::vec::Vec<KeyCurveT>,
17975 pub easing_rates: alloc::vec::Vec<f32>,
17976 pub cells: alloc::vec::Vec<PartAttributeCellT>,
17977 pub part_colors: alloc::vec::Vec<PartAttributePartColorT>,
17978 pub shaders: alloc::vec::Vec<PartAttributeShaderT>,
17979 pub vertices: alloc::vec::Vec<PartAttributeVertexT>,
17980 pub skews: alloc::vec::Vec<Vec2T>,
17981 pub deforms: alloc::vec::Vec<PartAttributeDeformT>,
17982}
17983impl Default for KeyframesT {
17984 fn default() -> Self {
17985 Self {
17986 runs: Default::default(),
17987 frame: Default::default(),
17988 interpolation: Default::default(),
17989 curve: Default::default(),
17990 value: Default::default(),
17991 curves: Default::default(),
17992 easing_rates: Default::default(),
17993 cells: Default::default(),
17994 part_colors: Default::default(),
17995 shaders: Default::default(),
17996 vertices: Default::default(),
17997 skews: Default::default(),
17998 deforms: Default::default(),
17999 }
18000 }
18001}
18002impl KeyframesT {
18003 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
18004 &self,
18005 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
18006 ) -> ::flatbuffers::WIPOffset<Keyframes<'b>> {
18007 let runs = Some({
18008 let x = &self.runs;
18009 _fbb.create_vector(x)
18010 });
18011 let frame = Some({
18012 let x = &self.frame;
18013 _fbb.create_vector(x)
18014 });
18015 let interpolation = Some({
18016 let x = &self.interpolation;
18017 _fbb.create_vector(x)
18018 });
18019 let curve = Some({
18020 let x = &self.curve;
18021 _fbb.create_vector(x)
18022 });
18023 let value = Some({
18024 let x = &self.value;
18025 _fbb.create_vector(x)
18026 });
18027 let curves = Some({
18028 let x = &self.curves;
18029 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack()).collect();_fbb.create_vector(&w)
18030 });
18031 let easing_rates = Some({
18032 let x = &self.easing_rates;
18033 _fbb.create_vector(x)
18034 });
18035 let cells = Some({
18036 let x = &self.cells;
18037 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
18038 });
18039 let part_colors = Some({
18040 let x = &self.part_colors;
18041 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
18042 });
18043 let shaders = Some({
18044 let x = &self.shaders;
18045 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
18046 });
18047 let vertices = Some({
18048 let x = &self.vertices;
18049 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
18050 });
18051 let skews = Some({
18052 let x = &self.skews;
18053 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
18054 });
18055 let deforms = Some({
18056 let x = &self.deforms;
18057 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
18058 });
18059 Keyframes::create(_fbb, &KeyframesArgs{
18060 runs,
18061 frame,
18062 interpolation,
18063 curve,
18064 value,
18065 curves,
18066 easing_rates,
18067 cells,
18068 part_colors,
18069 shaders,
18070 vertices,
18071 skews,
18072 deforms,
18073 })
18074 }
18075}
18076pub enum AnimationDataOffset {}
18077#[derive(Copy, Clone, PartialEq)]
18078
18079pub struct AnimationData<'a> {
18080 pub _tab: ::flatbuffers::Table<'a>,
18081}
18082
18083impl<'a> ::flatbuffers::Follow<'a> for AnimationData<'a> {
18084 type Inner = AnimationData<'a>;
18085 #[inline]
18086 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
18087 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
18088 }
18089}
18090
18091impl<'a> AnimationData<'a> {
18092 pub const VT_NAME: ::flatbuffers::VOffsetT = 4;
18093 pub const VT_NAME_HASH: ::flatbuffers::VOffsetT = 6;
18094 pub const VT_PARTS_INITIAL_ATTRIBUTES: ::flatbuffers::VOffsetT = 8;
18095 pub const VT_PARTS_ANIMATION_DATA: ::flatbuffers::VOffsetT = 10;
18096 pub const VT_EVENTS: ::flatbuffers::VOffsetT = 12;
18097 pub const VT_INITIAL_EVENTS: ::flatbuffers::VOffsetT = 14;
18098 pub const VT_LABELS: ::flatbuffers::VOffsetT = 16;
18099 pub const VT_START_FRAME: ::flatbuffers::VOffsetT = 18;
18100 pub const VT_END_FRAME: ::flatbuffers::VOffsetT = 20;
18101 pub const VT_TOTAL_FRAME: ::flatbuffers::VOffsetT = 22;
18102 pub const VT_FPS: ::flatbuffers::VOffsetT = 24;
18103 pub const VT_CANVAS_SIZE: ::flatbuffers::VOffsetT = 26;
18104 pub const VT_PIVOT: ::flatbuffers::VOffsetT = 28;
18105
18106 #[inline]
18107 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
18108 AnimationData { _tab: table }
18109 }
18110 #[allow(unused_mut)]
18111 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
18112 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
18113 args: &'args AnimationDataArgs<'args>
18114 ) -> ::flatbuffers::WIPOffset<AnimationData<'bldr>> {
18115 let mut builder = AnimationDataBuilder::new(_fbb);
18116 if let Some(x) = args.pivot { builder.add_pivot(x); }
18117 if let Some(x) = args.canvas_size { builder.add_canvas_size(x); }
18118 if let Some(x) = args.labels { builder.add_labels(x); }
18119 if let Some(x) = args.initial_events { builder.add_initial_events(x); }
18120 if let Some(x) = args.events { builder.add_events(x); }
18121 if let Some(x) = args.parts_animation_data { builder.add_parts_animation_data(x); }
18122 if let Some(x) = args.parts_initial_attributes { builder.add_parts_initial_attributes(x); }
18123 builder.add_name_hash(args.name_hash);
18124 if let Some(x) = args.name { builder.add_name(x); }
18125 builder.add_fps(args.fps);
18126 builder.add_total_frame(args.total_frame);
18127 builder.add_end_frame(args.end_frame);
18128 builder.add_start_frame(args.start_frame);
18129 builder.finish()
18130 }
18131
18132 pub fn unpack(&self) -> AnimationDataT {
18133 let name = {
18134 let x = self.name();
18135 alloc::string::ToString::to_string(x)
18136 };
18137 let name_hash = self.name_hash();
18138 let parts_initial_attributes = {
18139 let x = self.parts_initial_attributes();
18140 x.iter().map(|t| t.unpack()).collect()
18141 };
18142 let parts_animation_data = {
18143 let x = self.parts_animation_data();
18144 x.iter().map(|t| t.unpack()).collect()
18145 };
18146 let events = self.events().map(|x| {
18147 x.iter().map(|t| t.unpack()).collect()
18148 });
18149 let initial_events = self.initial_events().map(|x| {
18150 x.iter().map(|t| t.unpack()).collect()
18151 });
18152 let labels = self.labels().map(|x| {
18153 x.iter().map(|t| t.unpack()).collect()
18154 });
18155 let start_frame = self.start_frame();
18156 let end_frame = self.end_frame();
18157 let total_frame = self.total_frame();
18158 let fps = self.fps();
18159 let canvas_size = {
18160 let x = self.canvas_size();
18161 alloc::boxed::Box::new(x.unpack())
18162 };
18163 let pivot = {
18164 let x = self.pivot();
18165 alloc::boxed::Box::new(x.unpack())
18166 };
18167 AnimationDataT {
18168 name,
18169 name_hash,
18170 parts_initial_attributes,
18171 parts_animation_data,
18172 events,
18173 initial_events,
18174 labels,
18175 start_frame,
18176 end_frame,
18177 total_frame,
18178 fps,
18179 canvas_size,
18180 pivot,
18181 }
18182 }
18183
18184 #[inline]
18185 pub fn name(&self) -> &'a str {
18186 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(AnimationData::VT_NAME, None).unwrap()}
18190 }
18191 #[inline]
18192 pub fn name_hash(&self) -> u32 {
18193 unsafe { self._tab.get::<u32>(AnimationData::VT_NAME_HASH, Some(0)).unwrap()}
18197 }
18198 #[inline]
18199 pub fn parts_initial_attributes(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<InitialPartAttributes<'a>>> {
18200 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<InitialPartAttributes>>>>(AnimationData::VT_PARTS_INITIAL_ATTRIBUTES, None).unwrap()}
18204 }
18205 #[inline]
18206 pub fn parts_animation_data(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAnimationData<'a>>> {
18207 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAnimationData>>>>(AnimationData::VT_PARTS_ANIMATION_DATA, None).unwrap()}
18211 }
18212 #[inline]
18213 pub fn events(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventsPerFrame<'a>>>> {
18214 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventsPerFrame>>>>(AnimationData::VT_EVENTS, None)}
18218 }
18219 #[inline]
18220 pub fn initial_events(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<InitialEvents<'a>>>> {
18221 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<InitialEvents>>>>(AnimationData::VT_INITIAL_EVENTS, None)}
18225 }
18226 #[inline]
18227 pub fn labels(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Label<'a>>>> {
18228 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Label>>>>(AnimationData::VT_LABELS, None)}
18232 }
18233 #[inline]
18234 pub fn start_frame(&self) -> i16 {
18235 unsafe { self._tab.get::<i16>(AnimationData::VT_START_FRAME, Some(0)).unwrap()}
18239 }
18240 #[inline]
18241 pub fn end_frame(&self) -> i16 {
18242 unsafe { self._tab.get::<i16>(AnimationData::VT_END_FRAME, Some(0)).unwrap()}
18246 }
18247 #[inline]
18248 pub fn total_frame(&self) -> i16 {
18249 unsafe { self._tab.get::<i16>(AnimationData::VT_TOTAL_FRAME, Some(0)).unwrap()}
18253 }
18254 #[inline]
18255 pub fn fps(&self) -> i16 {
18256 unsafe { self._tab.get::<i16>(AnimationData::VT_FPS, Some(0)).unwrap()}
18260 }
18261 #[inline]
18262 pub fn canvas_size(&self) -> Vec2<'a> {
18263 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(AnimationData::VT_CANVAS_SIZE, None).unwrap()}
18267 }
18268 #[inline]
18269 pub fn pivot(&self) -> Vec2<'a> {
18270 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Vec2>>(AnimationData::VT_PIVOT, None).unwrap()}
18274 }
18275}
18276
18277impl ::flatbuffers::Verifiable for AnimationData<'_> {
18278 #[inline]
18279 fn run_verifier(
18280 v: &mut ::flatbuffers::Verifier, pos: usize
18281 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
18282 v.visit_table(pos)?
18283 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
18284 .visit_field::<u32>("name_hash", Self::VT_NAME_HASH, false)?
18285 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<InitialPartAttributes>>>>("parts_initial_attributes", Self::VT_PARTS_INITIAL_ATTRIBUTES, true)?
18286 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<PartAnimationData>>>>("parts_animation_data", Self::VT_PARTS_ANIMATION_DATA, true)?
18287 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<EventsPerFrame>>>>("events", Self::VT_EVENTS, false)?
18288 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<InitialEvents>>>>("initial_events", Self::VT_INITIAL_EVENTS, false)?
18289 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Label>>>>("labels", Self::VT_LABELS, false)?
18290 .visit_field::<i16>("start_frame", Self::VT_START_FRAME, false)?
18291 .visit_field::<i16>("end_frame", Self::VT_END_FRAME, false)?
18292 .visit_field::<i16>("total_frame", Self::VT_TOTAL_FRAME, false)?
18293 .visit_field::<i16>("fps", Self::VT_FPS, false)?
18294 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("canvas_size", Self::VT_CANVAS_SIZE, true)?
18295 .visit_field::<::flatbuffers::ForwardsUOffset<Vec2>>("pivot", Self::VT_PIVOT, true)?
18296 .finish();
18297 Ok(())
18298 }
18299}
18300pub struct AnimationDataArgs<'a> {
18301 pub name: Option<::flatbuffers::WIPOffset<&'a str>>,
18302 pub name_hash: u32,
18303 pub parts_initial_attributes: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<InitialPartAttributes<'a>>>>>,
18304 pub parts_animation_data: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartAnimationData<'a>>>>>,
18305 pub events: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EventsPerFrame<'a>>>>>,
18306 pub initial_events: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<InitialEvents<'a>>>>>,
18307 pub labels: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Label<'a>>>>>,
18308 pub start_frame: i16,
18309 pub end_frame: i16,
18310 pub total_frame: i16,
18311 pub fps: i16,
18312 pub canvas_size: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
18313 pub pivot: Option<::flatbuffers::WIPOffset<Vec2<'a>>>,
18314}
18315impl<'a> Default for AnimationDataArgs<'a> {
18316 #[inline]
18317 fn default() -> Self {
18318 AnimationDataArgs {
18319 name: None, name_hash: 0,
18321 parts_initial_attributes: None, parts_animation_data: None, events: None,
18324 initial_events: None,
18325 labels: None,
18326 start_frame: 0,
18327 end_frame: 0,
18328 total_frame: 0,
18329 fps: 0,
18330 canvas_size: None, pivot: None, }
18333 }
18334}
18335
18336pub struct AnimationDataBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
18337 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
18338 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
18339}
18340impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> AnimationDataBuilder<'a, 'b, A> {
18341 #[inline]
18342 pub fn add_name(&mut self, name: ::flatbuffers::WIPOffset<&'b str>) {
18343 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(AnimationData::VT_NAME, name);
18344 }
18345 #[inline]
18346 pub fn add_name_hash(&mut self, name_hash: u32) {
18347 self.fbb_.push_slot::<u32>(AnimationData::VT_NAME_HASH, name_hash, 0);
18348 }
18349 #[inline]
18350 pub fn add_parts_initial_attributes(&mut self, parts_initial_attributes: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<InitialPartAttributes<'b >>>>) {
18351 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(AnimationData::VT_PARTS_INITIAL_ATTRIBUTES, parts_initial_attributes);
18352 }
18353 #[inline]
18354 pub fn add_parts_animation_data(&mut self, parts_animation_data: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<PartAnimationData<'b >>>>) {
18355 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(AnimationData::VT_PARTS_ANIMATION_DATA, parts_animation_data);
18356 }
18357 #[inline]
18358 pub fn add_events(&mut self, events: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<EventsPerFrame<'b >>>>) {
18359 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(AnimationData::VT_EVENTS, events);
18360 }
18361 #[inline]
18362 pub fn add_initial_events(&mut self, initial_events: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<InitialEvents<'b >>>>) {
18363 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(AnimationData::VT_INITIAL_EVENTS, initial_events);
18364 }
18365 #[inline]
18366 pub fn add_labels(&mut self, labels: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Label<'b >>>>) {
18367 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(AnimationData::VT_LABELS, labels);
18368 }
18369 #[inline]
18370 pub fn add_start_frame(&mut self, start_frame: i16) {
18371 self.fbb_.push_slot::<i16>(AnimationData::VT_START_FRAME, start_frame, 0);
18372 }
18373 #[inline]
18374 pub fn add_end_frame(&mut self, end_frame: i16) {
18375 self.fbb_.push_slot::<i16>(AnimationData::VT_END_FRAME, end_frame, 0);
18376 }
18377 #[inline]
18378 pub fn add_total_frame(&mut self, total_frame: i16) {
18379 self.fbb_.push_slot::<i16>(AnimationData::VT_TOTAL_FRAME, total_frame, 0);
18380 }
18381 #[inline]
18382 pub fn add_fps(&mut self, fps: i16) {
18383 self.fbb_.push_slot::<i16>(AnimationData::VT_FPS, fps, 0);
18384 }
18385 #[inline]
18386 pub fn add_canvas_size(&mut self, canvas_size: ::flatbuffers::WIPOffset<Vec2<'b >>) {
18387 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(AnimationData::VT_CANVAS_SIZE, canvas_size);
18388 }
18389 #[inline]
18390 pub fn add_pivot(&mut self, pivot: ::flatbuffers::WIPOffset<Vec2<'b >>) {
18391 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Vec2>>(AnimationData::VT_PIVOT, pivot);
18392 }
18393 #[inline]
18394 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> AnimationDataBuilder<'a, 'b, A> {
18395 let start = _fbb.start_table();
18396 AnimationDataBuilder {
18397 fbb_: _fbb,
18398 start_: start,
18399 }
18400 }
18401 #[inline]
18402 pub fn finish(self) -> ::flatbuffers::WIPOffset<AnimationData<'a>> {
18403 let o = self.fbb_.end_table(self.start_);
18404 self.fbb_.required(o, AnimationData::VT_NAME,"name");
18405 self.fbb_.required(o, AnimationData::VT_PARTS_INITIAL_ATTRIBUTES,"parts_initial_attributes");
18406 self.fbb_.required(o, AnimationData::VT_PARTS_ANIMATION_DATA,"parts_animation_data");
18407 self.fbb_.required(o, AnimationData::VT_CANVAS_SIZE,"canvas_size");
18408 self.fbb_.required(o, AnimationData::VT_PIVOT,"pivot");
18409 ::flatbuffers::WIPOffset::new(o.value())
18410 }
18411}
18412
18413impl ::core::fmt::Debug for AnimationData<'_> {
18414 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
18415 let mut ds = f.debug_struct("AnimationData");
18416 ds.field("name", &self.name());
18417 ds.field("name_hash", &self.name_hash());
18418 ds.field("parts_initial_attributes", &self.parts_initial_attributes());
18419 ds.field("parts_animation_data", &self.parts_animation_data());
18420 ds.field("events", &self.events());
18421 ds.field("initial_events", &self.initial_events());
18422 ds.field("labels", &self.labels());
18423 ds.field("start_frame", &self.start_frame());
18424 ds.field("end_frame", &self.end_frame());
18425 ds.field("total_frame", &self.total_frame());
18426 ds.field("fps", &self.fps());
18427 ds.field("canvas_size", &self.canvas_size());
18428 ds.field("pivot", &self.pivot());
18429 ds.finish()
18430 }
18431}
18432#[non_exhaustive]
18433#[derive(Debug, Clone, PartialEq)]
18434pub struct AnimationDataT {
18435 pub name: alloc::string::String,
18436 pub name_hash: u32,
18437 pub parts_initial_attributes: alloc::vec::Vec<InitialPartAttributesT>,
18438 pub parts_animation_data: alloc::vec::Vec<PartAnimationDataT>,
18439 pub events: Option<alloc::vec::Vec<EventsPerFrameT>>,
18440 pub initial_events: Option<alloc::vec::Vec<InitialEventsT>>,
18441 pub labels: Option<alloc::vec::Vec<LabelT>>,
18442 pub start_frame: i16,
18443 pub end_frame: i16,
18444 pub total_frame: i16,
18445 pub fps: i16,
18446 pub canvas_size: alloc::boxed::Box<Vec2T>,
18447 pub pivot: alloc::boxed::Box<Vec2T>,
18448}
18449impl Default for AnimationDataT {
18450 fn default() -> Self {
18451 Self {
18452 name: alloc::string::ToString::to_string(""),
18453 name_hash: 0,
18454 parts_initial_attributes: Default::default(),
18455 parts_animation_data: Default::default(),
18456 events: None,
18457 initial_events: None,
18458 labels: None,
18459 start_frame: 0,
18460 end_frame: 0,
18461 total_frame: 0,
18462 fps: 0,
18463 canvas_size: Default::default(),
18464 pivot: Default::default(),
18465 }
18466 }
18467}
18468impl AnimationDataT {
18469 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
18470 &self,
18471 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
18472 ) -> ::flatbuffers::WIPOffset<AnimationData<'b>> {
18473 let name = Some({
18474 let x = &self.name;
18475 _fbb.create_string(x)
18476 });
18477 let name_hash = self.name_hash;
18478 let parts_initial_attributes = Some({
18479 let x = &self.parts_initial_attributes;
18480 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
18481 });
18482 let parts_animation_data = Some({
18483 let x = &self.parts_animation_data;
18484 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
18485 });
18486 let events = self.events.as_ref().map(|x|{
18487 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
18488 });
18489 let initial_events = self.initial_events.as_ref().map(|x|{
18490 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
18491 });
18492 let labels = self.labels.as_ref().map(|x|{
18493 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
18494 });
18495 let start_frame = self.start_frame;
18496 let end_frame = self.end_frame;
18497 let total_frame = self.total_frame;
18498 let fps = self.fps;
18499 let canvas_size = Some({
18500 let x = &self.canvas_size;
18501 x.pack(_fbb)
18502 });
18503 let pivot = Some({
18504 let x = &self.pivot;
18505 x.pack(_fbb)
18506 });
18507 AnimationData::create(_fbb, &AnimationDataArgs{
18508 name,
18509 name_hash,
18510 parts_initial_attributes,
18511 parts_animation_data,
18512 events,
18513 initial_events,
18514 labels,
18515 start_frame,
18516 end_frame,
18517 total_frame,
18518 fps,
18519 canvas_size,
18520 pivot,
18521 })
18522 }
18523}
18524pub enum ExternalTextureOffset {}
18525#[derive(Copy, Clone, PartialEq)]
18526
18527pub struct ExternalTexture<'a> {
18528 pub _tab: ::flatbuffers::Table<'a>,
18529}
18530
18531impl<'a> ::flatbuffers::Follow<'a> for ExternalTexture<'a> {
18532 type Inner = ExternalTexture<'a>;
18533 #[inline]
18534 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
18535 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
18536 }
18537}
18538
18539impl<'a> ExternalTexture<'a> {
18540 pub const VT_NAME_HASH: ::flatbuffers::VOffsetT = 4;
18541 pub const VT_NAME: ::flatbuffers::VOffsetT = 6;
18542
18543 #[inline]
18544 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
18545 ExternalTexture { _tab: table }
18546 }
18547 #[allow(unused_mut)]
18548 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
18549 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
18550 args: &'args ExternalTextureArgs<'args>
18551 ) -> ::flatbuffers::WIPOffset<ExternalTexture<'bldr>> {
18552 let mut builder = ExternalTextureBuilder::new(_fbb);
18553 if let Some(x) = args.name { builder.add_name(x); }
18554 builder.add_name_hash(args.name_hash);
18555 builder.finish()
18556 }
18557
18558 pub fn unpack(&self) -> ExternalTextureT {
18559 let name_hash = self.name_hash();
18560 let name = self.name().map(|x| {
18561 alloc::string::ToString::to_string(x)
18562 });
18563 ExternalTextureT {
18564 name_hash,
18565 name,
18566 }
18567 }
18568
18569 #[inline]
18570 pub fn name_hash(&self) -> u32 {
18571 unsafe { self._tab.get::<u32>(ExternalTexture::VT_NAME_HASH, Some(0)).unwrap()}
18575 }
18576 #[inline]
18577 pub fn key_compare_less_than(&self, o: &ExternalTexture) -> bool {
18578 self.name_hash() < o.name_hash()
18579 }
18580
18581 #[inline]
18582 pub fn key_compare_with_value(&self, val: u32) -> ::core::cmp::Ordering {
18583 let key = self.name_hash();
18584 key.cmp(&val)
18585 }
18586 #[inline]
18587 pub fn name(&self) -> Option<&'a str> {
18588 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(ExternalTexture::VT_NAME, None)}
18592 }
18593}
18594
18595impl ::flatbuffers::Verifiable for ExternalTexture<'_> {
18596 #[inline]
18597 fn run_verifier(
18598 v: &mut ::flatbuffers::Verifier, pos: usize
18599 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
18600 v.visit_table(pos)?
18601 .visit_field::<u32>("name_hash", Self::VT_NAME_HASH, false)?
18602 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
18603 .finish();
18604 Ok(())
18605 }
18606}
18607pub struct ExternalTextureArgs<'a> {
18608 pub name_hash: u32,
18609 pub name: Option<::flatbuffers::WIPOffset<&'a str>>,
18610}
18611impl<'a> Default for ExternalTextureArgs<'a> {
18612 #[inline]
18613 fn default() -> Self {
18614 ExternalTextureArgs {
18615 name_hash: 0,
18616 name: None,
18617 }
18618 }
18619}
18620
18621pub struct ExternalTextureBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
18622 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
18623 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
18624}
18625impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> ExternalTextureBuilder<'a, 'b, A> {
18626 #[inline]
18627 pub fn add_name_hash(&mut self, name_hash: u32) {
18628 self.fbb_.push_slot::<u32>(ExternalTexture::VT_NAME_HASH, name_hash, 0);
18629 }
18630 #[inline]
18631 pub fn add_name(&mut self, name: ::flatbuffers::WIPOffset<&'b str>) {
18632 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(ExternalTexture::VT_NAME, name);
18633 }
18634 #[inline]
18635 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> ExternalTextureBuilder<'a, 'b, A> {
18636 let start = _fbb.start_table();
18637 ExternalTextureBuilder {
18638 fbb_: _fbb,
18639 start_: start,
18640 }
18641 }
18642 #[inline]
18643 pub fn finish(self) -> ::flatbuffers::WIPOffset<ExternalTexture<'a>> {
18644 let o = self.fbb_.end_table(self.start_);
18645 ::flatbuffers::WIPOffset::new(o.value())
18646 }
18647}
18648
18649impl ::core::fmt::Debug for ExternalTexture<'_> {
18650 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
18651 let mut ds = f.debug_struct("ExternalTexture");
18652 ds.field("name_hash", &self.name_hash());
18653 ds.field("name", &self.name());
18654 ds.finish()
18655 }
18656}
18657#[non_exhaustive]
18658#[derive(Debug, Clone, PartialEq)]
18659pub struct ExternalTextureT {
18660 pub name_hash: u32,
18661 pub name: Option<alloc::string::String>,
18662}
18663impl Default for ExternalTextureT {
18664 fn default() -> Self {
18665 Self {
18666 name_hash: 0,
18667 name: None,
18668 }
18669 }
18670}
18671impl ExternalTextureT {
18672 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
18673 &self,
18674 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
18675 ) -> ::flatbuffers::WIPOffset<ExternalTexture<'b>> {
18676 let name_hash = self.name_hash;
18677 let name = self.name.as_ref().map(|x|{
18678 _fbb.create_string(x)
18679 });
18680 ExternalTexture::create(_fbb, &ExternalTextureArgs{
18681 name_hash,
18682 name,
18683 })
18684 }
18685}
18686pub enum ExternalInstanceOffset {}
18687#[derive(Copy, Clone, PartialEq)]
18688
18689pub struct ExternalInstance<'a> {
18690 pub _tab: ::flatbuffers::Table<'a>,
18691}
18692
18693impl<'a> ::flatbuffers::Follow<'a> for ExternalInstance<'a> {
18694 type Inner = ExternalInstance<'a>;
18695 #[inline]
18696 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
18697 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
18698 }
18699}
18700
18701impl<'a> ExternalInstance<'a> {
18702 pub const VT_ANIME_PACK_NAME: ::flatbuffers::VOffsetT = 4;
18703 pub const VT_ANIME_PACK_NAME_HASH: ::flatbuffers::VOffsetT = 6;
18704 pub const VT_ANIME_NAME: ::flatbuffers::VOffsetT = 8;
18705 pub const VT_ANIME_NAME_HASH: ::flatbuffers::VOffsetT = 10;
18706
18707 #[inline]
18708 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
18709 ExternalInstance { _tab: table }
18710 }
18711 #[allow(unused_mut)]
18712 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
18713 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
18714 args: &'args ExternalInstanceArgs<'args>
18715 ) -> ::flatbuffers::WIPOffset<ExternalInstance<'bldr>> {
18716 let mut builder = ExternalInstanceBuilder::new(_fbb);
18717 builder.add_anime_name_hash(args.anime_name_hash);
18718 if let Some(x) = args.anime_name { builder.add_anime_name(x); }
18719 builder.add_anime_pack_name_hash(args.anime_pack_name_hash);
18720 if let Some(x) = args.anime_pack_name { builder.add_anime_pack_name(x); }
18721 builder.finish()
18722 }
18723
18724 pub fn unpack(&self) -> ExternalInstanceT {
18725 let anime_pack_name = self.anime_pack_name().map(|x| {
18726 alloc::string::ToString::to_string(x)
18727 });
18728 let anime_pack_name_hash = self.anime_pack_name_hash();
18729 let anime_name = self.anime_name().map(|x| {
18730 alloc::string::ToString::to_string(x)
18731 });
18732 let anime_name_hash = self.anime_name_hash();
18733 ExternalInstanceT {
18734 anime_pack_name,
18735 anime_pack_name_hash,
18736 anime_name,
18737 anime_name_hash,
18738 }
18739 }
18740
18741 #[inline]
18742 pub fn anime_pack_name(&self) -> Option<&'a str> {
18743 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(ExternalInstance::VT_ANIME_PACK_NAME, None)}
18747 }
18748 #[inline]
18749 pub fn anime_pack_name_hash(&self) -> u32 {
18750 unsafe { self._tab.get::<u32>(ExternalInstance::VT_ANIME_PACK_NAME_HASH, Some(0)).unwrap()}
18754 }
18755 #[inline]
18756 pub fn anime_name(&self) -> Option<&'a str> {
18757 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(ExternalInstance::VT_ANIME_NAME, None)}
18761 }
18762 #[inline]
18763 pub fn anime_name_hash(&self) -> u32 {
18764 unsafe { self._tab.get::<u32>(ExternalInstance::VT_ANIME_NAME_HASH, Some(0)).unwrap()}
18768 }
18769}
18770
18771impl ::flatbuffers::Verifiable for ExternalInstance<'_> {
18772 #[inline]
18773 fn run_verifier(
18774 v: &mut ::flatbuffers::Verifier, pos: usize
18775 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
18776 v.visit_table(pos)?
18777 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("anime_pack_name", Self::VT_ANIME_PACK_NAME, false)?
18778 .visit_field::<u32>("anime_pack_name_hash", Self::VT_ANIME_PACK_NAME_HASH, false)?
18779 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("anime_name", Self::VT_ANIME_NAME, false)?
18780 .visit_field::<u32>("anime_name_hash", Self::VT_ANIME_NAME_HASH, false)?
18781 .finish();
18782 Ok(())
18783 }
18784}
18785pub struct ExternalInstanceArgs<'a> {
18786 pub anime_pack_name: Option<::flatbuffers::WIPOffset<&'a str>>,
18787 pub anime_pack_name_hash: u32,
18788 pub anime_name: Option<::flatbuffers::WIPOffset<&'a str>>,
18789 pub anime_name_hash: u32,
18790}
18791impl<'a> Default for ExternalInstanceArgs<'a> {
18792 #[inline]
18793 fn default() -> Self {
18794 ExternalInstanceArgs {
18795 anime_pack_name: None,
18796 anime_pack_name_hash: 0,
18797 anime_name: None,
18798 anime_name_hash: 0,
18799 }
18800 }
18801}
18802
18803pub struct ExternalInstanceBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
18804 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
18805 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
18806}
18807impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> ExternalInstanceBuilder<'a, 'b, A> {
18808 #[inline]
18809 pub fn add_anime_pack_name(&mut self, anime_pack_name: ::flatbuffers::WIPOffset<&'b str>) {
18810 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(ExternalInstance::VT_ANIME_PACK_NAME, anime_pack_name);
18811 }
18812 #[inline]
18813 pub fn add_anime_pack_name_hash(&mut self, anime_pack_name_hash: u32) {
18814 self.fbb_.push_slot::<u32>(ExternalInstance::VT_ANIME_PACK_NAME_HASH, anime_pack_name_hash, 0);
18815 }
18816 #[inline]
18817 pub fn add_anime_name(&mut self, anime_name: ::flatbuffers::WIPOffset<&'b str>) {
18818 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(ExternalInstance::VT_ANIME_NAME, anime_name);
18819 }
18820 #[inline]
18821 pub fn add_anime_name_hash(&mut self, anime_name_hash: u32) {
18822 self.fbb_.push_slot::<u32>(ExternalInstance::VT_ANIME_NAME_HASH, anime_name_hash, 0);
18823 }
18824 #[inline]
18825 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> ExternalInstanceBuilder<'a, 'b, A> {
18826 let start = _fbb.start_table();
18827 ExternalInstanceBuilder {
18828 fbb_: _fbb,
18829 start_: start,
18830 }
18831 }
18832 #[inline]
18833 pub fn finish(self) -> ::flatbuffers::WIPOffset<ExternalInstance<'a>> {
18834 let o = self.fbb_.end_table(self.start_);
18835 ::flatbuffers::WIPOffset::new(o.value())
18836 }
18837}
18838
18839impl ::core::fmt::Debug for ExternalInstance<'_> {
18840 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
18841 let mut ds = f.debug_struct("ExternalInstance");
18842 ds.field("anime_pack_name", &self.anime_pack_name());
18843 ds.field("anime_pack_name_hash", &self.anime_pack_name_hash());
18844 ds.field("anime_name", &self.anime_name());
18845 ds.field("anime_name_hash", &self.anime_name_hash());
18846 ds.finish()
18847 }
18848}
18849#[non_exhaustive]
18850#[derive(Debug, Clone, PartialEq)]
18851pub struct ExternalInstanceT {
18852 pub anime_pack_name: Option<alloc::string::String>,
18853 pub anime_pack_name_hash: u32,
18854 pub anime_name: Option<alloc::string::String>,
18855 pub anime_name_hash: u32,
18856}
18857impl Default for ExternalInstanceT {
18858 fn default() -> Self {
18859 Self {
18860 anime_pack_name: None,
18861 anime_pack_name_hash: 0,
18862 anime_name: None,
18863 anime_name_hash: 0,
18864 }
18865 }
18866}
18867impl ExternalInstanceT {
18868 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
18869 &self,
18870 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
18871 ) -> ::flatbuffers::WIPOffset<ExternalInstance<'b>> {
18872 let anime_pack_name = self.anime_pack_name.as_ref().map(|x|{
18873 _fbb.create_string(x)
18874 });
18875 let anime_pack_name_hash = self.anime_pack_name_hash;
18876 let anime_name = self.anime_name.as_ref().map(|x|{
18877 _fbb.create_string(x)
18878 });
18879 let anime_name_hash = self.anime_name_hash;
18880 ExternalInstance::create(_fbb, &ExternalInstanceArgs{
18881 anime_pack_name,
18882 anime_pack_name_hash,
18883 anime_name,
18884 anime_name_hash,
18885 })
18886 }
18887}
18888pub enum EmbeddedAssetOffset {}
18889#[derive(Copy, Clone, PartialEq)]
18890
18891pub struct EmbeddedAsset<'a> {
18892 pub _tab: ::flatbuffers::Table<'a>,
18893}
18894
18895impl<'a> ::flatbuffers::Follow<'a> for EmbeddedAsset<'a> {
18896 type Inner = EmbeddedAsset<'a>;
18897 #[inline]
18898 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
18899 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
18900 }
18901}
18902
18903impl<'a> EmbeddedAsset<'a> {
18904 pub const VT_NAME_HASH: ::flatbuffers::VOffsetT = 4;
18905 pub const VT_NAME: ::flatbuffers::VOffsetT = 6;
18906 pub const VT_DATA: ::flatbuffers::VOffsetT = 8;
18907
18908 #[inline]
18909 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
18910 EmbeddedAsset { _tab: table }
18911 }
18912 #[allow(unused_mut)]
18913 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
18914 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
18915 args: &'args EmbeddedAssetArgs<'args>
18916 ) -> ::flatbuffers::WIPOffset<EmbeddedAsset<'bldr>> {
18917 let mut builder = EmbeddedAssetBuilder::new(_fbb);
18918 if let Some(x) = args.data { builder.add_data(x); }
18919 if let Some(x) = args.name { builder.add_name(x); }
18920 builder.add_name_hash(args.name_hash);
18921 builder.finish()
18922 }
18923
18924 pub fn unpack(&self) -> EmbeddedAssetT {
18925 let name_hash = self.name_hash();
18926 let name = self.name().map(|x| {
18927 alloc::string::ToString::to_string(x)
18928 });
18929 let data = self.data().map(|x| {
18930 x.into_iter().collect()
18931 });
18932 EmbeddedAssetT {
18933 name_hash,
18934 name,
18935 data,
18936 }
18937 }
18938
18939 #[inline]
18940 pub fn name_hash(&self) -> u32 {
18941 unsafe { self._tab.get::<u32>(EmbeddedAsset::VT_NAME_HASH, Some(0)).unwrap()}
18945 }
18946 #[inline]
18947 pub fn key_compare_less_than(&self, o: &EmbeddedAsset) -> bool {
18948 self.name_hash() < o.name_hash()
18949 }
18950
18951 #[inline]
18952 pub fn key_compare_with_value(&self, val: u32) -> ::core::cmp::Ordering {
18953 let key = self.name_hash();
18954 key.cmp(&val)
18955 }
18956 #[inline]
18957 pub fn name(&self) -> Option<&'a str> {
18958 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(EmbeddedAsset::VT_NAME, None)}
18962 }
18963 #[inline]
18964 pub fn data(&self) -> Option<::flatbuffers::Vector<'a, u8>> {
18965 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>(EmbeddedAsset::VT_DATA, None)}
18969 }
18970}
18971
18972impl ::flatbuffers::Verifiable for EmbeddedAsset<'_> {
18973 #[inline]
18974 fn run_verifier(
18975 v: &mut ::flatbuffers::Verifier, pos: usize
18976 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
18977 v.visit_table(pos)?
18978 .visit_field::<u32>("name_hash", Self::VT_NAME_HASH, false)?
18979 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
18980 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>("data", Self::VT_DATA, false)?
18981 .finish();
18982 Ok(())
18983 }
18984}
18985pub struct EmbeddedAssetArgs<'a> {
18986 pub name_hash: u32,
18987 pub name: Option<::flatbuffers::WIPOffset<&'a str>>,
18988 pub data: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>,
18989}
18990impl<'a> Default for EmbeddedAssetArgs<'a> {
18991 #[inline]
18992 fn default() -> Self {
18993 EmbeddedAssetArgs {
18994 name_hash: 0,
18995 name: None,
18996 data: None,
18997 }
18998 }
18999}
19000
19001pub struct EmbeddedAssetBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
19002 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
19003 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
19004}
19005impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EmbeddedAssetBuilder<'a, 'b, A> {
19006 #[inline]
19007 pub fn add_name_hash(&mut self, name_hash: u32) {
19008 self.fbb_.push_slot::<u32>(EmbeddedAsset::VT_NAME_HASH, name_hash, 0);
19009 }
19010 #[inline]
19011 pub fn add_name(&mut self, name: ::flatbuffers::WIPOffset<&'b str>) {
19012 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(EmbeddedAsset::VT_NAME, name);
19013 }
19014 #[inline]
19015 pub fn add_data(&mut self, data: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , u8>>) {
19016 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(EmbeddedAsset::VT_DATA, data);
19017 }
19018 #[inline]
19019 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EmbeddedAssetBuilder<'a, 'b, A> {
19020 let start = _fbb.start_table();
19021 EmbeddedAssetBuilder {
19022 fbb_: _fbb,
19023 start_: start,
19024 }
19025 }
19026 #[inline]
19027 pub fn finish(self) -> ::flatbuffers::WIPOffset<EmbeddedAsset<'a>> {
19028 let o = self.fbb_.end_table(self.start_);
19029 ::flatbuffers::WIPOffset::new(o.value())
19030 }
19031}
19032
19033impl ::core::fmt::Debug for EmbeddedAsset<'_> {
19034 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
19035 let mut ds = f.debug_struct("EmbeddedAsset");
19036 ds.field("name_hash", &self.name_hash());
19037 ds.field("name", &self.name());
19038 ds.field("data", &self.data());
19039 ds.finish()
19040 }
19041}
19042#[non_exhaustive]
19043#[derive(Debug, Clone, PartialEq)]
19044pub struct EmbeddedAssetT {
19045 pub name_hash: u32,
19046 pub name: Option<alloc::string::String>,
19047 pub data: Option<alloc::vec::Vec<u8>>,
19048}
19049impl Default for EmbeddedAssetT {
19050 fn default() -> Self {
19051 Self {
19052 name_hash: 0,
19053 name: None,
19054 data: None,
19055 }
19056 }
19057}
19058impl EmbeddedAssetT {
19059 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
19060 &self,
19061 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
19062 ) -> ::flatbuffers::WIPOffset<EmbeddedAsset<'b>> {
19063 let name_hash = self.name_hash;
19064 let name = self.name.as_ref().map(|x|{
19065 _fbb.create_string(x)
19066 });
19067 let data = self.data.as_ref().map(|x|{
19068 _fbb.create_vector(x)
19069 });
19070 EmbeddedAsset::create(_fbb, &EmbeddedAssetArgs{
19071 name_hash,
19072 name,
19073 data,
19074 })
19075 }
19076}
19077pub enum SsAnimeBinaryOffset {}
19078#[derive(Copy, Clone, PartialEq)]
19079
19080pub struct SsAnimeBinary<'a> {
19081 pub _tab: ::flatbuffers::Table<'a>,
19082}
19083
19084impl<'a> ::flatbuffers::Follow<'a> for SsAnimeBinary<'a> {
19085 type Inner = SsAnimeBinary<'a>;
19086 #[inline]
19087 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
19088 Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
19089 }
19090}
19091
19092impl<'a> SsAnimeBinary<'a> {
19093 pub const VT_VERSION: ::flatbuffers::VOffsetT = 4;
19094 pub const VT_NAME: ::flatbuffers::VOffsetT = 6;
19095 pub const VT_NAME_HASH: ::flatbuffers::VOffsetT = 8;
19096 pub const VT_PARTS: ::flatbuffers::VOffsetT = 10;
19097 pub const VT_ANIMATIONS: ::flatbuffers::VOffsetT = 12;
19098 pub const VT_CELLMAPS: ::flatbuffers::VOffsetT = 14;
19099 pub const VT_EFFECTS: ::flatbuffers::VOffsetT = 16;
19100 pub const VT_SOUND_LISTS: ::flatbuffers::VOffsetT = 18;
19101 pub const VT_FONT_BITMAPS: ::flatbuffers::VOffsetT = 20;
19102 pub const VT_EXTERNAL_TEXTURES: ::flatbuffers::VOffsetT = 22;
19103 pub const VT_EXTERNAL_INSTANCES: ::flatbuffers::VOffsetT = 24;
19104 pub const VT_EMBEDDED_ASSETS: ::flatbuffers::VOffsetT = 26;
19105 pub const VT_KEYFRAMES: ::flatbuffers::VOffsetT = 28;
19106
19107 #[inline]
19108 pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
19109 SsAnimeBinary { _tab: table }
19110 }
19111 #[allow(unused_mut)]
19112 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
19113 _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
19114 args: &'args SsAnimeBinaryArgs<'args>
19115 ) -> ::flatbuffers::WIPOffset<SsAnimeBinary<'bldr>> {
19116 let mut builder = SsAnimeBinaryBuilder::new(_fbb);
19117 if let Some(x) = args.keyframes { builder.add_keyframes(x); }
19118 if let Some(x) = args.embedded_assets { builder.add_embedded_assets(x); }
19119 if let Some(x) = args.external_instances { builder.add_external_instances(x); }
19120 if let Some(x) = args.external_textures { builder.add_external_textures(x); }
19121 if let Some(x) = args.font_bitmaps { builder.add_font_bitmaps(x); }
19122 if let Some(x) = args.sound_lists { builder.add_sound_lists(x); }
19123 if let Some(x) = args.effects { builder.add_effects(x); }
19124 if let Some(x) = args.cellmaps { builder.add_cellmaps(x); }
19125 if let Some(x) = args.animations { builder.add_animations(x); }
19126 if let Some(x) = args.parts { builder.add_parts(x); }
19127 builder.add_name_hash(args.name_hash);
19128 if let Some(x) = args.name { builder.add_name(x); }
19129 builder.add_version(args.version);
19130 builder.finish()
19131 }
19132
19133 pub fn unpack(&self) -> SsAnimeBinaryT {
19134 let version = self.version();
19135 let name = {
19136 let x = self.name();
19137 alloc::string::ToString::to_string(x)
19138 };
19139 let name_hash = self.name_hash();
19140 let parts = {
19141 let x = self.parts();
19142 x.iter().map(|t| t.unpack()).collect()
19143 };
19144 let animations = {
19145 let x = self.animations();
19146 x.iter().map(|t| t.unpack()).collect()
19147 };
19148 let cellmaps = self.cellmaps().map(|x| {
19149 x.iter().map(|t| t.unpack()).collect()
19150 });
19151 let effects = self.effects().map(|x| {
19152 x.iter().map(|t| t.unpack()).collect()
19153 });
19154 let sound_lists = self.sound_lists().map(|x| {
19155 x.iter().map(|t| t.unpack()).collect()
19156 });
19157 let font_bitmaps = self.font_bitmaps().map(|x| {
19158 x.iter().map(|t| t.unpack()).collect()
19159 });
19160 let external_textures = self.external_textures().map(|x| {
19161 x.iter().map(|t| t.unpack()).collect()
19162 });
19163 let external_instances = self.external_instances().map(|x| {
19164 x.iter().map(|t| t.unpack()).collect()
19165 });
19166 let embedded_assets = self.embedded_assets().map(|x| {
19167 x.iter().map(|t| t.unpack()).collect()
19168 });
19169 let keyframes = {
19170 let x = self.keyframes();
19171 alloc::boxed::Box::new(x.unpack())
19172 };
19173 SsAnimeBinaryT {
19174 version,
19175 name,
19176 name_hash,
19177 parts,
19178 animations,
19179 cellmaps,
19180 effects,
19181 sound_lists,
19182 font_bitmaps,
19183 external_textures,
19184 external_instances,
19185 embedded_assets,
19186 keyframes,
19187 }
19188 }
19189
19190 #[inline]
19191 pub fn version(&self) -> u32 {
19192 unsafe { self._tab.get::<u32>(SsAnimeBinary::VT_VERSION, Some(0)).unwrap()}
19196 }
19197 #[inline]
19198 pub fn name(&self) -> &'a str {
19199 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(SsAnimeBinary::VT_NAME, None).unwrap()}
19203 }
19204 #[inline]
19205 pub fn name_hash(&self) -> u32 {
19206 unsafe { self._tab.get::<u32>(SsAnimeBinary::VT_NAME_HASH, Some(0)).unwrap()}
19210 }
19211 #[inline]
19212 pub fn parts(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartData<'a>>> {
19213 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartData>>>>(SsAnimeBinary::VT_PARTS, None).unwrap()}
19217 }
19218 #[inline]
19219 pub fn animations(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<AnimationData<'a>>> {
19220 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<AnimationData>>>>(SsAnimeBinary::VT_ANIMATIONS, None).unwrap()}
19224 }
19225 #[inline]
19226 pub fn cellmaps(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<CellMap<'a>>>> {
19227 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<CellMap>>>>(SsAnimeBinary::VT_CELLMAPS, None)}
19231 }
19232 #[inline]
19233 pub fn effects(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Effect<'a>>>> {
19234 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Effect>>>>(SsAnimeBinary::VT_EFFECTS, None)}
19238 }
19239 #[inline]
19240 pub fn sound_lists(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<SoundList<'a>>>> {
19241 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<SoundList>>>>(SsAnimeBinary::VT_SOUND_LISTS, None)}
19245 }
19246 #[inline]
19247 pub fn font_bitmaps(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<FontBitmap<'a>>>> {
19248 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<FontBitmap>>>>(SsAnimeBinary::VT_FONT_BITMAPS, None)}
19252 }
19253 #[inline]
19254 pub fn external_textures(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<ExternalTexture<'a>>>> {
19255 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<ExternalTexture>>>>(SsAnimeBinary::VT_EXTERNAL_TEXTURES, None)}
19259 }
19260 #[inline]
19261 pub fn external_instances(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<ExternalInstance<'a>>>> {
19262 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<ExternalInstance>>>>(SsAnimeBinary::VT_EXTERNAL_INSTANCES, None)}
19266 }
19267 #[inline]
19268 pub fn embedded_assets(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EmbeddedAsset<'a>>>> {
19269 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EmbeddedAsset>>>>(SsAnimeBinary::VT_EMBEDDED_ASSETS, None)}
19273 }
19274 #[inline]
19275 pub fn keyframes(&self) -> Keyframes<'a> {
19276 unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Keyframes>>(SsAnimeBinary::VT_KEYFRAMES, None).unwrap()}
19280 }
19281}
19282
19283impl ::flatbuffers::Verifiable for SsAnimeBinary<'_> {
19284 #[inline]
19285 fn run_verifier(
19286 v: &mut ::flatbuffers::Verifier, pos: usize
19287 ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
19288 v.visit_table(pos)?
19289 .visit_field::<u32>("version", Self::VT_VERSION, false)?
19290 .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
19291 .visit_field::<u32>("name_hash", Self::VT_NAME_HASH, false)?
19292 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<PartData>>>>("parts", Self::VT_PARTS, true)?
19293 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<AnimationData>>>>("animations", Self::VT_ANIMATIONS, true)?
19294 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<CellMap>>>>("cellmaps", Self::VT_CELLMAPS, false)?
19295 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Effect>>>>("effects", Self::VT_EFFECTS, false)?
19296 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<SoundList>>>>("sound_lists", Self::VT_SOUND_LISTS, false)?
19297 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<FontBitmap>>>>("font_bitmaps", Self::VT_FONT_BITMAPS, false)?
19298 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<ExternalTexture>>>>("external_textures", Self::VT_EXTERNAL_TEXTURES, false)?
19299 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<ExternalInstance>>>>("external_instances", Self::VT_EXTERNAL_INSTANCES, false)?
19300 .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<EmbeddedAsset>>>>("embedded_assets", Self::VT_EMBEDDED_ASSETS, false)?
19301 .visit_field::<::flatbuffers::ForwardsUOffset<Keyframes>>("keyframes", Self::VT_KEYFRAMES, true)?
19302 .finish();
19303 Ok(())
19304 }
19305}
19306pub struct SsAnimeBinaryArgs<'a> {
19307 pub version: u32,
19308 pub name: Option<::flatbuffers::WIPOffset<&'a str>>,
19309 pub name_hash: u32,
19310 pub parts: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<PartData<'a>>>>>,
19311 pub animations: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<AnimationData<'a>>>>>,
19312 pub cellmaps: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<CellMap<'a>>>>>,
19313 pub effects: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Effect<'a>>>>>,
19314 pub sound_lists: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<SoundList<'a>>>>>,
19315 pub font_bitmaps: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<FontBitmap<'a>>>>>,
19316 pub external_textures: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<ExternalTexture<'a>>>>>,
19317 pub external_instances: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<ExternalInstance<'a>>>>>,
19318 pub embedded_assets: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<EmbeddedAsset<'a>>>>>,
19319 pub keyframes: Option<::flatbuffers::WIPOffset<Keyframes<'a>>>,
19320}
19321impl<'a> Default for SsAnimeBinaryArgs<'a> {
19322 #[inline]
19323 fn default() -> Self {
19324 SsAnimeBinaryArgs {
19325 version: 0,
19326 name: None, name_hash: 0,
19328 parts: None, animations: None, cellmaps: None,
19331 effects: None,
19332 sound_lists: None,
19333 font_bitmaps: None,
19334 external_textures: None,
19335 external_instances: None,
19336 embedded_assets: None,
19337 keyframes: None, }
19339 }
19340}
19341
19342pub struct SsAnimeBinaryBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
19343 fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
19344 start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
19345}
19346impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> SsAnimeBinaryBuilder<'a, 'b, A> {
19347 #[inline]
19348 pub fn add_version(&mut self, version: u32) {
19349 self.fbb_.push_slot::<u32>(SsAnimeBinary::VT_VERSION, version, 0);
19350 }
19351 #[inline]
19352 pub fn add_name(&mut self, name: ::flatbuffers::WIPOffset<&'b str>) {
19353 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SsAnimeBinary::VT_NAME, name);
19354 }
19355 #[inline]
19356 pub fn add_name_hash(&mut self, name_hash: u32) {
19357 self.fbb_.push_slot::<u32>(SsAnimeBinary::VT_NAME_HASH, name_hash, 0);
19358 }
19359 #[inline]
19360 pub fn add_parts(&mut self, parts: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<PartData<'b >>>>) {
19361 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SsAnimeBinary::VT_PARTS, parts);
19362 }
19363 #[inline]
19364 pub fn add_animations(&mut self, animations: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<AnimationData<'b >>>>) {
19365 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SsAnimeBinary::VT_ANIMATIONS, animations);
19366 }
19367 #[inline]
19368 pub fn add_cellmaps(&mut self, cellmaps: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<CellMap<'b >>>>) {
19369 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SsAnimeBinary::VT_CELLMAPS, cellmaps);
19370 }
19371 #[inline]
19372 pub fn add_effects(&mut self, effects: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Effect<'b >>>>) {
19373 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SsAnimeBinary::VT_EFFECTS, effects);
19374 }
19375 #[inline]
19376 pub fn add_sound_lists(&mut self, sound_lists: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<SoundList<'b >>>>) {
19377 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SsAnimeBinary::VT_SOUND_LISTS, sound_lists);
19378 }
19379 #[inline]
19380 pub fn add_font_bitmaps(&mut self, font_bitmaps: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<FontBitmap<'b >>>>) {
19381 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SsAnimeBinary::VT_FONT_BITMAPS, font_bitmaps);
19382 }
19383 #[inline]
19384 pub fn add_external_textures(&mut self, external_textures: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<ExternalTexture<'b >>>>) {
19385 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SsAnimeBinary::VT_EXTERNAL_TEXTURES, external_textures);
19386 }
19387 #[inline]
19388 pub fn add_external_instances(&mut self, external_instances: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<ExternalInstance<'b >>>>) {
19389 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SsAnimeBinary::VT_EXTERNAL_INSTANCES, external_instances);
19390 }
19391 #[inline]
19392 pub fn add_embedded_assets(&mut self, embedded_assets: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<EmbeddedAsset<'b >>>>) {
19393 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SsAnimeBinary::VT_EMBEDDED_ASSETS, embedded_assets);
19394 }
19395 #[inline]
19396 pub fn add_keyframes(&mut self, keyframes: ::flatbuffers::WIPOffset<Keyframes<'b >>) {
19397 self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Keyframes>>(SsAnimeBinary::VT_KEYFRAMES, keyframes);
19398 }
19399 #[inline]
19400 pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> SsAnimeBinaryBuilder<'a, 'b, A> {
19401 let start = _fbb.start_table();
19402 SsAnimeBinaryBuilder {
19403 fbb_: _fbb,
19404 start_: start,
19405 }
19406 }
19407 #[inline]
19408 pub fn finish(self) -> ::flatbuffers::WIPOffset<SsAnimeBinary<'a>> {
19409 let o = self.fbb_.end_table(self.start_);
19410 self.fbb_.required(o, SsAnimeBinary::VT_NAME,"name");
19411 self.fbb_.required(o, SsAnimeBinary::VT_PARTS,"parts");
19412 self.fbb_.required(o, SsAnimeBinary::VT_ANIMATIONS,"animations");
19413 self.fbb_.required(o, SsAnimeBinary::VT_KEYFRAMES,"keyframes");
19414 ::flatbuffers::WIPOffset::new(o.value())
19415 }
19416}
19417
19418impl ::core::fmt::Debug for SsAnimeBinary<'_> {
19419 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
19420 let mut ds = f.debug_struct("SsAnimeBinary");
19421 ds.field("version", &self.version());
19422 ds.field("name", &self.name());
19423 ds.field("name_hash", &self.name_hash());
19424 ds.field("parts", &self.parts());
19425 ds.field("animations", &self.animations());
19426 ds.field("cellmaps", &self.cellmaps());
19427 ds.field("effects", &self.effects());
19428 ds.field("sound_lists", &self.sound_lists());
19429 ds.field("font_bitmaps", &self.font_bitmaps());
19430 ds.field("external_textures", &self.external_textures());
19431 ds.field("external_instances", &self.external_instances());
19432 ds.field("embedded_assets", &self.embedded_assets());
19433 ds.field("keyframes", &self.keyframes());
19434 ds.finish()
19435 }
19436}
19437#[non_exhaustive]
19438#[derive(Debug, Clone, PartialEq)]
19439pub struct SsAnimeBinaryT {
19440 pub version: u32,
19441 pub name: alloc::string::String,
19442 pub name_hash: u32,
19443 pub parts: alloc::vec::Vec<PartDataT>,
19444 pub animations: alloc::vec::Vec<AnimationDataT>,
19445 pub cellmaps: Option<alloc::vec::Vec<CellMapT>>,
19446 pub effects: Option<alloc::vec::Vec<EffectT>>,
19447 pub sound_lists: Option<alloc::vec::Vec<SoundListT>>,
19448 pub font_bitmaps: Option<alloc::vec::Vec<FontBitmapT>>,
19449 pub external_textures: Option<alloc::vec::Vec<ExternalTextureT>>,
19450 pub external_instances: Option<alloc::vec::Vec<ExternalInstanceT>>,
19451 pub embedded_assets: Option<alloc::vec::Vec<EmbeddedAssetT>>,
19452 pub keyframes: alloc::boxed::Box<KeyframesT>,
19453}
19454impl Default for SsAnimeBinaryT {
19455 fn default() -> Self {
19456 Self {
19457 version: 0,
19458 name: alloc::string::ToString::to_string(""),
19459 name_hash: 0,
19460 parts: Default::default(),
19461 animations: Default::default(),
19462 cellmaps: None,
19463 effects: None,
19464 sound_lists: None,
19465 font_bitmaps: None,
19466 external_textures: None,
19467 external_instances: None,
19468 embedded_assets: None,
19469 keyframes: Default::default(),
19470 }
19471 }
19472}
19473impl SsAnimeBinaryT {
19474 pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
19475 &self,
19476 _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
19477 ) -> ::flatbuffers::WIPOffset<SsAnimeBinary<'b>> {
19478 let version = self.version;
19479 let name = Some({
19480 let x = &self.name;
19481 _fbb.create_string(x)
19482 });
19483 let name_hash = self.name_hash;
19484 let parts = Some({
19485 let x = &self.parts;
19486 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
19487 });
19488 let animations = Some({
19489 let x = &self.animations;
19490 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
19491 });
19492 let cellmaps = self.cellmaps.as_ref().map(|x|{
19493 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
19494 });
19495 let effects = self.effects.as_ref().map(|x|{
19496 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
19497 });
19498 let sound_lists = self.sound_lists.as_ref().map(|x|{
19499 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
19500 });
19501 let font_bitmaps = self.font_bitmaps.as_ref().map(|x|{
19502 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
19503 });
19504 let external_textures = self.external_textures.as_ref().map(|x|{
19505 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
19506 });
19507 let external_instances = self.external_instances.as_ref().map(|x|{
19508 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
19509 });
19510 let embedded_assets = self.embedded_assets.as_ref().map(|x|{
19511 let w: alloc::vec::Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w)
19512 });
19513 let keyframes = Some({
19514 let x = &self.keyframes;
19515 x.pack(_fbb)
19516 });
19517 SsAnimeBinary::create(_fbb, &SsAnimeBinaryArgs{
19518 version,
19519 name,
19520 name_hash,
19521 parts,
19522 animations,
19523 cellmaps,
19524 effects,
19525 sound_lists,
19526 font_bitmaps,
19527 external_textures,
19528 external_instances,
19529 embedded_assets,
19530 keyframes,
19531 })
19532 }
19533}
19534#[inline]
19535pub fn root_as_ss_anime_binary(buf: &[u8]) -> Result<SsAnimeBinary<'_>, ::flatbuffers::InvalidFlatbuffer> {
19542 ::flatbuffers::root::<SsAnimeBinary>(buf)
19543}
19544#[inline]
19545pub fn size_prefixed_root_as_ss_anime_binary(buf: &[u8]) -> Result<SsAnimeBinary<'_>, ::flatbuffers::InvalidFlatbuffer> {
19552 ::flatbuffers::size_prefixed_root::<SsAnimeBinary>(buf)
19553}
19554#[inline]
19555pub fn root_as_ss_anime_binary_with_opts<'b, 'o>(
19562 opts: &'o ::flatbuffers::VerifierOptions,
19563 buf: &'b [u8],
19564) -> Result<SsAnimeBinary<'b>, ::flatbuffers::InvalidFlatbuffer> {
19565 ::flatbuffers::root_with_opts::<SsAnimeBinary<'b>>(opts, buf)
19566}
19567#[inline]
19568pub fn size_prefixed_root_as_ss_anime_binary_with_opts<'b, 'o>(
19575 opts: &'o ::flatbuffers::VerifierOptions,
19576 buf: &'b [u8],
19577) -> Result<SsAnimeBinary<'b>, ::flatbuffers::InvalidFlatbuffer> {
19578 ::flatbuffers::size_prefixed_root_with_opts::<SsAnimeBinary<'b>>(opts, buf)
19579}
19580#[inline]
19581pub unsafe fn root_as_ss_anime_binary_unchecked(buf: &[u8]) -> SsAnimeBinary<'_> {
19585 unsafe { ::flatbuffers::root_unchecked::<SsAnimeBinary>(buf) }
19586}
19587#[inline]
19588pub unsafe fn size_prefixed_root_as_ss_anime_binary_unchecked(buf: &[u8]) -> SsAnimeBinary<'_> {
19592 unsafe { ::flatbuffers::size_prefixed_root_unchecked::<SsAnimeBinary>(buf) }
19593}
19594pub const SS_ANIME_BINARY_IDENTIFIER: &str = "SSAB";
19595
19596#[inline]
19597pub fn ss_anime_binary_buffer_has_identifier(buf: &[u8]) -> bool {
19598 ::flatbuffers::buffer_has_identifier(buf, SS_ANIME_BINARY_IDENTIFIER, false)
19599}
19600
19601#[inline]
19602pub fn ss_anime_binary_size_prefixed_buffer_has_identifier(buf: &[u8]) -> bool {
19603 ::flatbuffers::buffer_has_identifier(buf, SS_ANIME_BINARY_IDENTIFIER, true)
19604}
19605
19606pub const SS_ANIME_BINARY_EXTENSION: &str = "ssab";
19607
19608#[inline]
19609pub fn finish_ss_anime_binary_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>(
19610 fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
19611 root: ::flatbuffers::WIPOffset<SsAnimeBinary<'a>>) {
19612 fbb.finish(root, Some(SS_ANIME_BINARY_IDENTIFIER));
19613}
19614
19615#[inline]
19616pub fn finish_size_prefixed_ss_anime_binary_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>(fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, root: ::flatbuffers::WIPOffset<SsAnimeBinary<'a>>) {
19617 fbb.finish_size_prefixed(root, Some(SS_ANIME_BINARY_IDENTIFIER));
19618}
19619} }