Skip to main content

fcast_protocol/
v4_generated.rs

1// automatically generated by the FlatBuffers compiler, do not modify
2// @generated
3extern crate alloc;
4
5
6#[allow(unused_imports, dead_code)]
7pub mod fcast {
8
9#[allow(unused_imports, dead_code)]
10pub mod v4 {
11
12
13#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
14pub const ENUM_MIN_MESSAGE: u8 = 0;
15#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
16pub const ENUM_MAX_MESSAGE: u8 = 23;
17#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
18#[allow(non_camel_case_types)]
19pub const ENUM_VALUES_MESSAGE: [Message; 24] = [
20  Message::NONE,
21  Message::Load,
22  Message::ProgressChanged,
23  Message::VolumeChanged,
24  Message::PlaybackStateChanged,
25  Message::SpeedChanged,
26  Message::SenderIntroduction,
27  Message::ReceiverIntroduction,
28  Message::StopPlayback,
29  Message::StartMirroringSession,
30  Message::MirroringSessionDescription,
31  Message::QueueInsert,
32  Message::QueueRemove,
33  Message::TracksAvailable,
34  Message::ChangeTrack,
35  Message::QueueItemSelected,
36  Message::AddSubtitleSource,
37  Message::SetProgressUpdateInterval,
38  Message::CompanionHelloRequest,
39  Message::CompanionHelloResponse,
40  Message::CompanionResourceInfoRequest,
41  Message::CompanionResourceInfoResponse,
42  Message::CompanionResourceRequest,
43  Message::Error,
44];
45
46#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
47#[repr(transparent)]
48pub struct Message(pub u8);
49#[allow(non_upper_case_globals)]
50impl Message {
51  pub const NONE: Self = Self(0);
52  pub const Load: Self = Self(1);
53  pub const ProgressChanged: Self = Self(2);
54  pub const VolumeChanged: Self = Self(3);
55  pub const PlaybackStateChanged: Self = Self(4);
56  pub const SpeedChanged: Self = Self(5);
57  pub const SenderIntroduction: Self = Self(6);
58  pub const ReceiverIntroduction: Self = Self(7);
59  pub const StopPlayback: Self = Self(8);
60  pub const StartMirroringSession: Self = Self(9);
61  pub const MirroringSessionDescription: Self = Self(10);
62  pub const QueueInsert: Self = Self(11);
63  pub const QueueRemove: Self = Self(12);
64  pub const TracksAvailable: Self = Self(13);
65  pub const ChangeTrack: Self = Self(14);
66  pub const QueueItemSelected: Self = Self(15);
67  pub const AddSubtitleSource: Self = Self(16);
68  pub const SetProgressUpdateInterval: Self = Self(17);
69  pub const CompanionHelloRequest: Self = Self(18);
70  pub const CompanionHelloResponse: Self = Self(19);
71  pub const CompanionResourceInfoRequest: Self = Self(20);
72  pub const CompanionResourceInfoResponse: Self = Self(21);
73  pub const CompanionResourceRequest: Self = Self(22);
74  pub const Error: Self = Self(23);
75
76  pub const ENUM_MIN: u8 = 0;
77  pub const ENUM_MAX: u8 = 23;
78  pub const ENUM_VALUES: &'static [Self] = &[
79    Self::NONE,
80    Self::Load,
81    Self::ProgressChanged,
82    Self::VolumeChanged,
83    Self::PlaybackStateChanged,
84    Self::SpeedChanged,
85    Self::SenderIntroduction,
86    Self::ReceiverIntroduction,
87    Self::StopPlayback,
88    Self::StartMirroringSession,
89    Self::MirroringSessionDescription,
90    Self::QueueInsert,
91    Self::QueueRemove,
92    Self::TracksAvailable,
93    Self::ChangeTrack,
94    Self::QueueItemSelected,
95    Self::AddSubtitleSource,
96    Self::SetProgressUpdateInterval,
97    Self::CompanionHelloRequest,
98    Self::CompanionHelloResponse,
99    Self::CompanionResourceInfoRequest,
100    Self::CompanionResourceInfoResponse,
101    Self::CompanionResourceRequest,
102    Self::Error,
103  ];
104  /// Returns the variant's name or "" if unknown.
105  pub fn variant_name(self) -> Option<&'static str> {
106    match self {
107      Self::NONE => Some("NONE"),
108      Self::Load => Some("Load"),
109      Self::ProgressChanged => Some("ProgressChanged"),
110      Self::VolumeChanged => Some("VolumeChanged"),
111      Self::PlaybackStateChanged => Some("PlaybackStateChanged"),
112      Self::SpeedChanged => Some("SpeedChanged"),
113      Self::SenderIntroduction => Some("SenderIntroduction"),
114      Self::ReceiverIntroduction => Some("ReceiverIntroduction"),
115      Self::StopPlayback => Some("StopPlayback"),
116      Self::StartMirroringSession => Some("StartMirroringSession"),
117      Self::MirroringSessionDescription => Some("MirroringSessionDescription"),
118      Self::QueueInsert => Some("QueueInsert"),
119      Self::QueueRemove => Some("QueueRemove"),
120      Self::TracksAvailable => Some("TracksAvailable"),
121      Self::ChangeTrack => Some("ChangeTrack"),
122      Self::QueueItemSelected => Some("QueueItemSelected"),
123      Self::AddSubtitleSource => Some("AddSubtitleSource"),
124      Self::SetProgressUpdateInterval => Some("SetProgressUpdateInterval"),
125      Self::CompanionHelloRequest => Some("CompanionHelloRequest"),
126      Self::CompanionHelloResponse => Some("CompanionHelloResponse"),
127      Self::CompanionResourceInfoRequest => Some("CompanionResourceInfoRequest"),
128      Self::CompanionResourceInfoResponse => Some("CompanionResourceInfoResponse"),
129      Self::CompanionResourceRequest => Some("CompanionResourceRequest"),
130      Self::Error => Some("Error"),
131      _ => None,
132    }
133  }
134}
135impl ::core::fmt::Debug for Message {
136  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
137    if let Some(name) = self.variant_name() {
138      f.write_str(name)
139    } else {
140      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
141    }
142  }
143}
144impl<'a> ::flatbuffers::Follow<'a> for Message {
145  type Inner = Self;
146  #[inline]
147  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
148    let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
149    Self(b)
150  }
151}
152
153impl ::flatbuffers::Push for Message {
154    type Output = Message;
155    #[inline]
156    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
157        unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
158    }
159}
160
161impl ::flatbuffers::EndianScalar for Message {
162  type Scalar = u8;
163  #[inline]
164  fn to_little_endian(self) -> u8 {
165    self.0.to_le()
166  }
167  #[inline]
168  #[allow(clippy::wrong_self_convention)]
169  fn from_little_endian(v: u8) -> Self {
170    let b = u8::from_le(v);
171    Self(b)
172  }
173}
174
175impl<'a> ::flatbuffers::Verifiable for Message {
176  #[inline]
177  fn run_verifier(
178    v: &mut ::flatbuffers::Verifier, pos: usize
179  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
180    u8::run_verifier(v, pos)
181  }
182}
183
184impl ::flatbuffers::SimpleToVerifyInSlice for Message {}
185pub struct MessageUnionTableOffset {}
186
187#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
188pub const ENUM_MIN_PLAYBACK_STATE: u8 = 0;
189#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
190pub const ENUM_MAX_PLAYBACK_STATE: u8 = 4;
191#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
192#[allow(non_camel_case_types)]
193pub const ENUM_VALUES_PLAYBACK_STATE: [PlaybackState; 5] = [
194  PlaybackState::Idle,
195  PlaybackState::Buffering,
196  PlaybackState::Playing,
197  PlaybackState::Paused,
198  PlaybackState::Ended,
199];
200
201#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
202#[repr(transparent)]
203pub struct PlaybackState(pub u8);
204#[allow(non_upper_case_globals)]
205impl PlaybackState {
206  pub const Idle: Self = Self(0);
207  pub const Buffering: Self = Self(1);
208  pub const Playing: Self = Self(2);
209  pub const Paused: Self = Self(3);
210  pub const Ended: Self = Self(4);
211
212  pub const ENUM_MIN: u8 = 0;
213  pub const ENUM_MAX: u8 = 4;
214  pub const ENUM_VALUES: &'static [Self] = &[
215    Self::Idle,
216    Self::Buffering,
217    Self::Playing,
218    Self::Paused,
219    Self::Ended,
220  ];
221  /// Returns the variant's name or "" if unknown.
222  pub fn variant_name(self) -> Option<&'static str> {
223    match self {
224      Self::Idle => Some("Idle"),
225      Self::Buffering => Some("Buffering"),
226      Self::Playing => Some("Playing"),
227      Self::Paused => Some("Paused"),
228      Self::Ended => Some("Ended"),
229      _ => None,
230    }
231  }
232}
233impl ::core::fmt::Debug for PlaybackState {
234  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
235    if let Some(name) = self.variant_name() {
236      f.write_str(name)
237    } else {
238      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
239    }
240  }
241}
242impl<'a> ::flatbuffers::Follow<'a> for PlaybackState {
243  type Inner = Self;
244  #[inline]
245  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
246    let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
247    Self(b)
248  }
249}
250
251impl ::flatbuffers::Push for PlaybackState {
252    type Output = PlaybackState;
253    #[inline]
254    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
255        unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
256    }
257}
258
259impl ::flatbuffers::EndianScalar for PlaybackState {
260  type Scalar = u8;
261  #[inline]
262  fn to_little_endian(self) -> u8 {
263    self.0.to_le()
264  }
265  #[inline]
266  #[allow(clippy::wrong_self_convention)]
267  fn from_little_endian(v: u8) -> Self {
268    let b = u8::from_le(v);
269    Self(b)
270  }
271}
272
273impl<'a> ::flatbuffers::Verifiable for PlaybackState {
274  #[inline]
275  fn run_verifier(
276    v: &mut ::flatbuffers::Verifier, pos: usize
277  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
278    u8::run_verifier(v, pos)
279  }
280}
281
282impl ::flatbuffers::SimpleToVerifyInSlice for PlaybackState {}
283#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
284pub const ENUM_MIN_METADATA: u8 = 0;
285#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
286pub const ENUM_MAX_METADATA: u8 = 2;
287#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
288#[allow(non_camel_case_types)]
289pub const ENUM_VALUES_METADATA: [Metadata; 3] = [
290  Metadata::NONE,
291  Metadata::Video,
292  Metadata::Audio,
293];
294
295#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
296#[repr(transparent)]
297pub struct Metadata(pub u8);
298#[allow(non_upper_case_globals)]
299impl Metadata {
300  pub const NONE: Self = Self(0);
301  pub const Video: Self = Self(1);
302  pub const Audio: Self = Self(2);
303
304  pub const ENUM_MIN: u8 = 0;
305  pub const ENUM_MAX: u8 = 2;
306  pub const ENUM_VALUES: &'static [Self] = &[
307    Self::NONE,
308    Self::Video,
309    Self::Audio,
310  ];
311  /// Returns the variant's name or "" if unknown.
312  pub fn variant_name(self) -> Option<&'static str> {
313    match self {
314      Self::NONE => Some("NONE"),
315      Self::Video => Some("Video"),
316      Self::Audio => Some("Audio"),
317      _ => None,
318    }
319  }
320}
321impl ::core::fmt::Debug for Metadata {
322  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
323    if let Some(name) = self.variant_name() {
324      f.write_str(name)
325    } else {
326      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
327    }
328  }
329}
330impl<'a> ::flatbuffers::Follow<'a> for Metadata {
331  type Inner = Self;
332  #[inline]
333  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
334    let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
335    Self(b)
336  }
337}
338
339impl ::flatbuffers::Push for Metadata {
340    type Output = Metadata;
341    #[inline]
342    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
343        unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
344    }
345}
346
347impl ::flatbuffers::EndianScalar for Metadata {
348  type Scalar = u8;
349  #[inline]
350  fn to_little_endian(self) -> u8 {
351    self.0.to_le()
352  }
353  #[inline]
354  #[allow(clippy::wrong_self_convention)]
355  fn from_little_endian(v: u8) -> Self {
356    let b = u8::from_le(v);
357    Self(b)
358  }
359}
360
361impl<'a> ::flatbuffers::Verifiable for Metadata {
362  #[inline]
363  fn run_verifier(
364    v: &mut ::flatbuffers::Verifier, pos: usize
365  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
366    u8::run_verifier(v, pos)
367  }
368}
369
370impl ::flatbuffers::SimpleToVerifyInSlice for Metadata {}
371pub struct MetadataUnionTableOffset {}
372
373#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
374pub const ENUM_MIN_GENERIC_META_VALUE: u8 = 0;
375#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
376pub const ENUM_MAX_GENERIC_META_VALUE: u8 = 5;
377#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
378#[allow(non_camel_case_types)]
379pub const ENUM_VALUES_GENERIC_META_VALUE: [GenericMetaValue; 6] = [
380  GenericMetaValue::NONE,
381  GenericMetaValue::String,
382  GenericMetaValue::Float,
383  GenericMetaValue::Int,
384  GenericMetaValue::List,
385  GenericMetaValue::KVPair,
386];
387
388#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
389#[repr(transparent)]
390pub struct GenericMetaValue(pub u8);
391#[allow(non_upper_case_globals)]
392impl GenericMetaValue {
393  pub const NONE: Self = Self(0);
394  pub const String: Self = Self(1);
395  pub const Float: Self = Self(2);
396  pub const Int: Self = Self(3);
397  pub const List: Self = Self(4);
398  pub const KVPair: Self = Self(5);
399
400  pub const ENUM_MIN: u8 = 0;
401  pub const ENUM_MAX: u8 = 5;
402  pub const ENUM_VALUES: &'static [Self] = &[
403    Self::NONE,
404    Self::String,
405    Self::Float,
406    Self::Int,
407    Self::List,
408    Self::KVPair,
409  ];
410  /// Returns the variant's name or "" if unknown.
411  pub fn variant_name(self) -> Option<&'static str> {
412    match self {
413      Self::NONE => Some("NONE"),
414      Self::String => Some("String"),
415      Self::Float => Some("Float"),
416      Self::Int => Some("Int"),
417      Self::List => Some("List"),
418      Self::KVPair => Some("KVPair"),
419      _ => None,
420    }
421  }
422}
423impl ::core::fmt::Debug for GenericMetaValue {
424  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
425    if let Some(name) = self.variant_name() {
426      f.write_str(name)
427    } else {
428      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
429    }
430  }
431}
432impl<'a> ::flatbuffers::Follow<'a> for GenericMetaValue {
433  type Inner = Self;
434  #[inline]
435  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
436    let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
437    Self(b)
438  }
439}
440
441impl ::flatbuffers::Push for GenericMetaValue {
442    type Output = GenericMetaValue;
443    #[inline]
444    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
445        unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
446    }
447}
448
449impl ::flatbuffers::EndianScalar for GenericMetaValue {
450  type Scalar = u8;
451  #[inline]
452  fn to_little_endian(self) -> u8 {
453    self.0.to_le()
454  }
455  #[inline]
456  #[allow(clippy::wrong_self_convention)]
457  fn from_little_endian(v: u8) -> Self {
458    let b = u8::from_le(v);
459    Self(b)
460  }
461}
462
463impl<'a> ::flatbuffers::Verifiable for GenericMetaValue {
464  #[inline]
465  fn run_verifier(
466    v: &mut ::flatbuffers::Verifier, pos: usize
467  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
468    u8::run_verifier(v, pos)
469  }
470}
471
472impl ::flatbuffers::SimpleToVerifyInSlice for GenericMetaValue {}
473pub struct GenericMetaValueUnionTableOffset {}
474
475#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
476pub const ENUM_MIN_MEDIA_SOURCE: u8 = 0;
477#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
478pub const ENUM_MAX_MEDIA_SOURCE: u8 = 2;
479#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
480#[allow(non_camel_case_types)]
481pub const ENUM_VALUES_MEDIA_SOURCE: [MediaSource; 3] = [
482  MediaSource::NONE,
483  MediaSource::Single,
484  MediaSource::Queue,
485];
486
487#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
488#[repr(transparent)]
489pub struct MediaSource(pub u8);
490#[allow(non_upper_case_globals)]
491impl MediaSource {
492  pub const NONE: Self = Self(0);
493  pub const Single: Self = Self(1);
494  pub const Queue: Self = Self(2);
495
496  pub const ENUM_MIN: u8 = 0;
497  pub const ENUM_MAX: u8 = 2;
498  pub const ENUM_VALUES: &'static [Self] = &[
499    Self::NONE,
500    Self::Single,
501    Self::Queue,
502  ];
503  /// Returns the variant's name or "" if unknown.
504  pub fn variant_name(self) -> Option<&'static str> {
505    match self {
506      Self::NONE => Some("NONE"),
507      Self::Single => Some("Single"),
508      Self::Queue => Some("Queue"),
509      _ => None,
510    }
511  }
512}
513impl ::core::fmt::Debug for MediaSource {
514  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
515    if let Some(name) = self.variant_name() {
516      f.write_str(name)
517    } else {
518      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
519    }
520  }
521}
522impl<'a> ::flatbuffers::Follow<'a> for MediaSource {
523  type Inner = Self;
524  #[inline]
525  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
526    let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
527    Self(b)
528  }
529}
530
531impl ::flatbuffers::Push for MediaSource {
532    type Output = MediaSource;
533    #[inline]
534    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
535        unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
536    }
537}
538
539impl ::flatbuffers::EndianScalar for MediaSource {
540  type Scalar = u8;
541  #[inline]
542  fn to_little_endian(self) -> u8 {
543    self.0.to_le()
544  }
545  #[inline]
546  #[allow(clippy::wrong_self_convention)]
547  fn from_little_endian(v: u8) -> Self {
548    let b = u8::from_le(v);
549    Self(b)
550  }
551}
552
553impl<'a> ::flatbuffers::Verifiable for MediaSource {
554  #[inline]
555  fn run_verifier(
556    v: &mut ::flatbuffers::Verifier, pos: usize
557  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
558    u8::run_verifier(v, pos)
559  }
560}
561
562impl ::flatbuffers::SimpleToVerifyInSlice for MediaSource {}
563pub struct MediaSourceUnionTableOffset {}
564
565#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
566pub const ENUM_MIN_QUEUE_POSITION: u8 = 0;
567#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
568pub const ENUM_MAX_QUEUE_POSITION: u8 = 3;
569#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
570#[allow(non_camel_case_types)]
571pub const ENUM_VALUES_QUEUE_POSITION: [QueuePosition; 4] = [
572  QueuePosition::NONE,
573  QueuePosition::Index,
574  QueuePosition::Front,
575  QueuePosition::Back,
576];
577
578#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
579#[repr(transparent)]
580pub struct QueuePosition(pub u8);
581#[allow(non_upper_case_globals)]
582impl QueuePosition {
583  pub const NONE: Self = Self(0);
584  pub const Index: Self = Self(1);
585  pub const Front: Self = Self(2);
586  pub const Back: Self = Self(3);
587
588  pub const ENUM_MIN: u8 = 0;
589  pub const ENUM_MAX: u8 = 3;
590  pub const ENUM_VALUES: &'static [Self] = &[
591    Self::NONE,
592    Self::Index,
593    Self::Front,
594    Self::Back,
595  ];
596  /// Returns the variant's name or "" if unknown.
597  pub fn variant_name(self) -> Option<&'static str> {
598    match self {
599      Self::NONE => Some("NONE"),
600      Self::Index => Some("Index"),
601      Self::Front => Some("Front"),
602      Self::Back => Some("Back"),
603      _ => None,
604    }
605  }
606}
607impl ::core::fmt::Debug for QueuePosition {
608  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
609    if let Some(name) = self.variant_name() {
610      f.write_str(name)
611    } else {
612      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
613    }
614  }
615}
616impl<'a> ::flatbuffers::Follow<'a> for QueuePosition {
617  type Inner = Self;
618  #[inline]
619  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
620    let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
621    Self(b)
622  }
623}
624
625impl ::flatbuffers::Push for QueuePosition {
626    type Output = QueuePosition;
627    #[inline]
628    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
629        unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
630    }
631}
632
633impl ::flatbuffers::EndianScalar for QueuePosition {
634  type Scalar = u8;
635  #[inline]
636  fn to_little_endian(self) -> u8 {
637    self.0.to_le()
638  }
639  #[inline]
640  #[allow(clippy::wrong_self_convention)]
641  fn from_little_endian(v: u8) -> Self {
642    let b = u8::from_le(v);
643    Self(b)
644  }
645}
646
647impl<'a> ::flatbuffers::Verifiable for QueuePosition {
648  #[inline]
649  fn run_verifier(
650    v: &mut ::flatbuffers::Verifier, pos: usize
651  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
652    u8::run_verifier(v, pos)
653  }
654}
655
656impl ::flatbuffers::SimpleToVerifyInSlice for QueuePosition {}
657pub struct QueuePositionUnionTableOffset {}
658
659#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
660pub const ENUM_MIN_MEDIA_TRACK_METADATA: u8 = 0;
661#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
662pub const ENUM_MAX_MEDIA_TRACK_METADATA: u8 = 3;
663#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
664#[allow(non_camel_case_types)]
665pub const ENUM_VALUES_MEDIA_TRACK_METADATA: [MediaTrackMetadata; 4] = [
666  MediaTrackMetadata::NONE,
667  MediaTrackMetadata::Video,
668  MediaTrackMetadata::Audio,
669  MediaTrackMetadata::Subtitle,
670];
671
672#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
673#[repr(transparent)]
674pub struct MediaTrackMetadata(pub u8);
675#[allow(non_upper_case_globals)]
676impl MediaTrackMetadata {
677  pub const NONE: Self = Self(0);
678  pub const Video: Self = Self(1);
679  pub const Audio: Self = Self(2);
680  pub const Subtitle: Self = Self(3);
681
682  pub const ENUM_MIN: u8 = 0;
683  pub const ENUM_MAX: u8 = 3;
684  pub const ENUM_VALUES: &'static [Self] = &[
685    Self::NONE,
686    Self::Video,
687    Self::Audio,
688    Self::Subtitle,
689  ];
690  /// Returns the variant's name or "" if unknown.
691  pub fn variant_name(self) -> Option<&'static str> {
692    match self {
693      Self::NONE => Some("NONE"),
694      Self::Video => Some("Video"),
695      Self::Audio => Some("Audio"),
696      Self::Subtitle => Some("Subtitle"),
697      _ => None,
698    }
699  }
700}
701impl ::core::fmt::Debug for MediaTrackMetadata {
702  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
703    if let Some(name) = self.variant_name() {
704      f.write_str(name)
705    } else {
706      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
707    }
708  }
709}
710impl<'a> ::flatbuffers::Follow<'a> for MediaTrackMetadata {
711  type Inner = Self;
712  #[inline]
713  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
714    let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
715    Self(b)
716  }
717}
718
719impl ::flatbuffers::Push for MediaTrackMetadata {
720    type Output = MediaTrackMetadata;
721    #[inline]
722    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
723        unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
724    }
725}
726
727impl ::flatbuffers::EndianScalar for MediaTrackMetadata {
728  type Scalar = u8;
729  #[inline]
730  fn to_little_endian(self) -> u8 {
731    self.0.to_le()
732  }
733  #[inline]
734  #[allow(clippy::wrong_self_convention)]
735  fn from_little_endian(v: u8) -> Self {
736    let b = u8::from_le(v);
737    Self(b)
738  }
739}
740
741impl<'a> ::flatbuffers::Verifiable for MediaTrackMetadata {
742  #[inline]
743  fn run_verifier(
744    v: &mut ::flatbuffers::Verifier, pos: usize
745  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
746    u8::run_verifier(v, pos)
747  }
748}
749
750impl ::flatbuffers::SimpleToVerifyInSlice for MediaTrackMetadata {}
751pub struct MediaTrackMetadataUnionTableOffset {}
752
753#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
754pub const ENUM_MIN_MEDIA_TRACK_TYPE: u8 = 0;
755#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
756pub const ENUM_MAX_MEDIA_TRACK_TYPE: u8 = 2;
757#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
758#[allow(non_camel_case_types)]
759pub const ENUM_VALUES_MEDIA_TRACK_TYPE: [MediaTrackType; 3] = [
760  MediaTrackType::Video,
761  MediaTrackType::Audio,
762  MediaTrackType::Subtitle,
763];
764
765#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
766#[repr(transparent)]
767pub struct MediaTrackType(pub u8);
768#[allow(non_upper_case_globals)]
769impl MediaTrackType {
770  pub const Video: Self = Self(0);
771  pub const Audio: Self = Self(1);
772  pub const Subtitle: Self = Self(2);
773
774  pub const ENUM_MIN: u8 = 0;
775  pub const ENUM_MAX: u8 = 2;
776  pub const ENUM_VALUES: &'static [Self] = &[
777    Self::Video,
778    Self::Audio,
779    Self::Subtitle,
780  ];
781  /// Returns the variant's name or "" if unknown.
782  pub fn variant_name(self) -> Option<&'static str> {
783    match self {
784      Self::Video => Some("Video"),
785      Self::Audio => Some("Audio"),
786      Self::Subtitle => Some("Subtitle"),
787      _ => None,
788    }
789  }
790}
791impl ::core::fmt::Debug for MediaTrackType {
792  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
793    if let Some(name) = self.variant_name() {
794      f.write_str(name)
795    } else {
796      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
797    }
798  }
799}
800impl<'a> ::flatbuffers::Follow<'a> for MediaTrackType {
801  type Inner = Self;
802  #[inline]
803  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
804    let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
805    Self(b)
806  }
807}
808
809impl ::flatbuffers::Push for MediaTrackType {
810    type Output = MediaTrackType;
811    #[inline]
812    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
813        unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
814    }
815}
816
817impl ::flatbuffers::EndianScalar for MediaTrackType {
818  type Scalar = u8;
819  #[inline]
820  fn to_little_endian(self) -> u8 {
821    self.0.to_le()
822  }
823  #[inline]
824  #[allow(clippy::wrong_self_convention)]
825  fn from_little_endian(v: u8) -> Self {
826    let b = u8::from_le(v);
827    Self(b)
828  }
829}
830
831impl<'a> ::flatbuffers::Verifiable for MediaTrackType {
832  #[inline]
833  fn run_verifier(
834    v: &mut ::flatbuffers::Verifier, pos: usize
835  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
836    u8::run_verifier(v, pos)
837  }
838}
839
840impl ::flatbuffers::SimpleToVerifyInSlice for MediaTrackType {}
841#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
842pub const ENUM_MIN_ERROR_KIND: u8 = 0;
843#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
844pub const ENUM_MAX_ERROR_KIND: u8 = 12;
845#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
846#[allow(non_camel_case_types)]
847pub const ENUM_VALUES_ERROR_KIND: [ErrorKind; 13] = [
848  ErrorKind::InvalidOpcode,
849  ErrorKind::ResourceNotFound,
850  ErrorKind::SeekOutOfRange,
851  ErrorKind::VolumeOutOfRange,
852  ErrorKind::RateOutOfRange,
853  ErrorKind::UnsupportedFormat,
854  ErrorKind::MalformedBody,
855  ErrorKind::InvalidState,
856  ErrorKind::QueuePositionOutOfRange,
857  ErrorKind::QueueRemovePlayingItem,
858  ErrorKind::QueueFull,
859  ErrorKind::InvalidPayloadType,
860  ErrorKind::Internal,
861];
862
863#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
864#[repr(transparent)]
865pub struct ErrorKind(pub u8);
866#[allow(non_upper_case_globals)]
867impl ErrorKind {
868  pub const InvalidOpcode: Self = Self(0);
869  pub const ResourceNotFound: Self = Self(1);
870  pub const SeekOutOfRange: Self = Self(2);
871  pub const VolumeOutOfRange: Self = Self(3);
872  pub const RateOutOfRange: Self = Self(4);
873  pub const UnsupportedFormat: Self = Self(5);
874  pub const MalformedBody: Self = Self(6);
875  pub const InvalidState: Self = Self(7);
876  pub const QueuePositionOutOfRange: Self = Self(8);
877  pub const QueueRemovePlayingItem: Self = Self(9);
878  pub const QueueFull: Self = Self(10);
879  pub const InvalidPayloadType: Self = Self(11);
880  pub const Internal: Self = Self(12);
881
882  pub const ENUM_MIN: u8 = 0;
883  pub const ENUM_MAX: u8 = 12;
884  pub const ENUM_VALUES: &'static [Self] = &[
885    Self::InvalidOpcode,
886    Self::ResourceNotFound,
887    Self::SeekOutOfRange,
888    Self::VolumeOutOfRange,
889    Self::RateOutOfRange,
890    Self::UnsupportedFormat,
891    Self::MalformedBody,
892    Self::InvalidState,
893    Self::QueuePositionOutOfRange,
894    Self::QueueRemovePlayingItem,
895    Self::QueueFull,
896    Self::InvalidPayloadType,
897    Self::Internal,
898  ];
899  /// Returns the variant's name or "" if unknown.
900  pub fn variant_name(self) -> Option<&'static str> {
901    match self {
902      Self::InvalidOpcode => Some("InvalidOpcode"),
903      Self::ResourceNotFound => Some("ResourceNotFound"),
904      Self::SeekOutOfRange => Some("SeekOutOfRange"),
905      Self::VolumeOutOfRange => Some("VolumeOutOfRange"),
906      Self::RateOutOfRange => Some("RateOutOfRange"),
907      Self::UnsupportedFormat => Some("UnsupportedFormat"),
908      Self::MalformedBody => Some("MalformedBody"),
909      Self::InvalidState => Some("InvalidState"),
910      Self::QueuePositionOutOfRange => Some("QueuePositionOutOfRange"),
911      Self::QueueRemovePlayingItem => Some("QueueRemovePlayingItem"),
912      Self::QueueFull => Some("QueueFull"),
913      Self::InvalidPayloadType => Some("InvalidPayloadType"),
914      Self::Internal => Some("Internal"),
915      _ => None,
916    }
917  }
918}
919impl ::core::fmt::Debug for ErrorKind {
920  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
921    if let Some(name) = self.variant_name() {
922      f.write_str(name)
923    } else {
924      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
925    }
926  }
927}
928impl<'a> ::flatbuffers::Follow<'a> for ErrorKind {
929  type Inner = Self;
930  #[inline]
931  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
932    let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
933    Self(b)
934  }
935}
936
937impl ::flatbuffers::Push for ErrorKind {
938    type Output = ErrorKind;
939    #[inline]
940    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
941        unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
942    }
943}
944
945impl ::flatbuffers::EndianScalar for ErrorKind {
946  type Scalar = u8;
947  #[inline]
948  fn to_little_endian(self) -> u8 {
949    self.0.to_le()
950  }
951  #[inline]
952  #[allow(clippy::wrong_self_convention)]
953  fn from_little_endian(v: u8) -> Self {
954    let b = u8::from_le(v);
955    Self(b)
956  }
957}
958
959impl<'a> ::flatbuffers::Verifiable for ErrorKind {
960  #[inline]
961  fn run_verifier(
962    v: &mut ::flatbuffers::Verifier, pos: usize
963  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
964    u8::run_verifier(v, pos)
965  }
966}
967
968impl ::flatbuffers::SimpleToVerifyInSlice for ErrorKind {}
969#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
970pub const ENUM_MIN_COMPANION_RESOURCE_SIZE: u8 = 0;
971#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
972pub const ENUM_MAX_COMPANION_RESOURCE_SIZE: u8 = 2;
973#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
974#[allow(non_camel_case_types)]
975pub const ENUM_VALUES_COMPANION_RESOURCE_SIZE: [CompanionResourceSize; 3] = [
976  CompanionResourceSize::NONE,
977  CompanionResourceSize::Unknown,
978  CompanionResourceSize::Known,
979];
980
981#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
982#[repr(transparent)]
983pub struct CompanionResourceSize(pub u8);
984#[allow(non_upper_case_globals)]
985impl CompanionResourceSize {
986  pub const NONE: Self = Self(0);
987  pub const Unknown: Self = Self(1);
988  pub const Known: Self = Self(2);
989
990  pub const ENUM_MIN: u8 = 0;
991  pub const ENUM_MAX: u8 = 2;
992  pub const ENUM_VALUES: &'static [Self] = &[
993    Self::NONE,
994    Self::Unknown,
995    Self::Known,
996  ];
997  /// Returns the variant's name or "" if unknown.
998  pub fn variant_name(self) -> Option<&'static str> {
999    match self {
1000      Self::NONE => Some("NONE"),
1001      Self::Unknown => Some("Unknown"),
1002      Self::Known => Some("Known"),
1003      _ => None,
1004    }
1005  }
1006}
1007impl ::core::fmt::Debug for CompanionResourceSize {
1008  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
1009    if let Some(name) = self.variant_name() {
1010      f.write_str(name)
1011    } else {
1012      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
1013    }
1014  }
1015}
1016impl<'a> ::flatbuffers::Follow<'a> for CompanionResourceSize {
1017  type Inner = Self;
1018  #[inline]
1019  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1020    let b = unsafe { ::flatbuffers::read_scalar_at::<u8>(buf, loc) };
1021    Self(b)
1022  }
1023}
1024
1025impl ::flatbuffers::Push for CompanionResourceSize {
1026    type Output = CompanionResourceSize;
1027    #[inline]
1028    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1029        unsafe { ::flatbuffers::emplace_scalar::<u8>(dst, self.0) };
1030    }
1031}
1032
1033impl ::flatbuffers::EndianScalar for CompanionResourceSize {
1034  type Scalar = u8;
1035  #[inline]
1036  fn to_little_endian(self) -> u8 {
1037    self.0.to_le()
1038  }
1039  #[inline]
1040  #[allow(clippy::wrong_self_convention)]
1041  fn from_little_endian(v: u8) -> Self {
1042    let b = u8::from_le(v);
1043    Self(b)
1044  }
1045}
1046
1047impl<'a> ::flatbuffers::Verifiable for CompanionResourceSize {
1048  #[inline]
1049  fn run_verifier(
1050    v: &mut ::flatbuffers::Verifier, pos: usize
1051  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
1052    u8::run_verifier(v, pos)
1053  }
1054}
1055
1056impl ::flatbuffers::SimpleToVerifyInSlice for CompanionResourceSize {}
1057pub struct CompanionResourceSizeUnionTableOffset {}
1058
1059// struct Time, aligned to 8
1060#[repr(transparent)]
1061#[derive(Clone, Copy, PartialEq)]
1062pub struct Time(pub [u8; 8]);
1063impl Default for Time { 
1064  fn default() -> Self { 
1065    Self([0; 8])
1066  }
1067}
1068impl ::core::fmt::Debug for Time {
1069  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
1070    f.debug_struct("Time")
1071      .field("micros", &self.micros())
1072      .finish()
1073  }
1074}
1075
1076impl ::flatbuffers::SimpleToVerifyInSlice for Time {}
1077impl<'a> ::flatbuffers::Follow<'a> for Time {
1078  type Inner = &'a Time;
1079  #[inline]
1080  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1081    unsafe { <&'a Time>::follow(buf, loc) }
1082  }
1083}
1084impl<'a> ::flatbuffers::Follow<'a> for &'a Time {
1085  type Inner = &'a Time;
1086  #[inline]
1087  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1088    unsafe { ::flatbuffers::follow_cast_ref::<Time>(buf, loc) }
1089  }
1090}
1091impl<'b> ::flatbuffers::Push for Time {
1092    type Output = Time;
1093    #[inline]
1094    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1095        let src = unsafe { ::core::slice::from_raw_parts(self as *const Time as *const u8, <Self as ::flatbuffers::Push>::size()) };
1096        dst.copy_from_slice(src);
1097    }
1098    #[inline]
1099    fn alignment() -> ::flatbuffers::PushAlignment {
1100        ::flatbuffers::PushAlignment::new(8)
1101    }
1102}
1103
1104impl<'a> ::flatbuffers::Verifiable for Time {
1105  #[inline]
1106  fn run_verifier(
1107    v: &mut ::flatbuffers::Verifier, pos: usize
1108  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
1109    v.in_buffer::<Self>(pos)
1110  }
1111}
1112
1113impl<'a> Time {
1114  #[allow(clippy::too_many_arguments)]
1115  pub fn new(
1116    micros: u64,
1117  ) -> Self {
1118    let mut s = Self([0; 8]);
1119    s.set_micros(micros);
1120    s
1121  }
1122
1123  pub fn micros(&self) -> u64 {
1124    let mut mem = ::core::mem::MaybeUninit::<<u64 as ::flatbuffers::EndianScalar>::Scalar>::uninit();
1125    // Safety:
1126    // Created from a valid Table for this object
1127    // Which contains a valid value in this slot
1128    ::flatbuffers::EndianScalar::from_little_endian(unsafe {
1129      ::core::ptr::copy_nonoverlapping(
1130        self.0[0..].as_ptr(),
1131        mem.as_mut_ptr() as *mut u8,
1132        ::core::mem::size_of::<<u64 as ::flatbuffers::EndianScalar>::Scalar>(),
1133      );
1134      mem.assume_init()
1135    })
1136  }
1137
1138  pub fn set_micros(&mut self, x: u64) {
1139    let x_le = ::flatbuffers::EndianScalar::to_little_endian(x);
1140    // Safety:
1141    // Created from a valid Table for this object
1142    // Which contains a valid value in this slot
1143    unsafe {
1144      ::core::ptr::copy_nonoverlapping(
1145        &x_le as *const _ as *const u8,
1146        self.0[0..].as_mut_ptr(),
1147        ::core::mem::size_of::<<u64 as ::flatbuffers::EndianScalar>::Scalar>(),
1148      );
1149    }
1150  }
1151
1152}
1153
1154// struct VideoResolution, aligned to 4
1155#[repr(transparent)]
1156#[derive(Clone, Copy, PartialEq)]
1157pub struct VideoResolution(pub [u8; 8]);
1158impl Default for VideoResolution { 
1159  fn default() -> Self { 
1160    Self([0; 8])
1161  }
1162}
1163impl ::core::fmt::Debug for VideoResolution {
1164  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
1165    f.debug_struct("VideoResolution")
1166      .field("width", &self.width())
1167      .field("height", &self.height())
1168      .finish()
1169  }
1170}
1171
1172impl ::flatbuffers::SimpleToVerifyInSlice for VideoResolution {}
1173impl<'a> ::flatbuffers::Follow<'a> for VideoResolution {
1174  type Inner = &'a VideoResolution;
1175  #[inline]
1176  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1177    unsafe { <&'a VideoResolution>::follow(buf, loc) }
1178  }
1179}
1180impl<'a> ::flatbuffers::Follow<'a> for &'a VideoResolution {
1181  type Inner = &'a VideoResolution;
1182  #[inline]
1183  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1184    unsafe { ::flatbuffers::follow_cast_ref::<VideoResolution>(buf, loc) }
1185  }
1186}
1187impl<'b> ::flatbuffers::Push for VideoResolution {
1188    type Output = VideoResolution;
1189    #[inline]
1190    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1191        let src = unsafe { ::core::slice::from_raw_parts(self as *const VideoResolution as *const u8, <Self as ::flatbuffers::Push>::size()) };
1192        dst.copy_from_slice(src);
1193    }
1194    #[inline]
1195    fn alignment() -> ::flatbuffers::PushAlignment {
1196        ::flatbuffers::PushAlignment::new(4)
1197    }
1198}
1199
1200impl<'a> ::flatbuffers::Verifiable for VideoResolution {
1201  #[inline]
1202  fn run_verifier(
1203    v: &mut ::flatbuffers::Verifier, pos: usize
1204  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
1205    v.in_buffer::<Self>(pos)
1206  }
1207}
1208
1209impl<'a> VideoResolution {
1210  #[allow(clippy::too_many_arguments)]
1211  pub fn new(
1212    width: u32,
1213    height: u32,
1214  ) -> Self {
1215    let mut s = Self([0; 8]);
1216    s.set_width(width);
1217    s.set_height(height);
1218    s
1219  }
1220
1221  pub fn width(&self) -> u32 {
1222    let mut mem = ::core::mem::MaybeUninit::<<u32 as ::flatbuffers::EndianScalar>::Scalar>::uninit();
1223    // Safety:
1224    // Created from a valid Table for this object
1225    // Which contains a valid value in this slot
1226    ::flatbuffers::EndianScalar::from_little_endian(unsafe {
1227      ::core::ptr::copy_nonoverlapping(
1228        self.0[0..].as_ptr(),
1229        mem.as_mut_ptr() as *mut u8,
1230        ::core::mem::size_of::<<u32 as ::flatbuffers::EndianScalar>::Scalar>(),
1231      );
1232      mem.assume_init()
1233    })
1234  }
1235
1236  pub fn set_width(&mut self, x: u32) {
1237    let x_le = ::flatbuffers::EndianScalar::to_little_endian(x);
1238    // Safety:
1239    // Created from a valid Table for this object
1240    // Which contains a valid value in this slot
1241    unsafe {
1242      ::core::ptr::copy_nonoverlapping(
1243        &x_le as *const _ as *const u8,
1244        self.0[0..].as_mut_ptr(),
1245        ::core::mem::size_of::<<u32 as ::flatbuffers::EndianScalar>::Scalar>(),
1246      );
1247    }
1248  }
1249
1250  pub fn height(&self) -> u32 {
1251    let mut mem = ::core::mem::MaybeUninit::<<u32 as ::flatbuffers::EndianScalar>::Scalar>::uninit();
1252    // Safety:
1253    // Created from a valid Table for this object
1254    // Which contains a valid value in this slot
1255    ::flatbuffers::EndianScalar::from_little_endian(unsafe {
1256      ::core::ptr::copy_nonoverlapping(
1257        self.0[4..].as_ptr(),
1258        mem.as_mut_ptr() as *mut u8,
1259        ::core::mem::size_of::<<u32 as ::flatbuffers::EndianScalar>::Scalar>(),
1260      );
1261      mem.assume_init()
1262    })
1263  }
1264
1265  pub fn set_height(&mut self, x: u32) {
1266    let x_le = ::flatbuffers::EndianScalar::to_little_endian(x);
1267    // Safety:
1268    // Created from a valid Table for this object
1269    // Which contains a valid value in this slot
1270    unsafe {
1271      ::core::ptr::copy_nonoverlapping(
1272        &x_le as *const _ as *const u8,
1273        self.0[4..].as_mut_ptr(),
1274        ::core::mem::size_of::<<u32 as ::flatbuffers::EndianScalar>::Scalar>(),
1275      );
1276    }
1277  }
1278
1279}
1280
1281// struct ResourceReadHead, aligned to 8
1282#[repr(transparent)]
1283#[derive(Clone, Copy, PartialEq)]
1284pub struct ResourceReadHead(pub [u8; 16]);
1285impl Default for ResourceReadHead { 
1286  fn default() -> Self { 
1287    Self([0; 16])
1288  }
1289}
1290impl ::core::fmt::Debug for ResourceReadHead {
1291  fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
1292    f.debug_struct("ResourceReadHead")
1293      .field("start", &self.start())
1294      .field("stop_inclusive", &self.stop_inclusive())
1295      .finish()
1296  }
1297}
1298
1299impl ::flatbuffers::SimpleToVerifyInSlice for ResourceReadHead {}
1300impl<'a> ::flatbuffers::Follow<'a> for ResourceReadHead {
1301  type Inner = &'a ResourceReadHead;
1302  #[inline]
1303  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1304    unsafe { <&'a ResourceReadHead>::follow(buf, loc) }
1305  }
1306}
1307impl<'a> ::flatbuffers::Follow<'a> for &'a ResourceReadHead {
1308  type Inner = &'a ResourceReadHead;
1309  #[inline]
1310  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1311    unsafe { ::flatbuffers::follow_cast_ref::<ResourceReadHead>(buf, loc) }
1312  }
1313}
1314impl<'b> ::flatbuffers::Push for ResourceReadHead {
1315    type Output = ResourceReadHead;
1316    #[inline]
1317    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1318        let src = unsafe { ::core::slice::from_raw_parts(self as *const ResourceReadHead as *const u8, <Self as ::flatbuffers::Push>::size()) };
1319        dst.copy_from_slice(src);
1320    }
1321    #[inline]
1322    fn alignment() -> ::flatbuffers::PushAlignment {
1323        ::flatbuffers::PushAlignment::new(8)
1324    }
1325}
1326
1327impl<'a> ::flatbuffers::Verifiable for ResourceReadHead {
1328  #[inline]
1329  fn run_verifier(
1330    v: &mut ::flatbuffers::Verifier, pos: usize
1331  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
1332    v.in_buffer::<Self>(pos)
1333  }
1334}
1335
1336impl<'a> ResourceReadHead {
1337  #[allow(clippy::too_many_arguments)]
1338  pub fn new(
1339    start: u64,
1340    stop_inclusive: u64,
1341  ) -> Self {
1342    let mut s = Self([0; 16]);
1343    s.set_start(start);
1344    s.set_stop_inclusive(stop_inclusive);
1345    s
1346  }
1347
1348  pub fn start(&self) -> u64 {
1349    let mut mem = ::core::mem::MaybeUninit::<<u64 as ::flatbuffers::EndianScalar>::Scalar>::uninit();
1350    // Safety:
1351    // Created from a valid Table for this object
1352    // Which contains a valid value in this slot
1353    ::flatbuffers::EndianScalar::from_little_endian(unsafe {
1354      ::core::ptr::copy_nonoverlapping(
1355        self.0[0..].as_ptr(),
1356        mem.as_mut_ptr() as *mut u8,
1357        ::core::mem::size_of::<<u64 as ::flatbuffers::EndianScalar>::Scalar>(),
1358      );
1359      mem.assume_init()
1360    })
1361  }
1362
1363  pub fn set_start(&mut self, x: u64) {
1364    let x_le = ::flatbuffers::EndianScalar::to_little_endian(x);
1365    // Safety:
1366    // Created from a valid Table for this object
1367    // Which contains a valid value in this slot
1368    unsafe {
1369      ::core::ptr::copy_nonoverlapping(
1370        &x_le as *const _ as *const u8,
1371        self.0[0..].as_mut_ptr(),
1372        ::core::mem::size_of::<<u64 as ::flatbuffers::EndianScalar>::Scalar>(),
1373      );
1374    }
1375  }
1376
1377  pub fn stop_inclusive(&self) -> u64 {
1378    let mut mem = ::core::mem::MaybeUninit::<<u64 as ::flatbuffers::EndianScalar>::Scalar>::uninit();
1379    // Safety:
1380    // Created from a valid Table for this object
1381    // Which contains a valid value in this slot
1382    ::flatbuffers::EndianScalar::from_little_endian(unsafe {
1383      ::core::ptr::copy_nonoverlapping(
1384        self.0[8..].as_ptr(),
1385        mem.as_mut_ptr() as *mut u8,
1386        ::core::mem::size_of::<<u64 as ::flatbuffers::EndianScalar>::Scalar>(),
1387      );
1388      mem.assume_init()
1389    })
1390  }
1391
1392  pub fn set_stop_inclusive(&mut self, x: u64) {
1393    let x_le = ::flatbuffers::EndianScalar::to_little_endian(x);
1394    // Safety:
1395    // Created from a valid Table for this object
1396    // Which contains a valid value in this slot
1397    unsafe {
1398      ::core::ptr::copy_nonoverlapping(
1399        &x_le as *const _ as *const u8,
1400        self.0[8..].as_mut_ptr(),
1401        ::core::mem::size_of::<<u64 as ::flatbuffers::EndianScalar>::Scalar>(),
1402      );
1403    }
1404  }
1405
1406}
1407
1408pub enum PacketOffset {}
1409#[derive(Copy, Clone, PartialEq)]
1410
1411pub struct Packet<'a> {
1412  pub _tab: ::flatbuffers::Table<'a>,
1413}
1414
1415impl<'a> ::flatbuffers::Follow<'a> for Packet<'a> {
1416  type Inner = Packet<'a>;
1417  #[inline]
1418  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1419    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
1420  }
1421}
1422
1423impl<'a> Packet<'a> {
1424  pub const VT_PAYLOAD_TYPE: ::flatbuffers::VOffsetT = 4;
1425  pub const VT_PAYLOAD: ::flatbuffers::VOffsetT = 6;
1426
1427  #[inline]
1428  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
1429    Packet { _tab: table }
1430  }
1431  #[allow(unused_mut)]
1432  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
1433    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
1434    args: &'args PacketArgs
1435  ) -> ::flatbuffers::WIPOffset<Packet<'bldr>> {
1436    let mut builder = PacketBuilder::new(_fbb);
1437    if let Some(x) = args.payload { builder.add_payload(x); }
1438    builder.add_payload_type(args.payload_type);
1439    builder.finish()
1440  }
1441
1442
1443  #[inline]
1444  pub fn payload_type(&self) -> Message {
1445    // Safety:
1446    // Created from valid Table for this object
1447    // which contains a valid value in this slot
1448    unsafe { self._tab.get::<Message>(Packet::VT_PAYLOAD_TYPE, Some(Message::NONE)).unwrap()}
1449  }
1450  #[inline]
1451  pub fn payload(&self) -> Option<::flatbuffers::Table<'a>> {
1452    // Safety:
1453    // Created from valid Table for this object
1454    // which contains a valid value in this slot
1455    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>(Packet::VT_PAYLOAD, None)}
1456  }
1457  #[inline]
1458  #[allow(non_snake_case)]
1459  pub fn payload_as_load(&self) -> Option<Load<'a>> {
1460    if self.payload_type() == Message::Load {
1461      self.payload().map(|t| {
1462       // Safety:
1463       // Created from a valid Table for this object
1464       // Which contains a valid union in this slot
1465       unsafe { Load::init_from_table(t) }
1466     })
1467    } else {
1468      None
1469    }
1470  }
1471
1472  #[inline]
1473  #[allow(non_snake_case)]
1474  pub fn payload_as_progress_changed(&self) -> Option<ProgressChanged<'a>> {
1475    if self.payload_type() == Message::ProgressChanged {
1476      self.payload().map(|t| {
1477       // Safety:
1478       // Created from a valid Table for this object
1479       // Which contains a valid union in this slot
1480       unsafe { ProgressChanged::init_from_table(t) }
1481     })
1482    } else {
1483      None
1484    }
1485  }
1486
1487  #[inline]
1488  #[allow(non_snake_case)]
1489  pub fn payload_as_volume_changed(&self) -> Option<VolumeChanged<'a>> {
1490    if self.payload_type() == Message::VolumeChanged {
1491      self.payload().map(|t| {
1492       // Safety:
1493       // Created from a valid Table for this object
1494       // Which contains a valid union in this slot
1495       unsafe { VolumeChanged::init_from_table(t) }
1496     })
1497    } else {
1498      None
1499    }
1500  }
1501
1502  #[inline]
1503  #[allow(non_snake_case)]
1504  pub fn payload_as_playback_state_changed(&self) -> Option<PlaybackStateChanged<'a>> {
1505    if self.payload_type() == Message::PlaybackStateChanged {
1506      self.payload().map(|t| {
1507       // Safety:
1508       // Created from a valid Table for this object
1509       // Which contains a valid union in this slot
1510       unsafe { PlaybackStateChanged::init_from_table(t) }
1511     })
1512    } else {
1513      None
1514    }
1515  }
1516
1517  #[inline]
1518  #[allow(non_snake_case)]
1519  pub fn payload_as_speed_changed(&self) -> Option<SpeedChanged<'a>> {
1520    if self.payload_type() == Message::SpeedChanged {
1521      self.payload().map(|t| {
1522       // Safety:
1523       // Created from a valid Table for this object
1524       // Which contains a valid union in this slot
1525       unsafe { SpeedChanged::init_from_table(t) }
1526     })
1527    } else {
1528      None
1529    }
1530  }
1531
1532  #[inline]
1533  #[allow(non_snake_case)]
1534  pub fn payload_as_sender_introduction(&self) -> Option<SenderIntroduction<'a>> {
1535    if self.payload_type() == Message::SenderIntroduction {
1536      self.payload().map(|t| {
1537       // Safety:
1538       // Created from a valid Table for this object
1539       // Which contains a valid union in this slot
1540       unsafe { SenderIntroduction::init_from_table(t) }
1541     })
1542    } else {
1543      None
1544    }
1545  }
1546
1547  #[inline]
1548  #[allow(non_snake_case)]
1549  pub fn payload_as_receiver_introduction(&self) -> Option<ReceiverIntroduction<'a>> {
1550    if self.payload_type() == Message::ReceiverIntroduction {
1551      self.payload().map(|t| {
1552       // Safety:
1553       // Created from a valid Table for this object
1554       // Which contains a valid union in this slot
1555       unsafe { ReceiverIntroduction::init_from_table(t) }
1556     })
1557    } else {
1558      None
1559    }
1560  }
1561
1562  #[inline]
1563  #[allow(non_snake_case)]
1564  pub fn payload_as_stop_playback(&self) -> Option<StopPlayback<'a>> {
1565    if self.payload_type() == Message::StopPlayback {
1566      self.payload().map(|t| {
1567       // Safety:
1568       // Created from a valid Table for this object
1569       // Which contains a valid union in this slot
1570       unsafe { StopPlayback::init_from_table(t) }
1571     })
1572    } else {
1573      None
1574    }
1575  }
1576
1577  #[inline]
1578  #[allow(non_snake_case)]
1579  pub fn payload_as_start_mirroring_session(&self) -> Option<StartMirroringSession<'a>> {
1580    if self.payload_type() == Message::StartMirroringSession {
1581      self.payload().map(|t| {
1582       // Safety:
1583       // Created from a valid Table for this object
1584       // Which contains a valid union in this slot
1585       unsafe { StartMirroringSession::init_from_table(t) }
1586     })
1587    } else {
1588      None
1589    }
1590  }
1591
1592  #[inline]
1593  #[allow(non_snake_case)]
1594  pub fn payload_as_mirroring_session_description(&self) -> Option<MirroringSessionDescription<'a>> {
1595    if self.payload_type() == Message::MirroringSessionDescription {
1596      self.payload().map(|t| {
1597       // Safety:
1598       // Created from a valid Table for this object
1599       // Which contains a valid union in this slot
1600       unsafe { MirroringSessionDescription::init_from_table(t) }
1601     })
1602    } else {
1603      None
1604    }
1605  }
1606
1607  #[inline]
1608  #[allow(non_snake_case)]
1609  pub fn payload_as_queue_insert(&self) -> Option<QueueInsert<'a>> {
1610    if self.payload_type() == Message::QueueInsert {
1611      self.payload().map(|t| {
1612       // Safety:
1613       // Created from a valid Table for this object
1614       // Which contains a valid union in this slot
1615       unsafe { QueueInsert::init_from_table(t) }
1616     })
1617    } else {
1618      None
1619    }
1620  }
1621
1622  #[inline]
1623  #[allow(non_snake_case)]
1624  pub fn payload_as_queue_remove(&self) -> Option<QueueRemove<'a>> {
1625    if self.payload_type() == Message::QueueRemove {
1626      self.payload().map(|t| {
1627       // Safety:
1628       // Created from a valid Table for this object
1629       // Which contains a valid union in this slot
1630       unsafe { QueueRemove::init_from_table(t) }
1631     })
1632    } else {
1633      None
1634    }
1635  }
1636
1637  #[inline]
1638  #[allow(non_snake_case)]
1639  pub fn payload_as_tracks_available(&self) -> Option<TracksAvailable<'a>> {
1640    if self.payload_type() == Message::TracksAvailable {
1641      self.payload().map(|t| {
1642       // Safety:
1643       // Created from a valid Table for this object
1644       // Which contains a valid union in this slot
1645       unsafe { TracksAvailable::init_from_table(t) }
1646     })
1647    } else {
1648      None
1649    }
1650  }
1651
1652  #[inline]
1653  #[allow(non_snake_case)]
1654  pub fn payload_as_change_track(&self) -> Option<ChangeTrack<'a>> {
1655    if self.payload_type() == Message::ChangeTrack {
1656      self.payload().map(|t| {
1657       // Safety:
1658       // Created from a valid Table for this object
1659       // Which contains a valid union in this slot
1660       unsafe { ChangeTrack::init_from_table(t) }
1661     })
1662    } else {
1663      None
1664    }
1665  }
1666
1667  #[inline]
1668  #[allow(non_snake_case)]
1669  pub fn payload_as_queue_item_selected(&self) -> Option<QueueItemSelected<'a>> {
1670    if self.payload_type() == Message::QueueItemSelected {
1671      self.payload().map(|t| {
1672       // Safety:
1673       // Created from a valid Table for this object
1674       // Which contains a valid union in this slot
1675       unsafe { QueueItemSelected::init_from_table(t) }
1676     })
1677    } else {
1678      None
1679    }
1680  }
1681
1682  #[inline]
1683  #[allow(non_snake_case)]
1684  pub fn payload_as_add_subtitle_source(&self) -> Option<AddSubtitleSource<'a>> {
1685    if self.payload_type() == Message::AddSubtitleSource {
1686      self.payload().map(|t| {
1687       // Safety:
1688       // Created from a valid Table for this object
1689       // Which contains a valid union in this slot
1690       unsafe { AddSubtitleSource::init_from_table(t) }
1691     })
1692    } else {
1693      None
1694    }
1695  }
1696
1697  #[inline]
1698  #[allow(non_snake_case)]
1699  pub fn payload_as_set_progress_update_interval(&self) -> Option<SetProgressUpdateInterval<'a>> {
1700    if self.payload_type() == Message::SetProgressUpdateInterval {
1701      self.payload().map(|t| {
1702       // Safety:
1703       // Created from a valid Table for this object
1704       // Which contains a valid union in this slot
1705       unsafe { SetProgressUpdateInterval::init_from_table(t) }
1706     })
1707    } else {
1708      None
1709    }
1710  }
1711
1712  #[inline]
1713  #[allow(non_snake_case)]
1714  pub fn payload_as_companion_hello_request(&self) -> Option<CompanionHelloRequest<'a>> {
1715    if self.payload_type() == Message::CompanionHelloRequest {
1716      self.payload().map(|t| {
1717       // Safety:
1718       // Created from a valid Table for this object
1719       // Which contains a valid union in this slot
1720       unsafe { CompanionHelloRequest::init_from_table(t) }
1721     })
1722    } else {
1723      None
1724    }
1725  }
1726
1727  #[inline]
1728  #[allow(non_snake_case)]
1729  pub fn payload_as_companion_hello_response(&self) -> Option<CompanionHelloResponse<'a>> {
1730    if self.payload_type() == Message::CompanionHelloResponse {
1731      self.payload().map(|t| {
1732       // Safety:
1733       // Created from a valid Table for this object
1734       // Which contains a valid union in this slot
1735       unsafe { CompanionHelloResponse::init_from_table(t) }
1736     })
1737    } else {
1738      None
1739    }
1740  }
1741
1742  #[inline]
1743  #[allow(non_snake_case)]
1744  pub fn payload_as_companion_resource_info_request(&self) -> Option<CompanionResourceInfoRequest<'a>> {
1745    if self.payload_type() == Message::CompanionResourceInfoRequest {
1746      self.payload().map(|t| {
1747       // Safety:
1748       // Created from a valid Table for this object
1749       // Which contains a valid union in this slot
1750       unsafe { CompanionResourceInfoRequest::init_from_table(t) }
1751     })
1752    } else {
1753      None
1754    }
1755  }
1756
1757  #[inline]
1758  #[allow(non_snake_case)]
1759  pub fn payload_as_companion_resource_info_response(&self) -> Option<CompanionResourceInfoResponse<'a>> {
1760    if self.payload_type() == Message::CompanionResourceInfoResponse {
1761      self.payload().map(|t| {
1762       // Safety:
1763       // Created from a valid Table for this object
1764       // Which contains a valid union in this slot
1765       unsafe { CompanionResourceInfoResponse::init_from_table(t) }
1766     })
1767    } else {
1768      None
1769    }
1770  }
1771
1772  #[inline]
1773  #[allow(non_snake_case)]
1774  pub fn payload_as_companion_resource_request(&self) -> Option<CompanionResourceRequest<'a>> {
1775    if self.payload_type() == Message::CompanionResourceRequest {
1776      self.payload().map(|t| {
1777       // Safety:
1778       // Created from a valid Table for this object
1779       // Which contains a valid union in this slot
1780       unsafe { CompanionResourceRequest::init_from_table(t) }
1781     })
1782    } else {
1783      None
1784    }
1785  }
1786
1787  #[inline]
1788  #[allow(non_snake_case)]
1789  pub fn payload_as_error(&self) -> Option<Error<'a>> {
1790    if self.payload_type() == Message::Error {
1791      self.payload().map(|t| {
1792       // Safety:
1793       // Created from a valid Table for this object
1794       // Which contains a valid union in this slot
1795       unsafe { Error::init_from_table(t) }
1796     })
1797    } else {
1798      None
1799    }
1800  }
1801
1802}
1803
1804impl ::flatbuffers::Verifiable for Packet<'_> {
1805  #[inline]
1806  fn run_verifier(
1807    v: &mut ::flatbuffers::Verifier, pos: usize
1808  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
1809    v.visit_table(pos)?
1810     .visit_union::<Message, _>("payload_type", Self::VT_PAYLOAD_TYPE, "payload", Self::VT_PAYLOAD, false, |key, v, pos| {
1811        match key {
1812          Message::Load => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<Load>>("Message::Load", pos),
1813          Message::ProgressChanged => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<ProgressChanged>>("Message::ProgressChanged", pos),
1814          Message::VolumeChanged => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<VolumeChanged>>("Message::VolumeChanged", pos),
1815          Message::PlaybackStateChanged => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<PlaybackStateChanged>>("Message::PlaybackStateChanged", pos),
1816          Message::SpeedChanged => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<SpeedChanged>>("Message::SpeedChanged", pos),
1817          Message::SenderIntroduction => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<SenderIntroduction>>("Message::SenderIntroduction", pos),
1818          Message::ReceiverIntroduction => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<ReceiverIntroduction>>("Message::ReceiverIntroduction", pos),
1819          Message::StopPlayback => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<StopPlayback>>("Message::StopPlayback", pos),
1820          Message::StartMirroringSession => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<StartMirroringSession>>("Message::StartMirroringSession", pos),
1821          Message::MirroringSessionDescription => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<MirroringSessionDescription>>("Message::MirroringSessionDescription", pos),
1822          Message::QueueInsert => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<QueueInsert>>("Message::QueueInsert", pos),
1823          Message::QueueRemove => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<QueueRemove>>("Message::QueueRemove", pos),
1824          Message::TracksAvailable => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<TracksAvailable>>("Message::TracksAvailable", pos),
1825          Message::ChangeTrack => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<ChangeTrack>>("Message::ChangeTrack", pos),
1826          Message::QueueItemSelected => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<QueueItemSelected>>("Message::QueueItemSelected", pos),
1827          Message::AddSubtitleSource => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<AddSubtitleSource>>("Message::AddSubtitleSource", pos),
1828          Message::SetProgressUpdateInterval => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<SetProgressUpdateInterval>>("Message::SetProgressUpdateInterval", pos),
1829          Message::CompanionHelloRequest => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<CompanionHelloRequest>>("Message::CompanionHelloRequest", pos),
1830          Message::CompanionHelloResponse => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<CompanionHelloResponse>>("Message::CompanionHelloResponse", pos),
1831          Message::CompanionResourceInfoRequest => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<CompanionResourceInfoRequest>>("Message::CompanionResourceInfoRequest", pos),
1832          Message::CompanionResourceInfoResponse => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<CompanionResourceInfoResponse>>("Message::CompanionResourceInfoResponse", pos),
1833          Message::CompanionResourceRequest => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<CompanionResourceRequest>>("Message::CompanionResourceRequest", pos),
1834          Message::Error => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<Error>>("Message::Error", pos),
1835          _ => Ok(()),
1836        }
1837     })?
1838     .finish();
1839    Ok(())
1840  }
1841}
1842pub struct PacketArgs {
1843    pub payload_type: Message,
1844    pub payload: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>,
1845}
1846impl<'a> Default for PacketArgs {
1847  #[inline]
1848  fn default() -> Self {
1849    PacketArgs {
1850      payload_type: Message::NONE,
1851      payload: None,
1852    }
1853  }
1854}
1855
1856pub struct PacketBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
1857  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
1858  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
1859}
1860impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PacketBuilder<'a, 'b, A> {
1861  #[inline]
1862  pub fn add_payload_type(&mut self, payload_type: Message) {
1863    self.fbb_.push_slot::<Message>(Packet::VT_PAYLOAD_TYPE, payload_type, Message::NONE);
1864  }
1865  #[inline]
1866  pub fn add_payload(&mut self, payload: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>) {
1867    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Packet::VT_PAYLOAD, payload);
1868  }
1869  #[inline]
1870  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PacketBuilder<'a, 'b, A> {
1871    let start = _fbb.start_table();
1872    PacketBuilder {
1873      fbb_: _fbb,
1874      start_: start,
1875    }
1876  }
1877  #[inline]
1878  pub fn finish(self) -> ::flatbuffers::WIPOffset<Packet<'a>> {
1879    let o = self.fbb_.end_table(self.start_);
1880    ::flatbuffers::WIPOffset::new(o.value())
1881  }
1882}
1883
1884impl ::core::fmt::Debug for Packet<'_> {
1885  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1886    let mut ds = f.debug_struct("Packet");
1887      ds.field("payload_type", &self.payload_type());
1888      match self.payload_type() {
1889        Message::Load => {
1890          if let Some(x) = self.payload_as_load() {
1891            ds.field("payload", &x)
1892          } else {
1893            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1894          }
1895        },
1896        Message::ProgressChanged => {
1897          if let Some(x) = self.payload_as_progress_changed() {
1898            ds.field("payload", &x)
1899          } else {
1900            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1901          }
1902        },
1903        Message::VolumeChanged => {
1904          if let Some(x) = self.payload_as_volume_changed() {
1905            ds.field("payload", &x)
1906          } else {
1907            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1908          }
1909        },
1910        Message::PlaybackStateChanged => {
1911          if let Some(x) = self.payload_as_playback_state_changed() {
1912            ds.field("payload", &x)
1913          } else {
1914            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1915          }
1916        },
1917        Message::SpeedChanged => {
1918          if let Some(x) = self.payload_as_speed_changed() {
1919            ds.field("payload", &x)
1920          } else {
1921            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1922          }
1923        },
1924        Message::SenderIntroduction => {
1925          if let Some(x) = self.payload_as_sender_introduction() {
1926            ds.field("payload", &x)
1927          } else {
1928            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1929          }
1930        },
1931        Message::ReceiverIntroduction => {
1932          if let Some(x) = self.payload_as_receiver_introduction() {
1933            ds.field("payload", &x)
1934          } else {
1935            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1936          }
1937        },
1938        Message::StopPlayback => {
1939          if let Some(x) = self.payload_as_stop_playback() {
1940            ds.field("payload", &x)
1941          } else {
1942            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1943          }
1944        },
1945        Message::StartMirroringSession => {
1946          if let Some(x) = self.payload_as_start_mirroring_session() {
1947            ds.field("payload", &x)
1948          } else {
1949            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1950          }
1951        },
1952        Message::MirroringSessionDescription => {
1953          if let Some(x) = self.payload_as_mirroring_session_description() {
1954            ds.field("payload", &x)
1955          } else {
1956            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1957          }
1958        },
1959        Message::QueueInsert => {
1960          if let Some(x) = self.payload_as_queue_insert() {
1961            ds.field("payload", &x)
1962          } else {
1963            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1964          }
1965        },
1966        Message::QueueRemove => {
1967          if let Some(x) = self.payload_as_queue_remove() {
1968            ds.field("payload", &x)
1969          } else {
1970            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1971          }
1972        },
1973        Message::TracksAvailable => {
1974          if let Some(x) = self.payload_as_tracks_available() {
1975            ds.field("payload", &x)
1976          } else {
1977            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1978          }
1979        },
1980        Message::ChangeTrack => {
1981          if let Some(x) = self.payload_as_change_track() {
1982            ds.field("payload", &x)
1983          } else {
1984            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1985          }
1986        },
1987        Message::QueueItemSelected => {
1988          if let Some(x) = self.payload_as_queue_item_selected() {
1989            ds.field("payload", &x)
1990          } else {
1991            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1992          }
1993        },
1994        Message::AddSubtitleSource => {
1995          if let Some(x) = self.payload_as_add_subtitle_source() {
1996            ds.field("payload", &x)
1997          } else {
1998            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
1999          }
2000        },
2001        Message::SetProgressUpdateInterval => {
2002          if let Some(x) = self.payload_as_set_progress_update_interval() {
2003            ds.field("payload", &x)
2004          } else {
2005            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
2006          }
2007        },
2008        Message::CompanionHelloRequest => {
2009          if let Some(x) = self.payload_as_companion_hello_request() {
2010            ds.field("payload", &x)
2011          } else {
2012            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
2013          }
2014        },
2015        Message::CompanionHelloResponse => {
2016          if let Some(x) = self.payload_as_companion_hello_response() {
2017            ds.field("payload", &x)
2018          } else {
2019            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
2020          }
2021        },
2022        Message::CompanionResourceInfoRequest => {
2023          if let Some(x) = self.payload_as_companion_resource_info_request() {
2024            ds.field("payload", &x)
2025          } else {
2026            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
2027          }
2028        },
2029        Message::CompanionResourceInfoResponse => {
2030          if let Some(x) = self.payload_as_companion_resource_info_response() {
2031            ds.field("payload", &x)
2032          } else {
2033            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
2034          }
2035        },
2036        Message::CompanionResourceRequest => {
2037          if let Some(x) = self.payload_as_companion_resource_request() {
2038            ds.field("payload", &x)
2039          } else {
2040            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
2041          }
2042        },
2043        Message::Error => {
2044          if let Some(x) = self.payload_as_error() {
2045            ds.field("payload", &x)
2046          } else {
2047            ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.")
2048          }
2049        },
2050        _ => {
2051          let x: Option<()> = None;
2052          ds.field("payload", &x)
2053        },
2054      };
2055      ds.finish()
2056  }
2057}
2058pub enum ChapterOffset {}
2059#[derive(Copy, Clone, PartialEq)]
2060
2061pub struct Chapter<'a> {
2062  pub _tab: ::flatbuffers::Table<'a>,
2063}
2064
2065impl<'a> ::flatbuffers::Follow<'a> for Chapter<'a> {
2066  type Inner = Chapter<'a>;
2067  #[inline]
2068  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2069    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
2070  }
2071}
2072
2073impl<'a> Chapter<'a> {
2074  pub const VT_START: ::flatbuffers::VOffsetT = 4;
2075  pub const VT_LENGTH: ::flatbuffers::VOffsetT = 6;
2076  pub const VT_TITLE: ::flatbuffers::VOffsetT = 8;
2077  pub const VT_SKIP_LABEL: ::flatbuffers::VOffsetT = 10;
2078
2079  #[inline]
2080  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
2081    Chapter { _tab: table }
2082  }
2083  #[allow(unused_mut)]
2084  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
2085    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
2086    args: &'args ChapterArgs<'args>
2087  ) -> ::flatbuffers::WIPOffset<Chapter<'bldr>> {
2088    let mut builder = ChapterBuilder::new(_fbb);
2089    if let Some(x) = args.skip_label { builder.add_skip_label(x); }
2090    if let Some(x) = args.title { builder.add_title(x); }
2091    if let Some(x) = args.length { builder.add_length(x); }
2092    if let Some(x) = args.start { builder.add_start(x); }
2093    builder.finish()
2094  }
2095
2096
2097  #[inline]
2098  pub fn start(&self) -> Option<&'a Time> {
2099    // Safety:
2100    // Created from valid Table for this object
2101    // which contains a valid value in this slot
2102    unsafe { self._tab.get::<Time>(Chapter::VT_START, None)}
2103  }
2104  #[inline]
2105  pub fn length(&self) -> Option<&'a Time> {
2106    // Safety:
2107    // Created from valid Table for this object
2108    // which contains a valid value in this slot
2109    unsafe { self._tab.get::<Time>(Chapter::VT_LENGTH, None)}
2110  }
2111  #[inline]
2112  pub fn title(&self) -> &'a str {
2113    // Safety:
2114    // Created from valid Table for this object
2115    // which contains a valid value in this slot
2116    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Chapter::VT_TITLE, None).unwrap()}
2117  }
2118  #[inline]
2119  pub fn skip_label(&self) -> Option<&'a str> {
2120    // Safety:
2121    // Created from valid Table for this object
2122    // which contains a valid value in this slot
2123    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Chapter::VT_SKIP_LABEL, None)}
2124  }
2125}
2126
2127impl ::flatbuffers::Verifiable for Chapter<'_> {
2128  #[inline]
2129  fn run_verifier(
2130    v: &mut ::flatbuffers::Verifier, pos: usize
2131  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
2132    v.visit_table(pos)?
2133     .visit_field::<Time>("start", Self::VT_START, false)?
2134     .visit_field::<Time>("length", Self::VT_LENGTH, false)?
2135     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("title", Self::VT_TITLE, true)?
2136     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("skip_label", Self::VT_SKIP_LABEL, false)?
2137     .finish();
2138    Ok(())
2139  }
2140}
2141pub struct ChapterArgs<'a> {
2142    pub start: Option<&'a Time>,
2143    pub length: Option<&'a Time>,
2144    pub title: Option<::flatbuffers::WIPOffset<&'a str>>,
2145    pub skip_label: Option<::flatbuffers::WIPOffset<&'a str>>,
2146}
2147impl<'a> Default for ChapterArgs<'a> {
2148  #[inline]
2149  fn default() -> Self {
2150    ChapterArgs {
2151      start: None,
2152      length: None,
2153      title: None, // required field
2154      skip_label: None,
2155    }
2156  }
2157}
2158
2159pub struct ChapterBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
2160  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
2161  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
2162}
2163impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> ChapterBuilder<'a, 'b, A> {
2164  #[inline]
2165  pub fn add_start(&mut self, start: &Time) {
2166    self.fbb_.push_slot_always::<&Time>(Chapter::VT_START, start);
2167  }
2168  #[inline]
2169  pub fn add_length(&mut self, length: &Time) {
2170    self.fbb_.push_slot_always::<&Time>(Chapter::VT_LENGTH, length);
2171  }
2172  #[inline]
2173  pub fn add_title(&mut self, title: ::flatbuffers::WIPOffset<&'b  str>) {
2174    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Chapter::VT_TITLE, title);
2175  }
2176  #[inline]
2177  pub fn add_skip_label(&mut self, skip_label: ::flatbuffers::WIPOffset<&'b  str>) {
2178    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Chapter::VT_SKIP_LABEL, skip_label);
2179  }
2180  #[inline]
2181  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> ChapterBuilder<'a, 'b, A> {
2182    let start = _fbb.start_table();
2183    ChapterBuilder {
2184      fbb_: _fbb,
2185      start_: start,
2186    }
2187  }
2188  #[inline]
2189  pub fn finish(self) -> ::flatbuffers::WIPOffset<Chapter<'a>> {
2190    let o = self.fbb_.end_table(self.start_);
2191    self.fbb_.required(o, Chapter::VT_TITLE,"title");
2192    ::flatbuffers::WIPOffset::new(o.value())
2193  }
2194}
2195
2196impl ::core::fmt::Debug for Chapter<'_> {
2197  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2198    let mut ds = f.debug_struct("Chapter");
2199      ds.field("start", &self.start());
2200      ds.field("length", &self.length());
2201      ds.field("title", &self.title());
2202      ds.field("skip_label", &self.skip_label());
2203      ds.finish()
2204  }
2205}
2206pub enum VideoMetadataOffset {}
2207#[derive(Copy, Clone, PartialEq)]
2208
2209pub struct VideoMetadata<'a> {
2210  pub _tab: ::flatbuffers::Table<'a>,
2211}
2212
2213impl<'a> ::flatbuffers::Follow<'a> for VideoMetadata<'a> {
2214  type Inner = VideoMetadata<'a>;
2215  #[inline]
2216  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2217    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
2218  }
2219}
2220
2221impl<'a> VideoMetadata<'a> {
2222  pub const VT_CHAPTERS: ::flatbuffers::VOffsetT = 4;
2223
2224  #[inline]
2225  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
2226    VideoMetadata { _tab: table }
2227  }
2228  #[allow(unused_mut)]
2229  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
2230    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
2231    args: &'args VideoMetadataArgs<'args>
2232  ) -> ::flatbuffers::WIPOffset<VideoMetadata<'bldr>> {
2233    let mut builder = VideoMetadataBuilder::new(_fbb);
2234    if let Some(x) = args.chapters { builder.add_chapters(x); }
2235    builder.finish()
2236  }
2237
2238
2239  #[inline]
2240  pub fn chapters(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Chapter<'a>>>> {
2241    // Safety:
2242    // Created from valid Table for this object
2243    // which contains a valid value in this slot
2244    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Chapter>>>>(VideoMetadata::VT_CHAPTERS, None)}
2245  }
2246}
2247
2248impl ::flatbuffers::Verifiable for VideoMetadata<'_> {
2249  #[inline]
2250  fn run_verifier(
2251    v: &mut ::flatbuffers::Verifier, pos: usize
2252  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
2253    v.visit_table(pos)?
2254     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Chapter>>>>("chapters", Self::VT_CHAPTERS, false)?
2255     .finish();
2256    Ok(())
2257  }
2258}
2259pub struct VideoMetadataArgs<'a> {
2260    pub chapters: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Chapter<'a>>>>>,
2261}
2262impl<'a> Default for VideoMetadataArgs<'a> {
2263  #[inline]
2264  fn default() -> Self {
2265    VideoMetadataArgs {
2266      chapters: None,
2267    }
2268  }
2269}
2270
2271pub struct VideoMetadataBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
2272  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
2273  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
2274}
2275impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> VideoMetadataBuilder<'a, 'b, A> {
2276  #[inline]
2277  pub fn add_chapters(&mut self, chapters: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Chapter<'b >>>>) {
2278    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(VideoMetadata::VT_CHAPTERS, chapters);
2279  }
2280  #[inline]
2281  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> VideoMetadataBuilder<'a, 'b, A> {
2282    let start = _fbb.start_table();
2283    VideoMetadataBuilder {
2284      fbb_: _fbb,
2285      start_: start,
2286    }
2287  }
2288  #[inline]
2289  pub fn finish(self) -> ::flatbuffers::WIPOffset<VideoMetadata<'a>> {
2290    let o = self.fbb_.end_table(self.start_);
2291    ::flatbuffers::WIPOffset::new(o.value())
2292  }
2293}
2294
2295impl ::core::fmt::Debug for VideoMetadata<'_> {
2296  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2297    let mut ds = f.debug_struct("VideoMetadata");
2298      ds.field("chapters", &self.chapters());
2299      ds.finish()
2300  }
2301}
2302pub enum AudioMetadataOffset {}
2303#[derive(Copy, Clone, PartialEq)]
2304
2305pub struct AudioMetadata<'a> {
2306  pub _tab: ::flatbuffers::Table<'a>,
2307}
2308
2309impl<'a> ::flatbuffers::Follow<'a> for AudioMetadata<'a> {
2310  type Inner = AudioMetadata<'a>;
2311  #[inline]
2312  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2313    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
2314  }
2315}
2316
2317impl<'a> AudioMetadata<'a> {
2318  pub const VT_ARTIST: ::flatbuffers::VOffsetT = 4;
2319  pub const VT_ALBUM: ::flatbuffers::VOffsetT = 6;
2320  pub const VT_CHAPTERS: ::flatbuffers::VOffsetT = 8;
2321
2322  #[inline]
2323  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
2324    AudioMetadata { _tab: table }
2325  }
2326  #[allow(unused_mut)]
2327  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
2328    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
2329    args: &'args AudioMetadataArgs<'args>
2330  ) -> ::flatbuffers::WIPOffset<AudioMetadata<'bldr>> {
2331    let mut builder = AudioMetadataBuilder::new(_fbb);
2332    if let Some(x) = args.chapters { builder.add_chapters(x); }
2333    if let Some(x) = args.album { builder.add_album(x); }
2334    if let Some(x) = args.artist { builder.add_artist(x); }
2335    builder.finish()
2336  }
2337
2338
2339  #[inline]
2340  pub fn artist(&self) -> Option<&'a str> {
2341    // Safety:
2342    // Created from valid Table for this object
2343    // which contains a valid value in this slot
2344    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(AudioMetadata::VT_ARTIST, None)}
2345  }
2346  #[inline]
2347  pub fn album(&self) -> Option<&'a str> {
2348    // Safety:
2349    // Created from valid Table for this object
2350    // which contains a valid value in this slot
2351    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(AudioMetadata::VT_ALBUM, None)}
2352  }
2353  #[inline]
2354  pub fn chapters(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Chapter<'a>>>> {
2355    // Safety:
2356    // Created from valid Table for this object
2357    // which contains a valid value in this slot
2358    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Chapter>>>>(AudioMetadata::VT_CHAPTERS, None)}
2359  }
2360}
2361
2362impl ::flatbuffers::Verifiable for AudioMetadata<'_> {
2363  #[inline]
2364  fn run_verifier(
2365    v: &mut ::flatbuffers::Verifier, pos: usize
2366  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
2367    v.visit_table(pos)?
2368     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("artist", Self::VT_ARTIST, false)?
2369     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("album", Self::VT_ALBUM, false)?
2370     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Chapter>>>>("chapters", Self::VT_CHAPTERS, false)?
2371     .finish();
2372    Ok(())
2373  }
2374}
2375pub struct AudioMetadataArgs<'a> {
2376    pub artist: Option<::flatbuffers::WIPOffset<&'a str>>,
2377    pub album: Option<::flatbuffers::WIPOffset<&'a str>>,
2378    pub chapters: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Chapter<'a>>>>>,
2379}
2380impl<'a> Default for AudioMetadataArgs<'a> {
2381  #[inline]
2382  fn default() -> Self {
2383    AudioMetadataArgs {
2384      artist: None,
2385      album: None,
2386      chapters: None,
2387    }
2388  }
2389}
2390
2391pub struct AudioMetadataBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
2392  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
2393  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
2394}
2395impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> AudioMetadataBuilder<'a, 'b, A> {
2396  #[inline]
2397  pub fn add_artist(&mut self, artist: ::flatbuffers::WIPOffset<&'b  str>) {
2398    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(AudioMetadata::VT_ARTIST, artist);
2399  }
2400  #[inline]
2401  pub fn add_album(&mut self, album: ::flatbuffers::WIPOffset<&'b  str>) {
2402    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(AudioMetadata::VT_ALBUM, album);
2403  }
2404  #[inline]
2405  pub fn add_chapters(&mut self, chapters: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Chapter<'b >>>>) {
2406    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(AudioMetadata::VT_CHAPTERS, chapters);
2407  }
2408  #[inline]
2409  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> AudioMetadataBuilder<'a, 'b, A> {
2410    let start = _fbb.start_table();
2411    AudioMetadataBuilder {
2412      fbb_: _fbb,
2413      start_: start,
2414    }
2415  }
2416  #[inline]
2417  pub fn finish(self) -> ::flatbuffers::WIPOffset<AudioMetadata<'a>> {
2418    let o = self.fbb_.end_table(self.start_);
2419    ::flatbuffers::WIPOffset::new(o.value())
2420  }
2421}
2422
2423impl ::core::fmt::Debug for AudioMetadata<'_> {
2424  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2425    let mut ds = f.debug_struct("AudioMetadata");
2426      ds.field("artist", &self.artist());
2427      ds.field("album", &self.album());
2428      ds.field("chapters", &self.chapters());
2429      ds.finish()
2430  }
2431}
2432pub enum RequestHeaderOffset {}
2433#[derive(Copy, Clone, PartialEq)]
2434
2435pub struct RequestHeader<'a> {
2436  pub _tab: ::flatbuffers::Table<'a>,
2437}
2438
2439impl<'a> ::flatbuffers::Follow<'a> for RequestHeader<'a> {
2440  type Inner = RequestHeader<'a>;
2441  #[inline]
2442  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2443    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
2444  }
2445}
2446
2447impl<'a> RequestHeader<'a> {
2448  pub const VT_KEY: ::flatbuffers::VOffsetT = 4;
2449  pub const VT_VALUE: ::flatbuffers::VOffsetT = 6;
2450
2451  #[inline]
2452  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
2453    RequestHeader { _tab: table }
2454  }
2455  #[allow(unused_mut)]
2456  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
2457    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
2458    args: &'args RequestHeaderArgs<'args>
2459  ) -> ::flatbuffers::WIPOffset<RequestHeader<'bldr>> {
2460    let mut builder = RequestHeaderBuilder::new(_fbb);
2461    if let Some(x) = args.value { builder.add_value(x); }
2462    if let Some(x) = args.key { builder.add_key(x); }
2463    builder.finish()
2464  }
2465
2466
2467  #[inline]
2468  pub fn key(&self) -> &'a str {
2469    // Safety:
2470    // Created from valid Table for this object
2471    // which contains a valid value in this slot
2472    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(RequestHeader::VT_KEY, None).unwrap()}
2473  }
2474  #[inline]
2475  pub fn value(&self) -> &'a str {
2476    // Safety:
2477    // Created from valid Table for this object
2478    // which contains a valid value in this slot
2479    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(RequestHeader::VT_VALUE, None).unwrap()}
2480  }
2481}
2482
2483impl ::flatbuffers::Verifiable for RequestHeader<'_> {
2484  #[inline]
2485  fn run_verifier(
2486    v: &mut ::flatbuffers::Verifier, pos: usize
2487  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
2488    v.visit_table(pos)?
2489     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("key", Self::VT_KEY, true)?
2490     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("value", Self::VT_VALUE, true)?
2491     .finish();
2492    Ok(())
2493  }
2494}
2495pub struct RequestHeaderArgs<'a> {
2496    pub key: Option<::flatbuffers::WIPOffset<&'a str>>,
2497    pub value: Option<::flatbuffers::WIPOffset<&'a str>>,
2498}
2499impl<'a> Default for RequestHeaderArgs<'a> {
2500  #[inline]
2501  fn default() -> Self {
2502    RequestHeaderArgs {
2503      key: None, // required field
2504      value: None, // required field
2505    }
2506  }
2507}
2508
2509pub struct RequestHeaderBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
2510  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
2511  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
2512}
2513impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> RequestHeaderBuilder<'a, 'b, A> {
2514  #[inline]
2515  pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset<&'b  str>) {
2516    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(RequestHeader::VT_KEY, key);
2517  }
2518  #[inline]
2519  pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<&'b  str>) {
2520    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(RequestHeader::VT_VALUE, value);
2521  }
2522  #[inline]
2523  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> RequestHeaderBuilder<'a, 'b, A> {
2524    let start = _fbb.start_table();
2525    RequestHeaderBuilder {
2526      fbb_: _fbb,
2527      start_: start,
2528    }
2529  }
2530  #[inline]
2531  pub fn finish(self) -> ::flatbuffers::WIPOffset<RequestHeader<'a>> {
2532    let o = self.fbb_.end_table(self.start_);
2533    self.fbb_.required(o, RequestHeader::VT_KEY,"key");
2534    self.fbb_.required(o, RequestHeader::VT_VALUE,"value");
2535    ::flatbuffers::WIPOffset::new(o.value())
2536  }
2537}
2538
2539impl ::core::fmt::Debug for RequestHeader<'_> {
2540  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2541    let mut ds = f.debug_struct("RequestHeader");
2542      ds.field("key", &self.key());
2543      ds.field("value", &self.value());
2544      ds.finish()
2545  }
2546}
2547pub enum GenericMetaStringOffset {}
2548#[derive(Copy, Clone, PartialEq)]
2549
2550pub struct GenericMetaString<'a> {
2551  pub _tab: ::flatbuffers::Table<'a>,
2552}
2553
2554impl<'a> ::flatbuffers::Follow<'a> for GenericMetaString<'a> {
2555  type Inner = GenericMetaString<'a>;
2556  #[inline]
2557  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2558    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
2559  }
2560}
2561
2562impl<'a> GenericMetaString<'a> {
2563  pub const VT_VALUE: ::flatbuffers::VOffsetT = 4;
2564
2565  #[inline]
2566  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
2567    GenericMetaString { _tab: table }
2568  }
2569  #[allow(unused_mut)]
2570  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
2571    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
2572    args: &'args GenericMetaStringArgs<'args>
2573  ) -> ::flatbuffers::WIPOffset<GenericMetaString<'bldr>> {
2574    let mut builder = GenericMetaStringBuilder::new(_fbb);
2575    if let Some(x) = args.value { builder.add_value(x); }
2576    builder.finish()
2577  }
2578
2579
2580  #[inline]
2581  pub fn value(&self) -> Option<&'a str> {
2582    // Safety:
2583    // Created from valid Table for this object
2584    // which contains a valid value in this slot
2585    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(GenericMetaString::VT_VALUE, None)}
2586  }
2587}
2588
2589impl ::flatbuffers::Verifiable for GenericMetaString<'_> {
2590  #[inline]
2591  fn run_verifier(
2592    v: &mut ::flatbuffers::Verifier, pos: usize
2593  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
2594    v.visit_table(pos)?
2595     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("value", Self::VT_VALUE, false)?
2596     .finish();
2597    Ok(())
2598  }
2599}
2600pub struct GenericMetaStringArgs<'a> {
2601    pub value: Option<::flatbuffers::WIPOffset<&'a str>>,
2602}
2603impl<'a> Default for GenericMetaStringArgs<'a> {
2604  #[inline]
2605  fn default() -> Self {
2606    GenericMetaStringArgs {
2607      value: None,
2608    }
2609  }
2610}
2611
2612pub struct GenericMetaStringBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
2613  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
2614  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
2615}
2616impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> GenericMetaStringBuilder<'a, 'b, A> {
2617  #[inline]
2618  pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<&'b  str>) {
2619    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(GenericMetaString::VT_VALUE, value);
2620  }
2621  #[inline]
2622  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> GenericMetaStringBuilder<'a, 'b, A> {
2623    let start = _fbb.start_table();
2624    GenericMetaStringBuilder {
2625      fbb_: _fbb,
2626      start_: start,
2627    }
2628  }
2629  #[inline]
2630  pub fn finish(self) -> ::flatbuffers::WIPOffset<GenericMetaString<'a>> {
2631    let o = self.fbb_.end_table(self.start_);
2632    ::flatbuffers::WIPOffset::new(o.value())
2633  }
2634}
2635
2636impl ::core::fmt::Debug for GenericMetaString<'_> {
2637  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2638    let mut ds = f.debug_struct("GenericMetaString");
2639      ds.field("value", &self.value());
2640      ds.finish()
2641  }
2642}
2643pub enum GenericMetaFloatOffset {}
2644#[derive(Copy, Clone, PartialEq)]
2645
2646pub struct GenericMetaFloat<'a> {
2647  pub _tab: ::flatbuffers::Table<'a>,
2648}
2649
2650impl<'a> ::flatbuffers::Follow<'a> for GenericMetaFloat<'a> {
2651  type Inner = GenericMetaFloat<'a>;
2652  #[inline]
2653  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2654    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
2655  }
2656}
2657
2658impl<'a> GenericMetaFloat<'a> {
2659  pub const VT_VALUE: ::flatbuffers::VOffsetT = 4;
2660
2661  #[inline]
2662  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
2663    GenericMetaFloat { _tab: table }
2664  }
2665  #[allow(unused_mut)]
2666  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
2667    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
2668    args: &'args GenericMetaFloatArgs
2669  ) -> ::flatbuffers::WIPOffset<GenericMetaFloat<'bldr>> {
2670    let mut builder = GenericMetaFloatBuilder::new(_fbb);
2671    builder.add_value(args.value);
2672    builder.finish()
2673  }
2674
2675
2676  #[inline]
2677  pub fn value(&self) -> f64 {
2678    // Safety:
2679    // Created from valid Table for this object
2680    // which contains a valid value in this slot
2681    unsafe { self._tab.get::<f64>(GenericMetaFloat::VT_VALUE, Some(0.0)).unwrap()}
2682  }
2683}
2684
2685impl ::flatbuffers::Verifiable for GenericMetaFloat<'_> {
2686  #[inline]
2687  fn run_verifier(
2688    v: &mut ::flatbuffers::Verifier, pos: usize
2689  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
2690    v.visit_table(pos)?
2691     .visit_field::<f64>("value", Self::VT_VALUE, false)?
2692     .finish();
2693    Ok(())
2694  }
2695}
2696pub struct GenericMetaFloatArgs {
2697    pub value: f64,
2698}
2699impl<'a> Default for GenericMetaFloatArgs {
2700  #[inline]
2701  fn default() -> Self {
2702    GenericMetaFloatArgs {
2703      value: 0.0,
2704    }
2705  }
2706}
2707
2708pub struct GenericMetaFloatBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
2709  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
2710  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
2711}
2712impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> GenericMetaFloatBuilder<'a, 'b, A> {
2713  #[inline]
2714  pub fn add_value(&mut self, value: f64) {
2715    self.fbb_.push_slot::<f64>(GenericMetaFloat::VT_VALUE, value, 0.0);
2716  }
2717  #[inline]
2718  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> GenericMetaFloatBuilder<'a, 'b, A> {
2719    let start = _fbb.start_table();
2720    GenericMetaFloatBuilder {
2721      fbb_: _fbb,
2722      start_: start,
2723    }
2724  }
2725  #[inline]
2726  pub fn finish(self) -> ::flatbuffers::WIPOffset<GenericMetaFloat<'a>> {
2727    let o = self.fbb_.end_table(self.start_);
2728    ::flatbuffers::WIPOffset::new(o.value())
2729  }
2730}
2731
2732impl ::core::fmt::Debug for GenericMetaFloat<'_> {
2733  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2734    let mut ds = f.debug_struct("GenericMetaFloat");
2735      ds.field("value", &self.value());
2736      ds.finish()
2737  }
2738}
2739pub enum GenericMetaIntOffset {}
2740#[derive(Copy, Clone, PartialEq)]
2741
2742pub struct GenericMetaInt<'a> {
2743  pub _tab: ::flatbuffers::Table<'a>,
2744}
2745
2746impl<'a> ::flatbuffers::Follow<'a> for GenericMetaInt<'a> {
2747  type Inner = GenericMetaInt<'a>;
2748  #[inline]
2749  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2750    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
2751  }
2752}
2753
2754impl<'a> GenericMetaInt<'a> {
2755  pub const VT_VALUE: ::flatbuffers::VOffsetT = 4;
2756
2757  #[inline]
2758  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
2759    GenericMetaInt { _tab: table }
2760  }
2761  #[allow(unused_mut)]
2762  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
2763    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
2764    args: &'args GenericMetaIntArgs
2765  ) -> ::flatbuffers::WIPOffset<GenericMetaInt<'bldr>> {
2766    let mut builder = GenericMetaIntBuilder::new(_fbb);
2767    builder.add_value(args.value);
2768    builder.finish()
2769  }
2770
2771
2772  #[inline]
2773  pub fn value(&self) -> i64 {
2774    // Safety:
2775    // Created from valid Table for this object
2776    // which contains a valid value in this slot
2777    unsafe { self._tab.get::<i64>(GenericMetaInt::VT_VALUE, Some(0)).unwrap()}
2778  }
2779}
2780
2781impl ::flatbuffers::Verifiable for GenericMetaInt<'_> {
2782  #[inline]
2783  fn run_verifier(
2784    v: &mut ::flatbuffers::Verifier, pos: usize
2785  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
2786    v.visit_table(pos)?
2787     .visit_field::<i64>("value", Self::VT_VALUE, false)?
2788     .finish();
2789    Ok(())
2790  }
2791}
2792pub struct GenericMetaIntArgs {
2793    pub value: i64,
2794}
2795impl<'a> Default for GenericMetaIntArgs {
2796  #[inline]
2797  fn default() -> Self {
2798    GenericMetaIntArgs {
2799      value: 0,
2800    }
2801  }
2802}
2803
2804pub struct GenericMetaIntBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
2805  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
2806  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
2807}
2808impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> GenericMetaIntBuilder<'a, 'b, A> {
2809  #[inline]
2810  pub fn add_value(&mut self, value: i64) {
2811    self.fbb_.push_slot::<i64>(GenericMetaInt::VT_VALUE, value, 0);
2812  }
2813  #[inline]
2814  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> GenericMetaIntBuilder<'a, 'b, A> {
2815    let start = _fbb.start_table();
2816    GenericMetaIntBuilder {
2817      fbb_: _fbb,
2818      start_: start,
2819    }
2820  }
2821  #[inline]
2822  pub fn finish(self) -> ::flatbuffers::WIPOffset<GenericMetaInt<'a>> {
2823    let o = self.fbb_.end_table(self.start_);
2824    ::flatbuffers::WIPOffset::new(o.value())
2825  }
2826}
2827
2828impl ::core::fmt::Debug for GenericMetaInt<'_> {
2829  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2830    let mut ds = f.debug_struct("GenericMetaInt");
2831      ds.field("value", &self.value());
2832      ds.finish()
2833  }
2834}
2835pub enum GenericMetaListOffset {}
2836#[derive(Copy, Clone, PartialEq)]
2837
2838pub struct GenericMetaList<'a> {
2839  pub _tab: ::flatbuffers::Table<'a>,
2840}
2841
2842impl<'a> ::flatbuffers::Follow<'a> for GenericMetaList<'a> {
2843  type Inner = GenericMetaList<'a>;
2844  #[inline]
2845  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2846    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
2847  }
2848}
2849
2850impl<'a> GenericMetaList<'a> {
2851  pub const VT_VALUE: ::flatbuffers::VOffsetT = 4;
2852
2853  #[inline]
2854  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
2855    GenericMetaList { _tab: table }
2856  }
2857  #[allow(unused_mut)]
2858  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
2859    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
2860    args: &'args GenericMetaListArgs<'args>
2861  ) -> ::flatbuffers::WIPOffset<GenericMetaList<'bldr>> {
2862    let mut builder = GenericMetaListBuilder::new(_fbb);
2863    if let Some(x) = args.value { builder.add_value(x); }
2864    builder.finish()
2865  }
2866
2867
2868  #[inline]
2869  pub fn value(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<WrappedGenericMetaValue<'a>>>> {
2870    // Safety:
2871    // Created from valid Table for this object
2872    // which contains a valid value in this slot
2873    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<WrappedGenericMetaValue>>>>(GenericMetaList::VT_VALUE, None)}
2874  }
2875}
2876
2877impl ::flatbuffers::Verifiable for GenericMetaList<'_> {
2878  #[inline]
2879  fn run_verifier(
2880    v: &mut ::flatbuffers::Verifier, pos: usize
2881  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
2882    v.visit_table(pos)?
2883     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<WrappedGenericMetaValue>>>>("value", Self::VT_VALUE, false)?
2884     .finish();
2885    Ok(())
2886  }
2887}
2888pub struct GenericMetaListArgs<'a> {
2889    pub value: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<WrappedGenericMetaValue<'a>>>>>,
2890}
2891impl<'a> Default for GenericMetaListArgs<'a> {
2892  #[inline]
2893  fn default() -> Self {
2894    GenericMetaListArgs {
2895      value: None,
2896    }
2897  }
2898}
2899
2900pub struct GenericMetaListBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
2901  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
2902  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
2903}
2904impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> GenericMetaListBuilder<'a, 'b, A> {
2905  #[inline]
2906  pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<WrappedGenericMetaValue<'b >>>>) {
2907    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(GenericMetaList::VT_VALUE, value);
2908  }
2909  #[inline]
2910  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> GenericMetaListBuilder<'a, 'b, A> {
2911    let start = _fbb.start_table();
2912    GenericMetaListBuilder {
2913      fbb_: _fbb,
2914      start_: start,
2915    }
2916  }
2917  #[inline]
2918  pub fn finish(self) -> ::flatbuffers::WIPOffset<GenericMetaList<'a>> {
2919    let o = self.fbb_.end_table(self.start_);
2920    ::flatbuffers::WIPOffset::new(o.value())
2921  }
2922}
2923
2924impl ::core::fmt::Debug for GenericMetaList<'_> {
2925  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2926    let mut ds = f.debug_struct("GenericMetaList");
2927      ds.field("value", &self.value());
2928      ds.finish()
2929  }
2930}
2931pub enum WrappedGenericMetaValueOffset {}
2932#[derive(Copy, Clone, PartialEq)]
2933
2934pub struct WrappedGenericMetaValue<'a> {
2935  pub _tab: ::flatbuffers::Table<'a>,
2936}
2937
2938impl<'a> ::flatbuffers::Follow<'a> for WrappedGenericMetaValue<'a> {
2939  type Inner = WrappedGenericMetaValue<'a>;
2940  #[inline]
2941  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2942    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
2943  }
2944}
2945
2946impl<'a> WrappedGenericMetaValue<'a> {
2947  pub const VT_VALUE_TYPE: ::flatbuffers::VOffsetT = 4;
2948  pub const VT_VALUE: ::flatbuffers::VOffsetT = 6;
2949
2950  #[inline]
2951  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
2952    WrappedGenericMetaValue { _tab: table }
2953  }
2954  #[allow(unused_mut)]
2955  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
2956    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
2957    args: &'args WrappedGenericMetaValueArgs
2958  ) -> ::flatbuffers::WIPOffset<WrappedGenericMetaValue<'bldr>> {
2959    let mut builder = WrappedGenericMetaValueBuilder::new(_fbb);
2960    if let Some(x) = args.value { builder.add_value(x); }
2961    builder.add_value_type(args.value_type);
2962    builder.finish()
2963  }
2964
2965
2966  #[inline]
2967  pub fn value_type(&self) -> GenericMetaValue {
2968    // Safety:
2969    // Created from valid Table for this object
2970    // which contains a valid value in this slot
2971    unsafe { self._tab.get::<GenericMetaValue>(WrappedGenericMetaValue::VT_VALUE_TYPE, Some(GenericMetaValue::NONE)).unwrap()}
2972  }
2973  #[inline]
2974  pub fn value(&self) -> Option<::flatbuffers::Table<'a>> {
2975    // Safety:
2976    // Created from valid Table for this object
2977    // which contains a valid value in this slot
2978    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>(WrappedGenericMetaValue::VT_VALUE, None)}
2979  }
2980  #[inline]
2981  #[allow(non_snake_case)]
2982  pub fn value_as_string(&self) -> Option<GenericMetaString<'a>> {
2983    if self.value_type() == GenericMetaValue::String {
2984      self.value().map(|t| {
2985       // Safety:
2986       // Created from a valid Table for this object
2987       // Which contains a valid union in this slot
2988       unsafe { GenericMetaString::init_from_table(t) }
2989     })
2990    } else {
2991      None
2992    }
2993  }
2994
2995  #[inline]
2996  #[allow(non_snake_case)]
2997  pub fn value_as_float(&self) -> Option<GenericMetaFloat<'a>> {
2998    if self.value_type() == GenericMetaValue::Float {
2999      self.value().map(|t| {
3000       // Safety:
3001       // Created from a valid Table for this object
3002       // Which contains a valid union in this slot
3003       unsafe { GenericMetaFloat::init_from_table(t) }
3004     })
3005    } else {
3006      None
3007    }
3008  }
3009
3010  #[inline]
3011  #[allow(non_snake_case)]
3012  pub fn value_as_int(&self) -> Option<GenericMetaInt<'a>> {
3013    if self.value_type() == GenericMetaValue::Int {
3014      self.value().map(|t| {
3015       // Safety:
3016       // Created from a valid Table for this object
3017       // Which contains a valid union in this slot
3018       unsafe { GenericMetaInt::init_from_table(t) }
3019     })
3020    } else {
3021      None
3022    }
3023  }
3024
3025  #[inline]
3026  #[allow(non_snake_case)]
3027  pub fn value_as_list(&self) -> Option<GenericMetaList<'a>> {
3028    if self.value_type() == GenericMetaValue::List {
3029      self.value().map(|t| {
3030       // Safety:
3031       // Created from a valid Table for this object
3032       // Which contains a valid union in this slot
3033       unsafe { GenericMetaList::init_from_table(t) }
3034     })
3035    } else {
3036      None
3037    }
3038  }
3039
3040  #[inline]
3041  #[allow(non_snake_case)]
3042  pub fn value_as_kvpair(&self) -> Option<MetadataKV<'a>> {
3043    if self.value_type() == GenericMetaValue::KVPair {
3044      self.value().map(|t| {
3045       // Safety:
3046       // Created from a valid Table for this object
3047       // Which contains a valid union in this slot
3048       unsafe { MetadataKV::init_from_table(t) }
3049     })
3050    } else {
3051      None
3052    }
3053  }
3054
3055}
3056
3057impl ::flatbuffers::Verifiable for WrappedGenericMetaValue<'_> {
3058  #[inline]
3059  fn run_verifier(
3060    v: &mut ::flatbuffers::Verifier, pos: usize
3061  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
3062    v.visit_table(pos)?
3063     .visit_union::<GenericMetaValue, _>("value_type", Self::VT_VALUE_TYPE, "value", Self::VT_VALUE, false, |key, v, pos| {
3064        match key {
3065          GenericMetaValue::String => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<GenericMetaString>>("GenericMetaValue::String", pos),
3066          GenericMetaValue::Float => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<GenericMetaFloat>>("GenericMetaValue::Float", pos),
3067          GenericMetaValue::Int => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<GenericMetaInt>>("GenericMetaValue::Int", pos),
3068          GenericMetaValue::List => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<GenericMetaList>>("GenericMetaValue::List", pos),
3069          GenericMetaValue::KVPair => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<MetadataKV>>("GenericMetaValue::KVPair", pos),
3070          _ => Ok(()),
3071        }
3072     })?
3073     .finish();
3074    Ok(())
3075  }
3076}
3077pub struct WrappedGenericMetaValueArgs {
3078    pub value_type: GenericMetaValue,
3079    pub value: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>,
3080}
3081impl<'a> Default for WrappedGenericMetaValueArgs {
3082  #[inline]
3083  fn default() -> Self {
3084    WrappedGenericMetaValueArgs {
3085      value_type: GenericMetaValue::NONE,
3086      value: None,
3087    }
3088  }
3089}
3090
3091pub struct WrappedGenericMetaValueBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
3092  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
3093  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
3094}
3095impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> WrappedGenericMetaValueBuilder<'a, 'b, A> {
3096  #[inline]
3097  pub fn add_value_type(&mut self, value_type: GenericMetaValue) {
3098    self.fbb_.push_slot::<GenericMetaValue>(WrappedGenericMetaValue::VT_VALUE_TYPE, value_type, GenericMetaValue::NONE);
3099  }
3100  #[inline]
3101  pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>) {
3102    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(WrappedGenericMetaValue::VT_VALUE, value);
3103  }
3104  #[inline]
3105  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> WrappedGenericMetaValueBuilder<'a, 'b, A> {
3106    let start = _fbb.start_table();
3107    WrappedGenericMetaValueBuilder {
3108      fbb_: _fbb,
3109      start_: start,
3110    }
3111  }
3112  #[inline]
3113  pub fn finish(self) -> ::flatbuffers::WIPOffset<WrappedGenericMetaValue<'a>> {
3114    let o = self.fbb_.end_table(self.start_);
3115    ::flatbuffers::WIPOffset::new(o.value())
3116  }
3117}
3118
3119impl ::core::fmt::Debug for WrappedGenericMetaValue<'_> {
3120  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3121    let mut ds = f.debug_struct("WrappedGenericMetaValue");
3122      ds.field("value_type", &self.value_type());
3123      match self.value_type() {
3124        GenericMetaValue::String => {
3125          if let Some(x) = self.value_as_string() {
3126            ds.field("value", &x)
3127          } else {
3128            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
3129          }
3130        },
3131        GenericMetaValue::Float => {
3132          if let Some(x) = self.value_as_float() {
3133            ds.field("value", &x)
3134          } else {
3135            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
3136          }
3137        },
3138        GenericMetaValue::Int => {
3139          if let Some(x) = self.value_as_int() {
3140            ds.field("value", &x)
3141          } else {
3142            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
3143          }
3144        },
3145        GenericMetaValue::List => {
3146          if let Some(x) = self.value_as_list() {
3147            ds.field("value", &x)
3148          } else {
3149            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
3150          }
3151        },
3152        GenericMetaValue::KVPair => {
3153          if let Some(x) = self.value_as_kvpair() {
3154            ds.field("value", &x)
3155          } else {
3156            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
3157          }
3158        },
3159        _ => {
3160          let x: Option<()> = None;
3161          ds.field("value", &x)
3162        },
3163      };
3164      ds.finish()
3165  }
3166}
3167pub enum MetadataKVOffset {}
3168#[derive(Copy, Clone, PartialEq)]
3169
3170pub struct MetadataKV<'a> {
3171  pub _tab: ::flatbuffers::Table<'a>,
3172}
3173
3174impl<'a> ::flatbuffers::Follow<'a> for MetadataKV<'a> {
3175  type Inner = MetadataKV<'a>;
3176  #[inline]
3177  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3178    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
3179  }
3180}
3181
3182impl<'a> MetadataKV<'a> {
3183  pub const VT_KEY: ::flatbuffers::VOffsetT = 4;
3184  pub const VT_VALUE_TYPE: ::flatbuffers::VOffsetT = 6;
3185  pub const VT_VALUE: ::flatbuffers::VOffsetT = 8;
3186
3187  #[inline]
3188  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
3189    MetadataKV { _tab: table }
3190  }
3191  #[allow(unused_mut)]
3192  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
3193    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
3194    args: &'args MetadataKVArgs<'args>
3195  ) -> ::flatbuffers::WIPOffset<MetadataKV<'bldr>> {
3196    let mut builder = MetadataKVBuilder::new(_fbb);
3197    if let Some(x) = args.value { builder.add_value(x); }
3198    if let Some(x) = args.key { builder.add_key(x); }
3199    builder.add_value_type(args.value_type);
3200    builder.finish()
3201  }
3202
3203
3204  #[inline]
3205  pub fn key(&self) -> &'a str {
3206    // Safety:
3207    // Created from valid Table for this object
3208    // which contains a valid value in this slot
3209    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MetadataKV::VT_KEY, None).unwrap()}
3210  }
3211  #[inline]
3212  pub fn value_type(&self) -> GenericMetaValue {
3213    // Safety:
3214    // Created from valid Table for this object
3215    // which contains a valid value in this slot
3216    unsafe { self._tab.get::<GenericMetaValue>(MetadataKV::VT_VALUE_TYPE, Some(GenericMetaValue::NONE)).unwrap()}
3217  }
3218  #[inline]
3219  pub fn value(&self) -> Option<::flatbuffers::Table<'a>> {
3220    // Safety:
3221    // Created from valid Table for this object
3222    // which contains a valid value in this slot
3223    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>(MetadataKV::VT_VALUE, None)}
3224  }
3225  #[inline]
3226  #[allow(non_snake_case)]
3227  pub fn value_as_string(&self) -> Option<GenericMetaString<'a>> {
3228    if self.value_type() == GenericMetaValue::String {
3229      self.value().map(|t| {
3230       // Safety:
3231       // Created from a valid Table for this object
3232       // Which contains a valid union in this slot
3233       unsafe { GenericMetaString::init_from_table(t) }
3234     })
3235    } else {
3236      None
3237    }
3238  }
3239
3240  #[inline]
3241  #[allow(non_snake_case)]
3242  pub fn value_as_float(&self) -> Option<GenericMetaFloat<'a>> {
3243    if self.value_type() == GenericMetaValue::Float {
3244      self.value().map(|t| {
3245       // Safety:
3246       // Created from a valid Table for this object
3247       // Which contains a valid union in this slot
3248       unsafe { GenericMetaFloat::init_from_table(t) }
3249     })
3250    } else {
3251      None
3252    }
3253  }
3254
3255  #[inline]
3256  #[allow(non_snake_case)]
3257  pub fn value_as_int(&self) -> Option<GenericMetaInt<'a>> {
3258    if self.value_type() == GenericMetaValue::Int {
3259      self.value().map(|t| {
3260       // Safety:
3261       // Created from a valid Table for this object
3262       // Which contains a valid union in this slot
3263       unsafe { GenericMetaInt::init_from_table(t) }
3264     })
3265    } else {
3266      None
3267    }
3268  }
3269
3270  #[inline]
3271  #[allow(non_snake_case)]
3272  pub fn value_as_list(&self) -> Option<GenericMetaList<'a>> {
3273    if self.value_type() == GenericMetaValue::List {
3274      self.value().map(|t| {
3275       // Safety:
3276       // Created from a valid Table for this object
3277       // Which contains a valid union in this slot
3278       unsafe { GenericMetaList::init_from_table(t) }
3279     })
3280    } else {
3281      None
3282    }
3283  }
3284
3285  #[inline]
3286  #[allow(non_snake_case)]
3287  pub fn value_as_kvpair(&self) -> Option<MetadataKV<'a>> {
3288    if self.value_type() == GenericMetaValue::KVPair {
3289      self.value().map(|t| {
3290       // Safety:
3291       // Created from a valid Table for this object
3292       // Which contains a valid union in this slot
3293       unsafe { MetadataKV::init_from_table(t) }
3294     })
3295    } else {
3296      None
3297    }
3298  }
3299
3300}
3301
3302impl ::flatbuffers::Verifiable for MetadataKV<'_> {
3303  #[inline]
3304  fn run_verifier(
3305    v: &mut ::flatbuffers::Verifier, pos: usize
3306  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
3307    v.visit_table(pos)?
3308     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("key", Self::VT_KEY, true)?
3309     .visit_union::<GenericMetaValue, _>("value_type", Self::VT_VALUE_TYPE, "value", Self::VT_VALUE, false, |key, v, pos| {
3310        match key {
3311          GenericMetaValue::String => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<GenericMetaString>>("GenericMetaValue::String", pos),
3312          GenericMetaValue::Float => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<GenericMetaFloat>>("GenericMetaValue::Float", pos),
3313          GenericMetaValue::Int => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<GenericMetaInt>>("GenericMetaValue::Int", pos),
3314          GenericMetaValue::List => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<GenericMetaList>>("GenericMetaValue::List", pos),
3315          GenericMetaValue::KVPair => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<MetadataKV>>("GenericMetaValue::KVPair", pos),
3316          _ => Ok(()),
3317        }
3318     })?
3319     .finish();
3320    Ok(())
3321  }
3322}
3323pub struct MetadataKVArgs<'a> {
3324    pub key: Option<::flatbuffers::WIPOffset<&'a str>>,
3325    pub value_type: GenericMetaValue,
3326    pub value: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>,
3327}
3328impl<'a> Default for MetadataKVArgs<'a> {
3329  #[inline]
3330  fn default() -> Self {
3331    MetadataKVArgs {
3332      key: None, // required field
3333      value_type: GenericMetaValue::NONE,
3334      value: None,
3335    }
3336  }
3337}
3338
3339pub struct MetadataKVBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
3340  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
3341  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
3342}
3343impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> MetadataKVBuilder<'a, 'b, A> {
3344  #[inline]
3345  pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset<&'b  str>) {
3346    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MetadataKV::VT_KEY, key);
3347  }
3348  #[inline]
3349  pub fn add_value_type(&mut self, value_type: GenericMetaValue) {
3350    self.fbb_.push_slot::<GenericMetaValue>(MetadataKV::VT_VALUE_TYPE, value_type, GenericMetaValue::NONE);
3351  }
3352  #[inline]
3353  pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>) {
3354    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MetadataKV::VT_VALUE, value);
3355  }
3356  #[inline]
3357  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> MetadataKVBuilder<'a, 'b, A> {
3358    let start = _fbb.start_table();
3359    MetadataKVBuilder {
3360      fbb_: _fbb,
3361      start_: start,
3362    }
3363  }
3364  #[inline]
3365  pub fn finish(self) -> ::flatbuffers::WIPOffset<MetadataKV<'a>> {
3366    let o = self.fbb_.end_table(self.start_);
3367    self.fbb_.required(o, MetadataKV::VT_KEY,"key");
3368    ::flatbuffers::WIPOffset::new(o.value())
3369  }
3370}
3371
3372impl ::core::fmt::Debug for MetadataKV<'_> {
3373  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3374    let mut ds = f.debug_struct("MetadataKV");
3375      ds.field("key", &self.key());
3376      ds.field("value_type", &self.value_type());
3377      match self.value_type() {
3378        GenericMetaValue::String => {
3379          if let Some(x) = self.value_as_string() {
3380            ds.field("value", &x)
3381          } else {
3382            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
3383          }
3384        },
3385        GenericMetaValue::Float => {
3386          if let Some(x) = self.value_as_float() {
3387            ds.field("value", &x)
3388          } else {
3389            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
3390          }
3391        },
3392        GenericMetaValue::Int => {
3393          if let Some(x) = self.value_as_int() {
3394            ds.field("value", &x)
3395          } else {
3396            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
3397          }
3398        },
3399        GenericMetaValue::List => {
3400          if let Some(x) = self.value_as_list() {
3401            ds.field("value", &x)
3402          } else {
3403            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
3404          }
3405        },
3406        GenericMetaValue::KVPair => {
3407          if let Some(x) = self.value_as_kvpair() {
3408            ds.field("value", &x)
3409          } else {
3410            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
3411          }
3412        },
3413        _ => {
3414          let x: Option<()> = None;
3415          ds.field("value", &x)
3416        },
3417      };
3418      ds.finish()
3419  }
3420}
3421pub enum MediaItemOffset {}
3422#[derive(Copy, Clone, PartialEq)]
3423
3424pub struct MediaItem<'a> {
3425  pub _tab: ::flatbuffers::Table<'a>,
3426}
3427
3428impl<'a> ::flatbuffers::Follow<'a> for MediaItem<'a> {
3429  type Inner = MediaItem<'a>;
3430  #[inline]
3431  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3432    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
3433  }
3434}
3435
3436impl<'a> MediaItem<'a> {
3437  pub const VT_CONTAINER: ::flatbuffers::VOffsetT = 4;
3438  pub const VT_SOURCE_URL: ::flatbuffers::VOffsetT = 6;
3439  pub const VT_START_TIME: ::flatbuffers::VOffsetT = 8;
3440  pub const VT_VOLUME: ::flatbuffers::VOffsetT = 10;
3441  pub const VT_SPEED: ::flatbuffers::VOffsetT = 12;
3442  pub const VT_HEADERS: ::flatbuffers::VOffsetT = 14;
3443  pub const VT_TITLE: ::flatbuffers::VOffsetT = 16;
3444  pub const VT_THUMBNAIL_URL: ::flatbuffers::VOffsetT = 18;
3445  pub const VT_METADATA_TYPE: ::flatbuffers::VOffsetT = 20;
3446  pub const VT_METADATA: ::flatbuffers::VOffsetT = 22;
3447  pub const VT_EXTRA_METADATA: ::flatbuffers::VOffsetT = 24;
3448
3449  #[inline]
3450  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
3451    MediaItem { _tab: table }
3452  }
3453  #[allow(unused_mut)]
3454  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
3455    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
3456    args: &'args MediaItemArgs<'args>
3457  ) -> ::flatbuffers::WIPOffset<MediaItem<'bldr>> {
3458    let mut builder = MediaItemBuilder::new(_fbb);
3459    if let Some(x) = args.extra_metadata { builder.add_extra_metadata(x); }
3460    if let Some(x) = args.metadata { builder.add_metadata(x); }
3461    if let Some(x) = args.thumbnail_url { builder.add_thumbnail_url(x); }
3462    if let Some(x) = args.title { builder.add_title(x); }
3463    if let Some(x) = args.headers { builder.add_headers(x); }
3464    if let Some(x) = args.speed { builder.add_speed(x); }
3465    if let Some(x) = args.volume { builder.add_volume(x); }
3466    if let Some(x) = args.start_time { builder.add_start_time(x); }
3467    if let Some(x) = args.source_url { builder.add_source_url(x); }
3468    if let Some(x) = args.container { builder.add_container(x); }
3469    builder.add_metadata_type(args.metadata_type);
3470    builder.finish()
3471  }
3472
3473
3474  #[inline]
3475  pub fn container(&self) -> &'a str {
3476    // Safety:
3477    // Created from valid Table for this object
3478    // which contains a valid value in this slot
3479    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaItem::VT_CONTAINER, None).unwrap()}
3480  }
3481  #[inline]
3482  pub fn source_url(&self) -> &'a str {
3483    // Safety:
3484    // Created from valid Table for this object
3485    // which contains a valid value in this slot
3486    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaItem::VT_SOURCE_URL, None).unwrap()}
3487  }
3488  #[inline]
3489  pub fn start_time(&self) -> Option<&'a Time> {
3490    // Safety:
3491    // Created from valid Table for this object
3492    // which contains a valid value in this slot
3493    unsafe { self._tab.get::<Time>(MediaItem::VT_START_TIME, None)}
3494  }
3495  #[inline]
3496  pub fn volume(&self) -> Option<f32> {
3497    // Safety:
3498    // Created from valid Table for this object
3499    // which contains a valid value in this slot
3500    unsafe { self._tab.get::<f32>(MediaItem::VT_VOLUME, None)}
3501  }
3502  #[inline]
3503  pub fn speed(&self) -> Option<f32> {
3504    // Safety:
3505    // Created from valid Table for this object
3506    // which contains a valid value in this slot
3507    unsafe { self._tab.get::<f32>(MediaItem::VT_SPEED, None)}
3508  }
3509  #[inline]
3510  pub fn headers(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<RequestHeader<'a>>>> {
3511    // Safety:
3512    // Created from valid Table for this object
3513    // which contains a valid value in this slot
3514    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<RequestHeader>>>>(MediaItem::VT_HEADERS, None)}
3515  }
3516  #[inline]
3517  pub fn title(&self) -> Option<&'a str> {
3518    // Safety:
3519    // Created from valid Table for this object
3520    // which contains a valid value in this slot
3521    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaItem::VT_TITLE, None)}
3522  }
3523  #[inline]
3524  pub fn thumbnail_url(&self) -> Option<&'a str> {
3525    // Safety:
3526    // Created from valid Table for this object
3527    // which contains a valid value in this slot
3528    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaItem::VT_THUMBNAIL_URL, None)}
3529  }
3530  #[inline]
3531  pub fn metadata_type(&self) -> Metadata {
3532    // Safety:
3533    // Created from valid Table for this object
3534    // which contains a valid value in this slot
3535    unsafe { self._tab.get::<Metadata>(MediaItem::VT_METADATA_TYPE, Some(Metadata::NONE)).unwrap()}
3536  }
3537  #[inline]
3538  pub fn metadata(&self) -> Option<::flatbuffers::Table<'a>> {
3539    // Safety:
3540    // Created from valid Table for this object
3541    // which contains a valid value in this slot
3542    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>(MediaItem::VT_METADATA, None)}
3543  }
3544  #[inline]
3545  pub fn extra_metadata(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<MetadataKV<'a>>>> {
3546    // Safety:
3547    // Created from valid Table for this object
3548    // which contains a valid value in this slot
3549    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<MetadataKV>>>>(MediaItem::VT_EXTRA_METADATA, None)}
3550  }
3551  #[inline]
3552  #[allow(non_snake_case)]
3553  pub fn metadata_as_video(&self) -> Option<VideoMetadata<'a>> {
3554    if self.metadata_type() == Metadata::Video {
3555      self.metadata().map(|t| {
3556       // Safety:
3557       // Created from a valid Table for this object
3558       // Which contains a valid union in this slot
3559       unsafe { VideoMetadata::init_from_table(t) }
3560     })
3561    } else {
3562      None
3563    }
3564  }
3565
3566  #[inline]
3567  #[allow(non_snake_case)]
3568  pub fn metadata_as_audio(&self) -> Option<AudioMetadata<'a>> {
3569    if self.metadata_type() == Metadata::Audio {
3570      self.metadata().map(|t| {
3571       // Safety:
3572       // Created from a valid Table for this object
3573       // Which contains a valid union in this slot
3574       unsafe { AudioMetadata::init_from_table(t) }
3575     })
3576    } else {
3577      None
3578    }
3579  }
3580
3581}
3582
3583impl ::flatbuffers::Verifiable for MediaItem<'_> {
3584  #[inline]
3585  fn run_verifier(
3586    v: &mut ::flatbuffers::Verifier, pos: usize
3587  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
3588    v.visit_table(pos)?
3589     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("container", Self::VT_CONTAINER, true)?
3590     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("source_url", Self::VT_SOURCE_URL, true)?
3591     .visit_field::<Time>("start_time", Self::VT_START_TIME, false)?
3592     .visit_field::<f32>("volume", Self::VT_VOLUME, false)?
3593     .visit_field::<f32>("speed", Self::VT_SPEED, false)?
3594     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<RequestHeader>>>>("headers", Self::VT_HEADERS, false)?
3595     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("title", Self::VT_TITLE, false)?
3596     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("thumbnail_url", Self::VT_THUMBNAIL_URL, false)?
3597     .visit_union::<Metadata, _>("metadata_type", Self::VT_METADATA_TYPE, "metadata", Self::VT_METADATA, false, |key, v, pos| {
3598        match key {
3599          Metadata::Video => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<VideoMetadata>>("Metadata::Video", pos),
3600          Metadata::Audio => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<AudioMetadata>>("Metadata::Audio", pos),
3601          _ => Ok(()),
3602        }
3603     })?
3604     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<MetadataKV>>>>("extra_metadata", Self::VT_EXTRA_METADATA, false)?
3605     .finish();
3606    Ok(())
3607  }
3608}
3609pub struct MediaItemArgs<'a> {
3610    pub container: Option<::flatbuffers::WIPOffset<&'a str>>,
3611    pub source_url: Option<::flatbuffers::WIPOffset<&'a str>>,
3612    pub start_time: Option<&'a Time>,
3613    pub volume: Option<f32>,
3614    pub speed: Option<f32>,
3615    pub headers: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<RequestHeader<'a>>>>>,
3616    pub title: Option<::flatbuffers::WIPOffset<&'a str>>,
3617    pub thumbnail_url: Option<::flatbuffers::WIPOffset<&'a str>>,
3618    pub metadata_type: Metadata,
3619    pub metadata: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>,
3620    pub extra_metadata: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<MetadataKV<'a>>>>>,
3621}
3622impl<'a> Default for MediaItemArgs<'a> {
3623  #[inline]
3624  fn default() -> Self {
3625    MediaItemArgs {
3626      container: None, // required field
3627      source_url: None, // required field
3628      start_time: None,
3629      volume: None,
3630      speed: None,
3631      headers: None,
3632      title: None,
3633      thumbnail_url: None,
3634      metadata_type: Metadata::NONE,
3635      metadata: None,
3636      extra_metadata: None,
3637    }
3638  }
3639}
3640
3641pub struct MediaItemBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
3642  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
3643  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
3644}
3645impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> MediaItemBuilder<'a, 'b, A> {
3646  #[inline]
3647  pub fn add_container(&mut self, container: ::flatbuffers::WIPOffset<&'b  str>) {
3648    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaItem::VT_CONTAINER, container);
3649  }
3650  #[inline]
3651  pub fn add_source_url(&mut self, source_url: ::flatbuffers::WIPOffset<&'b  str>) {
3652    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaItem::VT_SOURCE_URL, source_url);
3653  }
3654  #[inline]
3655  pub fn add_start_time(&mut self, start_time: &Time) {
3656    self.fbb_.push_slot_always::<&Time>(MediaItem::VT_START_TIME, start_time);
3657  }
3658  #[inline]
3659  pub fn add_volume(&mut self, volume: f32) {
3660    self.fbb_.push_slot_always::<f32>(MediaItem::VT_VOLUME, volume);
3661  }
3662  #[inline]
3663  pub fn add_speed(&mut self, speed: f32) {
3664    self.fbb_.push_slot_always::<f32>(MediaItem::VT_SPEED, speed);
3665  }
3666  #[inline]
3667  pub fn add_headers(&mut self, headers: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<RequestHeader<'b >>>>) {
3668    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaItem::VT_HEADERS, headers);
3669  }
3670  #[inline]
3671  pub fn add_title(&mut self, title: ::flatbuffers::WIPOffset<&'b  str>) {
3672    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaItem::VT_TITLE, title);
3673  }
3674  #[inline]
3675  pub fn add_thumbnail_url(&mut self, thumbnail_url: ::flatbuffers::WIPOffset<&'b  str>) {
3676    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaItem::VT_THUMBNAIL_URL, thumbnail_url);
3677  }
3678  #[inline]
3679  pub fn add_metadata_type(&mut self, metadata_type: Metadata) {
3680    self.fbb_.push_slot::<Metadata>(MediaItem::VT_METADATA_TYPE, metadata_type, Metadata::NONE);
3681  }
3682  #[inline]
3683  pub fn add_metadata(&mut self, metadata: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>) {
3684    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaItem::VT_METADATA, metadata);
3685  }
3686  #[inline]
3687  pub fn add_extra_metadata(&mut self, extra_metadata: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<MetadataKV<'b >>>>) {
3688    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaItem::VT_EXTRA_METADATA, extra_metadata);
3689  }
3690  #[inline]
3691  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> MediaItemBuilder<'a, 'b, A> {
3692    let start = _fbb.start_table();
3693    MediaItemBuilder {
3694      fbb_: _fbb,
3695      start_: start,
3696    }
3697  }
3698  #[inline]
3699  pub fn finish(self) -> ::flatbuffers::WIPOffset<MediaItem<'a>> {
3700    let o = self.fbb_.end_table(self.start_);
3701    self.fbb_.required(o, MediaItem::VT_CONTAINER,"container");
3702    self.fbb_.required(o, MediaItem::VT_SOURCE_URL,"source_url");
3703    ::flatbuffers::WIPOffset::new(o.value())
3704  }
3705}
3706
3707impl ::core::fmt::Debug for MediaItem<'_> {
3708  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3709    let mut ds = f.debug_struct("MediaItem");
3710      ds.field("container", &self.container());
3711      ds.field("source_url", &self.source_url());
3712      ds.field("start_time", &self.start_time());
3713      ds.field("volume", &self.volume());
3714      ds.field("speed", &self.speed());
3715      ds.field("headers", &self.headers());
3716      ds.field("title", &self.title());
3717      ds.field("thumbnail_url", &self.thumbnail_url());
3718      ds.field("metadata_type", &self.metadata_type());
3719      match self.metadata_type() {
3720        Metadata::Video => {
3721          if let Some(x) = self.metadata_as_video() {
3722            ds.field("metadata", &x)
3723          } else {
3724            ds.field("metadata", &"InvalidFlatbuffer: Union discriminant does not match value.")
3725          }
3726        },
3727        Metadata::Audio => {
3728          if let Some(x) = self.metadata_as_audio() {
3729            ds.field("metadata", &x)
3730          } else {
3731            ds.field("metadata", &"InvalidFlatbuffer: Union discriminant does not match value.")
3732          }
3733        },
3734        _ => {
3735          let x: Option<()> = None;
3736          ds.field("metadata", &x)
3737        },
3738      };
3739      ds.field("extra_metadata", &self.extra_metadata());
3740      ds.finish()
3741  }
3742}
3743pub enum QueueItemOffset {}
3744#[derive(Copy, Clone, PartialEq)]
3745
3746pub struct QueueItem<'a> {
3747  pub _tab: ::flatbuffers::Table<'a>,
3748}
3749
3750impl<'a> ::flatbuffers::Follow<'a> for QueueItem<'a> {
3751  type Inner = QueueItem<'a>;
3752  #[inline]
3753  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3754    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
3755  }
3756}
3757
3758impl<'a> QueueItem<'a> {
3759  pub const VT_MEDIA_ITEM: ::flatbuffers::VOffsetT = 4;
3760  pub const VT_PLAYBACK_DURATION: ::flatbuffers::VOffsetT = 6;
3761
3762  #[inline]
3763  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
3764    QueueItem { _tab: table }
3765  }
3766  #[allow(unused_mut)]
3767  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
3768    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
3769    args: &'args QueueItemArgs<'args>
3770  ) -> ::flatbuffers::WIPOffset<QueueItem<'bldr>> {
3771    let mut builder = QueueItemBuilder::new(_fbb);
3772    if let Some(x) = args.playback_duration { builder.add_playback_duration(x); }
3773    if let Some(x) = args.media_item { builder.add_media_item(x); }
3774    builder.finish()
3775  }
3776
3777
3778  #[inline]
3779  pub fn media_item(&self) -> MediaItem<'a> {
3780    // Safety:
3781    // Created from valid Table for this object
3782    // which contains a valid value in this slot
3783    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<MediaItem>>(QueueItem::VT_MEDIA_ITEM, None).unwrap()}
3784  }
3785  #[inline]
3786  pub fn playback_duration(&self) -> Option<&'a Time> {
3787    // Safety:
3788    // Created from valid Table for this object
3789    // which contains a valid value in this slot
3790    unsafe { self._tab.get::<Time>(QueueItem::VT_PLAYBACK_DURATION, None)}
3791  }
3792}
3793
3794impl ::flatbuffers::Verifiable for QueueItem<'_> {
3795  #[inline]
3796  fn run_verifier(
3797    v: &mut ::flatbuffers::Verifier, pos: usize
3798  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
3799    v.visit_table(pos)?
3800     .visit_field::<::flatbuffers::ForwardsUOffset<MediaItem>>("media_item", Self::VT_MEDIA_ITEM, true)?
3801     .visit_field::<Time>("playback_duration", Self::VT_PLAYBACK_DURATION, false)?
3802     .finish();
3803    Ok(())
3804  }
3805}
3806pub struct QueueItemArgs<'a> {
3807    pub media_item: Option<::flatbuffers::WIPOffset<MediaItem<'a>>>,
3808    pub playback_duration: Option<&'a Time>,
3809}
3810impl<'a> Default for QueueItemArgs<'a> {
3811  #[inline]
3812  fn default() -> Self {
3813    QueueItemArgs {
3814      media_item: None, // required field
3815      playback_duration: None,
3816    }
3817  }
3818}
3819
3820pub struct QueueItemBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
3821  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
3822  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
3823}
3824impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> QueueItemBuilder<'a, 'b, A> {
3825  #[inline]
3826  pub fn add_media_item(&mut self, media_item: ::flatbuffers::WIPOffset<MediaItem<'b >>) {
3827    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<MediaItem>>(QueueItem::VT_MEDIA_ITEM, media_item);
3828  }
3829  #[inline]
3830  pub fn add_playback_duration(&mut self, playback_duration: &Time) {
3831    self.fbb_.push_slot_always::<&Time>(QueueItem::VT_PLAYBACK_DURATION, playback_duration);
3832  }
3833  #[inline]
3834  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> QueueItemBuilder<'a, 'b, A> {
3835    let start = _fbb.start_table();
3836    QueueItemBuilder {
3837      fbb_: _fbb,
3838      start_: start,
3839    }
3840  }
3841  #[inline]
3842  pub fn finish(self) -> ::flatbuffers::WIPOffset<QueueItem<'a>> {
3843    let o = self.fbb_.end_table(self.start_);
3844    self.fbb_.required(o, QueueItem::VT_MEDIA_ITEM,"media_item");
3845    ::flatbuffers::WIPOffset::new(o.value())
3846  }
3847}
3848
3849impl ::core::fmt::Debug for QueueItem<'_> {
3850  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3851    let mut ds = f.debug_struct("QueueItem");
3852      ds.field("media_item", &self.media_item());
3853      ds.field("playback_duration", &self.playback_duration());
3854      ds.finish()
3855  }
3856}
3857pub enum QueueOffset {}
3858#[derive(Copy, Clone, PartialEq)]
3859
3860pub struct Queue<'a> {
3861  pub _tab: ::flatbuffers::Table<'a>,
3862}
3863
3864impl<'a> ::flatbuffers::Follow<'a> for Queue<'a> {
3865  type Inner = Queue<'a>;
3866  #[inline]
3867  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3868    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
3869  }
3870}
3871
3872impl<'a> Queue<'a> {
3873  pub const VT_ITEMS: ::flatbuffers::VOffsetT = 4;
3874  pub const VT_START_INDEX: ::flatbuffers::VOffsetT = 6;
3875  pub const VT_AUTOPLAY: ::flatbuffers::VOffsetT = 8;
3876
3877  #[inline]
3878  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
3879    Queue { _tab: table }
3880  }
3881  #[allow(unused_mut)]
3882  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
3883    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
3884    args: &'args QueueArgs<'args>
3885  ) -> ::flatbuffers::WIPOffset<Queue<'bldr>> {
3886    let mut builder = QueueBuilder::new(_fbb);
3887    if let Some(x) = args.items { builder.add_items(x); }
3888    builder.add_autoplay(args.autoplay);
3889    if let Some(x) = args.start_index { builder.add_start_index(x); }
3890    builder.finish()
3891  }
3892
3893
3894  #[inline]
3895  pub fn items(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<QueueItem<'a>>> {
3896    // Safety:
3897    // Created from valid Table for this object
3898    // which contains a valid value in this slot
3899    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<QueueItem>>>>(Queue::VT_ITEMS, None).unwrap()}
3900  }
3901  #[inline]
3902  pub fn start_index(&self) -> Option<u8> {
3903    // Safety:
3904    // Created from valid Table for this object
3905    // which contains a valid value in this slot
3906    unsafe { self._tab.get::<u8>(Queue::VT_START_INDEX, None)}
3907  }
3908  #[inline]
3909  pub fn autoplay(&self) -> bool {
3910    // Safety:
3911    // Created from valid Table for this object
3912    // which contains a valid value in this slot
3913    unsafe { self._tab.get::<bool>(Queue::VT_AUTOPLAY, Some(false)).unwrap()}
3914  }
3915}
3916
3917impl ::flatbuffers::Verifiable for Queue<'_> {
3918  #[inline]
3919  fn run_verifier(
3920    v: &mut ::flatbuffers::Verifier, pos: usize
3921  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
3922    v.visit_table(pos)?
3923     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<QueueItem>>>>("items", Self::VT_ITEMS, true)?
3924     .visit_field::<u8>("start_index", Self::VT_START_INDEX, false)?
3925     .visit_field::<bool>("autoplay", Self::VT_AUTOPLAY, false)?
3926     .finish();
3927    Ok(())
3928  }
3929}
3930pub struct QueueArgs<'a> {
3931    pub items: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<QueueItem<'a>>>>>,
3932    pub start_index: Option<u8>,
3933    pub autoplay: bool,
3934}
3935impl<'a> Default for QueueArgs<'a> {
3936  #[inline]
3937  fn default() -> Self {
3938    QueueArgs {
3939      items: None, // required field
3940      start_index: None,
3941      autoplay: false,
3942    }
3943  }
3944}
3945
3946pub struct QueueBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
3947  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
3948  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
3949}
3950impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> QueueBuilder<'a, 'b, A> {
3951  #[inline]
3952  pub fn add_items(&mut self, items: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<QueueItem<'b >>>>) {
3953    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Queue::VT_ITEMS, items);
3954  }
3955  #[inline]
3956  pub fn add_start_index(&mut self, start_index: u8) {
3957    self.fbb_.push_slot_always::<u8>(Queue::VT_START_INDEX, start_index);
3958  }
3959  #[inline]
3960  pub fn add_autoplay(&mut self, autoplay: bool) {
3961    self.fbb_.push_slot::<bool>(Queue::VT_AUTOPLAY, autoplay, false);
3962  }
3963  #[inline]
3964  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> QueueBuilder<'a, 'b, A> {
3965    let start = _fbb.start_table();
3966    QueueBuilder {
3967      fbb_: _fbb,
3968      start_: start,
3969    }
3970  }
3971  #[inline]
3972  pub fn finish(self) -> ::flatbuffers::WIPOffset<Queue<'a>> {
3973    let o = self.fbb_.end_table(self.start_);
3974    self.fbb_.required(o, Queue::VT_ITEMS,"items");
3975    ::flatbuffers::WIPOffset::new(o.value())
3976  }
3977}
3978
3979impl ::core::fmt::Debug for Queue<'_> {
3980  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3981    let mut ds = f.debug_struct("Queue");
3982      ds.field("items", &self.items());
3983      ds.field("start_index", &self.start_index());
3984      ds.field("autoplay", &self.autoplay());
3985      ds.finish()
3986  }
3987}
3988pub enum QueueIndexOffset {}
3989#[derive(Copy, Clone, PartialEq)]
3990
3991pub struct QueueIndex<'a> {
3992  pub _tab: ::flatbuffers::Table<'a>,
3993}
3994
3995impl<'a> ::flatbuffers::Follow<'a> for QueueIndex<'a> {
3996  type Inner = QueueIndex<'a>;
3997  #[inline]
3998  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3999    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4000  }
4001}
4002
4003impl<'a> QueueIndex<'a> {
4004  pub const VT_INDEX: ::flatbuffers::VOffsetT = 4;
4005
4006  #[inline]
4007  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4008    QueueIndex { _tab: table }
4009  }
4010  #[allow(unused_mut)]
4011  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4012    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4013    args: &'args QueueIndexArgs
4014  ) -> ::flatbuffers::WIPOffset<QueueIndex<'bldr>> {
4015    let mut builder = QueueIndexBuilder::new(_fbb);
4016    builder.add_index(args.index);
4017    builder.finish()
4018  }
4019
4020
4021  #[inline]
4022  pub fn index(&self) -> u8 {
4023    // Safety:
4024    // Created from valid Table for this object
4025    // which contains a valid value in this slot
4026    unsafe { self._tab.get::<u8>(QueueIndex::VT_INDEX, Some(0)).unwrap()}
4027  }
4028}
4029
4030impl ::flatbuffers::Verifiable for QueueIndex<'_> {
4031  #[inline]
4032  fn run_verifier(
4033    v: &mut ::flatbuffers::Verifier, pos: usize
4034  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4035    v.visit_table(pos)?
4036     .visit_field::<u8>("index", Self::VT_INDEX, false)?
4037     .finish();
4038    Ok(())
4039  }
4040}
4041pub struct QueueIndexArgs {
4042    pub index: u8,
4043}
4044impl<'a> Default for QueueIndexArgs {
4045  #[inline]
4046  fn default() -> Self {
4047    QueueIndexArgs {
4048      index: 0,
4049    }
4050  }
4051}
4052
4053pub struct QueueIndexBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4054  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4055  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4056}
4057impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> QueueIndexBuilder<'a, 'b, A> {
4058  #[inline]
4059  pub fn add_index(&mut self, index: u8) {
4060    self.fbb_.push_slot::<u8>(QueueIndex::VT_INDEX, index, 0);
4061  }
4062  #[inline]
4063  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> QueueIndexBuilder<'a, 'b, A> {
4064    let start = _fbb.start_table();
4065    QueueIndexBuilder {
4066      fbb_: _fbb,
4067      start_: start,
4068    }
4069  }
4070  #[inline]
4071  pub fn finish(self) -> ::flatbuffers::WIPOffset<QueueIndex<'a>> {
4072    let o = self.fbb_.end_table(self.start_);
4073    ::flatbuffers::WIPOffset::new(o.value())
4074  }
4075}
4076
4077impl ::core::fmt::Debug for QueueIndex<'_> {
4078  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4079    let mut ds = f.debug_struct("QueueIndex");
4080      ds.field("index", &self.index());
4081      ds.finish()
4082  }
4083}
4084pub enum QueueMarkerFrontOffset {}
4085#[derive(Copy, Clone, PartialEq)]
4086
4087pub struct QueueMarkerFront<'a> {
4088  pub _tab: ::flatbuffers::Table<'a>,
4089}
4090
4091impl<'a> ::flatbuffers::Follow<'a> for QueueMarkerFront<'a> {
4092  type Inner = QueueMarkerFront<'a>;
4093  #[inline]
4094  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4095    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4096  }
4097}
4098
4099impl<'a> QueueMarkerFront<'a> {
4100
4101  #[inline]
4102  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4103    QueueMarkerFront { _tab: table }
4104  }
4105  #[allow(unused_mut)]
4106  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4107    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4108    _args: &'args QueueMarkerFrontArgs
4109  ) -> ::flatbuffers::WIPOffset<QueueMarkerFront<'bldr>> {
4110    let mut builder = QueueMarkerFrontBuilder::new(_fbb);
4111    builder.finish()
4112  }
4113
4114}
4115
4116impl ::flatbuffers::Verifiable for QueueMarkerFront<'_> {
4117  #[inline]
4118  fn run_verifier(
4119    v: &mut ::flatbuffers::Verifier, pos: usize
4120  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4121    v.visit_table(pos)?
4122     .finish();
4123    Ok(())
4124  }
4125}
4126pub struct QueueMarkerFrontArgs {
4127}
4128impl<'a> Default for QueueMarkerFrontArgs {
4129  #[inline]
4130  fn default() -> Self {
4131    QueueMarkerFrontArgs {
4132    }
4133  }
4134}
4135
4136pub struct QueueMarkerFrontBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4137  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4138  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4139}
4140impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> QueueMarkerFrontBuilder<'a, 'b, A> {
4141  #[inline]
4142  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> QueueMarkerFrontBuilder<'a, 'b, A> {
4143    let start = _fbb.start_table();
4144    QueueMarkerFrontBuilder {
4145      fbb_: _fbb,
4146      start_: start,
4147    }
4148  }
4149  #[inline]
4150  pub fn finish(self) -> ::flatbuffers::WIPOffset<QueueMarkerFront<'a>> {
4151    let o = self.fbb_.end_table(self.start_);
4152    ::flatbuffers::WIPOffset::new(o.value())
4153  }
4154}
4155
4156impl ::core::fmt::Debug for QueueMarkerFront<'_> {
4157  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4158    let mut ds = f.debug_struct("QueueMarkerFront");
4159      ds.finish()
4160  }
4161}
4162pub enum QueueMarkerBackOffset {}
4163#[derive(Copy, Clone, PartialEq)]
4164
4165pub struct QueueMarkerBack<'a> {
4166  pub _tab: ::flatbuffers::Table<'a>,
4167}
4168
4169impl<'a> ::flatbuffers::Follow<'a> for QueueMarkerBack<'a> {
4170  type Inner = QueueMarkerBack<'a>;
4171  #[inline]
4172  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4173    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4174  }
4175}
4176
4177impl<'a> QueueMarkerBack<'a> {
4178
4179  #[inline]
4180  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4181    QueueMarkerBack { _tab: table }
4182  }
4183  #[allow(unused_mut)]
4184  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4185    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4186    _args: &'args QueueMarkerBackArgs
4187  ) -> ::flatbuffers::WIPOffset<QueueMarkerBack<'bldr>> {
4188    let mut builder = QueueMarkerBackBuilder::new(_fbb);
4189    builder.finish()
4190  }
4191
4192}
4193
4194impl ::flatbuffers::Verifiable for QueueMarkerBack<'_> {
4195  #[inline]
4196  fn run_verifier(
4197    v: &mut ::flatbuffers::Verifier, pos: usize
4198  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4199    v.visit_table(pos)?
4200     .finish();
4201    Ok(())
4202  }
4203}
4204pub struct QueueMarkerBackArgs {
4205}
4206impl<'a> Default for QueueMarkerBackArgs {
4207  #[inline]
4208  fn default() -> Self {
4209    QueueMarkerBackArgs {
4210    }
4211  }
4212}
4213
4214pub struct QueueMarkerBackBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4215  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4216  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4217}
4218impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> QueueMarkerBackBuilder<'a, 'b, A> {
4219  #[inline]
4220  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> QueueMarkerBackBuilder<'a, 'b, A> {
4221    let start = _fbb.start_table();
4222    QueueMarkerBackBuilder {
4223      fbb_: _fbb,
4224      start_: start,
4225    }
4226  }
4227  #[inline]
4228  pub fn finish(self) -> ::flatbuffers::WIPOffset<QueueMarkerBack<'a>> {
4229    let o = self.fbb_.end_table(self.start_);
4230    ::flatbuffers::WIPOffset::new(o.value())
4231  }
4232}
4233
4234impl ::core::fmt::Debug for QueueMarkerBack<'_> {
4235  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4236    let mut ds = f.debug_struct("QueueMarkerBack");
4237      ds.finish()
4238  }
4239}
4240pub enum VideoTrackMetaOffset {}
4241#[derive(Copy, Clone, PartialEq)]
4242
4243pub struct VideoTrackMeta<'a> {
4244  pub _tab: ::flatbuffers::Table<'a>,
4245}
4246
4247impl<'a> ::flatbuffers::Follow<'a> for VideoTrackMeta<'a> {
4248  type Inner = VideoTrackMeta<'a>;
4249  #[inline]
4250  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4251    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4252  }
4253}
4254
4255impl<'a> VideoTrackMeta<'a> {
4256  pub const VT_RESOLUTION: ::flatbuffers::VOffsetT = 4;
4257
4258  #[inline]
4259  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4260    VideoTrackMeta { _tab: table }
4261  }
4262  #[allow(unused_mut)]
4263  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4264    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4265    args: &'args VideoTrackMetaArgs<'args>
4266  ) -> ::flatbuffers::WIPOffset<VideoTrackMeta<'bldr>> {
4267    let mut builder = VideoTrackMetaBuilder::new(_fbb);
4268    if let Some(x) = args.resolution { builder.add_resolution(x); }
4269    builder.finish()
4270  }
4271
4272
4273  #[inline]
4274  pub fn resolution(&self) -> Option<&'a VideoResolution> {
4275    // Safety:
4276    // Created from valid Table for this object
4277    // which contains a valid value in this slot
4278    unsafe { self._tab.get::<VideoResolution>(VideoTrackMeta::VT_RESOLUTION, None)}
4279  }
4280}
4281
4282impl ::flatbuffers::Verifiable for VideoTrackMeta<'_> {
4283  #[inline]
4284  fn run_verifier(
4285    v: &mut ::flatbuffers::Verifier, pos: usize
4286  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4287    v.visit_table(pos)?
4288     .visit_field::<VideoResolution>("resolution", Self::VT_RESOLUTION, false)?
4289     .finish();
4290    Ok(())
4291  }
4292}
4293pub struct VideoTrackMetaArgs<'a> {
4294    pub resolution: Option<&'a VideoResolution>,
4295}
4296impl<'a> Default for VideoTrackMetaArgs<'a> {
4297  #[inline]
4298  fn default() -> Self {
4299    VideoTrackMetaArgs {
4300      resolution: None,
4301    }
4302  }
4303}
4304
4305pub struct VideoTrackMetaBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4306  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4307  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4308}
4309impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> VideoTrackMetaBuilder<'a, 'b, A> {
4310  #[inline]
4311  pub fn add_resolution(&mut self, resolution: &VideoResolution) {
4312    self.fbb_.push_slot_always::<&VideoResolution>(VideoTrackMeta::VT_RESOLUTION, resolution);
4313  }
4314  #[inline]
4315  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> VideoTrackMetaBuilder<'a, 'b, A> {
4316    let start = _fbb.start_table();
4317    VideoTrackMetaBuilder {
4318      fbb_: _fbb,
4319      start_: start,
4320    }
4321  }
4322  #[inline]
4323  pub fn finish(self) -> ::flatbuffers::WIPOffset<VideoTrackMeta<'a>> {
4324    let o = self.fbb_.end_table(self.start_);
4325    ::flatbuffers::WIPOffset::new(o.value())
4326  }
4327}
4328
4329impl ::core::fmt::Debug for VideoTrackMeta<'_> {
4330  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4331    let mut ds = f.debug_struct("VideoTrackMeta");
4332      ds.field("resolution", &self.resolution());
4333      ds.finish()
4334  }
4335}
4336pub enum AudioTrackMetaOffset {}
4337#[derive(Copy, Clone, PartialEq)]
4338
4339pub struct AudioTrackMeta<'a> {
4340  pub _tab: ::flatbuffers::Table<'a>,
4341}
4342
4343impl<'a> ::flatbuffers::Follow<'a> for AudioTrackMeta<'a> {
4344  type Inner = AudioTrackMeta<'a>;
4345  #[inline]
4346  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4347    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4348  }
4349}
4350
4351impl<'a> AudioTrackMeta<'a> {
4352
4353  #[inline]
4354  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4355    AudioTrackMeta { _tab: table }
4356  }
4357  #[allow(unused_mut)]
4358  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4359    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4360    _args: &'args AudioTrackMetaArgs
4361  ) -> ::flatbuffers::WIPOffset<AudioTrackMeta<'bldr>> {
4362    let mut builder = AudioTrackMetaBuilder::new(_fbb);
4363    builder.finish()
4364  }
4365
4366}
4367
4368impl ::flatbuffers::Verifiable for AudioTrackMeta<'_> {
4369  #[inline]
4370  fn run_verifier(
4371    v: &mut ::flatbuffers::Verifier, pos: usize
4372  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4373    v.visit_table(pos)?
4374     .finish();
4375    Ok(())
4376  }
4377}
4378pub struct AudioTrackMetaArgs {
4379}
4380impl<'a> Default for AudioTrackMetaArgs {
4381  #[inline]
4382  fn default() -> Self {
4383    AudioTrackMetaArgs {
4384    }
4385  }
4386}
4387
4388pub struct AudioTrackMetaBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4389  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4390  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4391}
4392impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> AudioTrackMetaBuilder<'a, 'b, A> {
4393  #[inline]
4394  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> AudioTrackMetaBuilder<'a, 'b, A> {
4395    let start = _fbb.start_table();
4396    AudioTrackMetaBuilder {
4397      fbb_: _fbb,
4398      start_: start,
4399    }
4400  }
4401  #[inline]
4402  pub fn finish(self) -> ::flatbuffers::WIPOffset<AudioTrackMeta<'a>> {
4403    let o = self.fbb_.end_table(self.start_);
4404    ::flatbuffers::WIPOffset::new(o.value())
4405  }
4406}
4407
4408impl ::core::fmt::Debug for AudioTrackMeta<'_> {
4409  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4410    let mut ds = f.debug_struct("AudioTrackMeta");
4411      ds.finish()
4412  }
4413}
4414pub enum SubtitleTrackMetaOffset {}
4415#[derive(Copy, Clone, PartialEq)]
4416
4417pub struct SubtitleTrackMeta<'a> {
4418  pub _tab: ::flatbuffers::Table<'a>,
4419}
4420
4421impl<'a> ::flatbuffers::Follow<'a> for SubtitleTrackMeta<'a> {
4422  type Inner = SubtitleTrackMeta<'a>;
4423  #[inline]
4424  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4425    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4426  }
4427}
4428
4429impl<'a> SubtitleTrackMeta<'a> {
4430
4431  #[inline]
4432  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4433    SubtitleTrackMeta { _tab: table }
4434  }
4435  #[allow(unused_mut)]
4436  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4437    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4438    _args: &'args SubtitleTrackMetaArgs
4439  ) -> ::flatbuffers::WIPOffset<SubtitleTrackMeta<'bldr>> {
4440    let mut builder = SubtitleTrackMetaBuilder::new(_fbb);
4441    builder.finish()
4442  }
4443
4444}
4445
4446impl ::flatbuffers::Verifiable for SubtitleTrackMeta<'_> {
4447  #[inline]
4448  fn run_verifier(
4449    v: &mut ::flatbuffers::Verifier, pos: usize
4450  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4451    v.visit_table(pos)?
4452     .finish();
4453    Ok(())
4454  }
4455}
4456pub struct SubtitleTrackMetaArgs {
4457}
4458impl<'a> Default for SubtitleTrackMetaArgs {
4459  #[inline]
4460  fn default() -> Self {
4461    SubtitleTrackMetaArgs {
4462    }
4463  }
4464}
4465
4466pub struct SubtitleTrackMetaBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4467  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4468  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4469}
4470impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> SubtitleTrackMetaBuilder<'a, 'b, A> {
4471  #[inline]
4472  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> SubtitleTrackMetaBuilder<'a, 'b, A> {
4473    let start = _fbb.start_table();
4474    SubtitleTrackMetaBuilder {
4475      fbb_: _fbb,
4476      start_: start,
4477    }
4478  }
4479  #[inline]
4480  pub fn finish(self) -> ::flatbuffers::WIPOffset<SubtitleTrackMeta<'a>> {
4481    let o = self.fbb_.end_table(self.start_);
4482    ::flatbuffers::WIPOffset::new(o.value())
4483  }
4484}
4485
4486impl ::core::fmt::Debug for SubtitleTrackMeta<'_> {
4487  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4488    let mut ds = f.debug_struct("SubtitleTrackMeta");
4489      ds.finish()
4490  }
4491}
4492pub enum DeviceInfoOffset {}
4493#[derive(Copy, Clone, PartialEq)]
4494
4495pub struct DeviceInfo<'a> {
4496  pub _tab: ::flatbuffers::Table<'a>,
4497}
4498
4499impl<'a> ::flatbuffers::Follow<'a> for DeviceInfo<'a> {
4500  type Inner = DeviceInfo<'a>;
4501  #[inline]
4502  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4503    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4504  }
4505}
4506
4507impl<'a> DeviceInfo<'a> {
4508  pub const VT_DISPLAY_NAME: ::flatbuffers::VOffsetT = 4;
4509  pub const VT_APP_NAME: ::flatbuffers::VOffsetT = 6;
4510  pub const VT_APP_VERSION: ::flatbuffers::VOffsetT = 8;
4511
4512  #[inline]
4513  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4514    DeviceInfo { _tab: table }
4515  }
4516  #[allow(unused_mut)]
4517  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4518    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4519    args: &'args DeviceInfoArgs<'args>
4520  ) -> ::flatbuffers::WIPOffset<DeviceInfo<'bldr>> {
4521    let mut builder = DeviceInfoBuilder::new(_fbb);
4522    if let Some(x) = args.app_version { builder.add_app_version(x); }
4523    if let Some(x) = args.app_name { builder.add_app_name(x); }
4524    if let Some(x) = args.display_name { builder.add_display_name(x); }
4525    builder.finish()
4526  }
4527
4528
4529  #[inline]
4530  pub fn display_name(&self) -> Option<&'a str> {
4531    // Safety:
4532    // Created from valid Table for this object
4533    // which contains a valid value in this slot
4534    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(DeviceInfo::VT_DISPLAY_NAME, None)}
4535  }
4536  #[inline]
4537  pub fn app_name(&self) -> Option<&'a str> {
4538    // Safety:
4539    // Created from valid Table for this object
4540    // which contains a valid value in this slot
4541    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(DeviceInfo::VT_APP_NAME, None)}
4542  }
4543  #[inline]
4544  pub fn app_version(&self) -> Option<&'a str> {
4545    // Safety:
4546    // Created from valid Table for this object
4547    // which contains a valid value in this slot
4548    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(DeviceInfo::VT_APP_VERSION, None)}
4549  }
4550}
4551
4552impl ::flatbuffers::Verifiable for DeviceInfo<'_> {
4553  #[inline]
4554  fn run_verifier(
4555    v: &mut ::flatbuffers::Verifier, pos: usize
4556  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4557    v.visit_table(pos)?
4558     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("display_name", Self::VT_DISPLAY_NAME, false)?
4559     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("app_name", Self::VT_APP_NAME, false)?
4560     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("app_version", Self::VT_APP_VERSION, false)?
4561     .finish();
4562    Ok(())
4563  }
4564}
4565pub struct DeviceInfoArgs<'a> {
4566    pub display_name: Option<::flatbuffers::WIPOffset<&'a str>>,
4567    pub app_name: Option<::flatbuffers::WIPOffset<&'a str>>,
4568    pub app_version: Option<::flatbuffers::WIPOffset<&'a str>>,
4569}
4570impl<'a> Default for DeviceInfoArgs<'a> {
4571  #[inline]
4572  fn default() -> Self {
4573    DeviceInfoArgs {
4574      display_name: None,
4575      app_name: None,
4576      app_version: None,
4577    }
4578  }
4579}
4580
4581pub struct DeviceInfoBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4582  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4583  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4584}
4585impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> DeviceInfoBuilder<'a, 'b, A> {
4586  #[inline]
4587  pub fn add_display_name(&mut self, display_name: ::flatbuffers::WIPOffset<&'b  str>) {
4588    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(DeviceInfo::VT_DISPLAY_NAME, display_name);
4589  }
4590  #[inline]
4591  pub fn add_app_name(&mut self, app_name: ::flatbuffers::WIPOffset<&'b  str>) {
4592    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(DeviceInfo::VT_APP_NAME, app_name);
4593  }
4594  #[inline]
4595  pub fn add_app_version(&mut self, app_version: ::flatbuffers::WIPOffset<&'b  str>) {
4596    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(DeviceInfo::VT_APP_VERSION, app_version);
4597  }
4598  #[inline]
4599  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> DeviceInfoBuilder<'a, 'b, A> {
4600    let start = _fbb.start_table();
4601    DeviceInfoBuilder {
4602      fbb_: _fbb,
4603      start_: start,
4604    }
4605  }
4606  #[inline]
4607  pub fn finish(self) -> ::flatbuffers::WIPOffset<DeviceInfo<'a>> {
4608    let o = self.fbb_.end_table(self.start_);
4609    ::flatbuffers::WIPOffset::new(o.value())
4610  }
4611}
4612
4613impl ::core::fmt::Debug for DeviceInfo<'_> {
4614  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4615    let mut ds = f.debug_struct("DeviceInfo");
4616      ds.field("display_name", &self.display_name());
4617      ds.field("app_name", &self.app_name());
4618      ds.field("app_version", &self.app_version());
4619      ds.finish()
4620  }
4621}
4622pub enum DisplayCapabilitiesOffset {}
4623#[derive(Copy, Clone, PartialEq)]
4624
4625pub struct DisplayCapabilities<'a> {
4626  pub _tab: ::flatbuffers::Table<'a>,
4627}
4628
4629impl<'a> ::flatbuffers::Follow<'a> for DisplayCapabilities<'a> {
4630  type Inner = DisplayCapabilities<'a>;
4631  #[inline]
4632  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4633    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4634  }
4635}
4636
4637impl<'a> DisplayCapabilities<'a> {
4638  pub const VT_RESOLUTION: ::flatbuffers::VOffsetT = 4;
4639
4640  #[inline]
4641  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4642    DisplayCapabilities { _tab: table }
4643  }
4644  #[allow(unused_mut)]
4645  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4646    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4647    args: &'args DisplayCapabilitiesArgs<'args>
4648  ) -> ::flatbuffers::WIPOffset<DisplayCapabilities<'bldr>> {
4649    let mut builder = DisplayCapabilitiesBuilder::new(_fbb);
4650    if let Some(x) = args.resolution { builder.add_resolution(x); }
4651    builder.finish()
4652  }
4653
4654
4655  #[inline]
4656  pub fn resolution(&self) -> Option<&'a VideoResolution> {
4657    // Safety:
4658    // Created from valid Table for this object
4659    // which contains a valid value in this slot
4660    unsafe { self._tab.get::<VideoResolution>(DisplayCapabilities::VT_RESOLUTION, None)}
4661  }
4662}
4663
4664impl ::flatbuffers::Verifiable for DisplayCapabilities<'_> {
4665  #[inline]
4666  fn run_verifier(
4667    v: &mut ::flatbuffers::Verifier, pos: usize
4668  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4669    v.visit_table(pos)?
4670     .visit_field::<VideoResolution>("resolution", Self::VT_RESOLUTION, false)?
4671     .finish();
4672    Ok(())
4673  }
4674}
4675pub struct DisplayCapabilitiesArgs<'a> {
4676    pub resolution: Option<&'a VideoResolution>,
4677}
4678impl<'a> Default for DisplayCapabilitiesArgs<'a> {
4679  #[inline]
4680  fn default() -> Self {
4681    DisplayCapabilitiesArgs {
4682      resolution: None,
4683    }
4684  }
4685}
4686
4687pub struct DisplayCapabilitiesBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4688  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4689  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4690}
4691impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> DisplayCapabilitiesBuilder<'a, 'b, A> {
4692  #[inline]
4693  pub fn add_resolution(&mut self, resolution: &VideoResolution) {
4694    self.fbb_.push_slot_always::<&VideoResolution>(DisplayCapabilities::VT_RESOLUTION, resolution);
4695  }
4696  #[inline]
4697  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> DisplayCapabilitiesBuilder<'a, 'b, A> {
4698    let start = _fbb.start_table();
4699    DisplayCapabilitiesBuilder {
4700      fbb_: _fbb,
4701      start_: start,
4702    }
4703  }
4704  #[inline]
4705  pub fn finish(self) -> ::flatbuffers::WIPOffset<DisplayCapabilities<'a>> {
4706    let o = self.fbb_.end_table(self.start_);
4707    ::flatbuffers::WIPOffset::new(o.value())
4708  }
4709}
4710
4711impl ::core::fmt::Debug for DisplayCapabilities<'_> {
4712  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4713    let mut ds = f.debug_struct("DisplayCapabilities");
4714      ds.field("resolution", &self.resolution());
4715      ds.finish()
4716  }
4717}
4718pub enum MediaCapabilitiesOffset {}
4719#[derive(Copy, Clone, PartialEq)]
4720
4721pub struct MediaCapabilities<'a> {
4722  pub _tab: ::flatbuffers::Table<'a>,
4723}
4724
4725impl<'a> ::flatbuffers::Follow<'a> for MediaCapabilities<'a> {
4726  type Inner = MediaCapabilities<'a>;
4727  #[inline]
4728  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4729    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4730  }
4731}
4732
4733impl<'a> MediaCapabilities<'a> {
4734  pub const VT_PROTOCOLS: ::flatbuffers::VOffsetT = 4;
4735  pub const VT_CONTAINERS: ::flatbuffers::VOffsetT = 6;
4736  pub const VT_VIDEO_FORMATS: ::flatbuffers::VOffsetT = 8;
4737  pub const VT_AUDIO_FORMATS: ::flatbuffers::VOffsetT = 10;
4738  pub const VT_SUBTITLE_FORMATS: ::flatbuffers::VOffsetT = 12;
4739  pub const VT_HDR_FORMATS: ::flatbuffers::VOffsetT = 14;
4740  pub const VT_IMAGE_FORMATS: ::flatbuffers::VOffsetT = 16;
4741  pub const VT_EXTERNAL_SUBTITLES: ::flatbuffers::VOffsetT = 18;
4742  pub const VT_MIRRORING: ::flatbuffers::VOffsetT = 20;
4743
4744  #[inline]
4745  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4746    MediaCapabilities { _tab: table }
4747  }
4748  #[allow(unused_mut)]
4749  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4750    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4751    args: &'args MediaCapabilitiesArgs<'args>
4752  ) -> ::flatbuffers::WIPOffset<MediaCapabilities<'bldr>> {
4753    let mut builder = MediaCapabilitiesBuilder::new(_fbb);
4754    if let Some(x) = args.image_formats { builder.add_image_formats(x); }
4755    if let Some(x) = args.hdr_formats { builder.add_hdr_formats(x); }
4756    if let Some(x) = args.subtitle_formats { builder.add_subtitle_formats(x); }
4757    if let Some(x) = args.audio_formats { builder.add_audio_formats(x); }
4758    if let Some(x) = args.video_formats { builder.add_video_formats(x); }
4759    if let Some(x) = args.containers { builder.add_containers(x); }
4760    if let Some(x) = args.protocols { builder.add_protocols(x); }
4761    builder.add_mirroring(args.mirroring);
4762    builder.add_external_subtitles(args.external_subtitles);
4763    builder.finish()
4764  }
4765
4766
4767  #[inline]
4768  pub fn protocols(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>> {
4769    // Safety:
4770    // Created from valid Table for this object
4771    // which contains a valid value in this slot
4772    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>(MediaCapabilities::VT_PROTOCOLS, None)}
4773  }
4774  #[inline]
4775  pub fn containers(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>> {
4776    // Safety:
4777    // Created from valid Table for this object
4778    // which contains a valid value in this slot
4779    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>(MediaCapabilities::VT_CONTAINERS, None)}
4780  }
4781  #[inline]
4782  pub fn video_formats(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>> {
4783    // Safety:
4784    // Created from valid Table for this object
4785    // which contains a valid value in this slot
4786    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>(MediaCapabilities::VT_VIDEO_FORMATS, None)}
4787  }
4788  #[inline]
4789  pub fn audio_formats(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>> {
4790    // Safety:
4791    // Created from valid Table for this object
4792    // which contains a valid value in this slot
4793    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>(MediaCapabilities::VT_AUDIO_FORMATS, None)}
4794  }
4795  #[inline]
4796  pub fn subtitle_formats(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>> {
4797    // Safety:
4798    // Created from valid Table for this object
4799    // which contains a valid value in this slot
4800    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>(MediaCapabilities::VT_SUBTITLE_FORMATS, None)}
4801  }
4802  #[inline]
4803  pub fn hdr_formats(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>> {
4804    // Safety:
4805    // Created from valid Table for this object
4806    // which contains a valid value in this slot
4807    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>(MediaCapabilities::VT_HDR_FORMATS, None)}
4808  }
4809  #[inline]
4810  pub fn image_formats(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>> {
4811    // Safety:
4812    // Created from valid Table for this object
4813    // which contains a valid value in this slot
4814    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>(MediaCapabilities::VT_IMAGE_FORMATS, None)}
4815  }
4816  #[inline]
4817  pub fn external_subtitles(&self) -> bool {
4818    // Safety:
4819    // Created from valid Table for this object
4820    // which contains a valid value in this slot
4821    unsafe { self._tab.get::<bool>(MediaCapabilities::VT_EXTERNAL_SUBTITLES, Some(false)).unwrap()}
4822  }
4823  #[inline]
4824  pub fn mirroring(&self) -> bool {
4825    // Safety:
4826    // Created from valid Table for this object
4827    // which contains a valid value in this slot
4828    unsafe { self._tab.get::<bool>(MediaCapabilities::VT_MIRRORING, Some(false)).unwrap()}
4829  }
4830}
4831
4832impl ::flatbuffers::Verifiable for MediaCapabilities<'_> {
4833  #[inline]
4834  fn run_verifier(
4835    v: &mut ::flatbuffers::Verifier, pos: usize
4836  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4837    v.visit_table(pos)?
4838     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<&'_ str>>>>("protocols", Self::VT_PROTOCOLS, false)?
4839     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<&'_ str>>>>("containers", Self::VT_CONTAINERS, false)?
4840     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<&'_ str>>>>("video_formats", Self::VT_VIDEO_FORMATS, false)?
4841     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<&'_ str>>>>("audio_formats", Self::VT_AUDIO_FORMATS, false)?
4842     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<&'_ str>>>>("subtitle_formats", Self::VT_SUBTITLE_FORMATS, false)?
4843     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<&'_ str>>>>("hdr_formats", Self::VT_HDR_FORMATS, false)?
4844     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<&'_ str>>>>("image_formats", Self::VT_IMAGE_FORMATS, false)?
4845     .visit_field::<bool>("external_subtitles", Self::VT_EXTERNAL_SUBTITLES, false)?
4846     .visit_field::<bool>("mirroring", Self::VT_MIRRORING, false)?
4847     .finish();
4848    Ok(())
4849  }
4850}
4851pub struct MediaCapabilitiesArgs<'a> {
4852    pub protocols: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>,
4853    pub containers: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>,
4854    pub video_formats: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>,
4855    pub audio_formats: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>,
4856    pub subtitle_formats: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>,
4857    pub hdr_formats: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>,
4858    pub image_formats: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>,
4859    pub external_subtitles: bool,
4860    pub mirroring: bool,
4861}
4862impl<'a> Default for MediaCapabilitiesArgs<'a> {
4863  #[inline]
4864  fn default() -> Self {
4865    MediaCapabilitiesArgs {
4866      protocols: None,
4867      containers: None,
4868      video_formats: None,
4869      audio_formats: None,
4870      subtitle_formats: None,
4871      hdr_formats: None,
4872      image_formats: None,
4873      external_subtitles: false,
4874      mirroring: false,
4875    }
4876  }
4877}
4878
4879pub struct MediaCapabilitiesBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
4880  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
4881  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
4882}
4883impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> MediaCapabilitiesBuilder<'a, 'b, A> {
4884  #[inline]
4885  pub fn add_protocols(&mut self, protocols: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<&'b  str>>>) {
4886    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCapabilities::VT_PROTOCOLS, protocols);
4887  }
4888  #[inline]
4889  pub fn add_containers(&mut self, containers: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<&'b  str>>>) {
4890    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCapabilities::VT_CONTAINERS, containers);
4891  }
4892  #[inline]
4893  pub fn add_video_formats(&mut self, video_formats: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<&'b  str>>>) {
4894    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCapabilities::VT_VIDEO_FORMATS, video_formats);
4895  }
4896  #[inline]
4897  pub fn add_audio_formats(&mut self, audio_formats: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<&'b  str>>>) {
4898    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCapabilities::VT_AUDIO_FORMATS, audio_formats);
4899  }
4900  #[inline]
4901  pub fn add_subtitle_formats(&mut self, subtitle_formats: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<&'b  str>>>) {
4902    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCapabilities::VT_SUBTITLE_FORMATS, subtitle_formats);
4903  }
4904  #[inline]
4905  pub fn add_hdr_formats(&mut self, hdr_formats: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<&'b  str>>>) {
4906    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCapabilities::VT_HDR_FORMATS, hdr_formats);
4907  }
4908  #[inline]
4909  pub fn add_image_formats(&mut self, image_formats: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<&'b  str>>>) {
4910    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCapabilities::VT_IMAGE_FORMATS, image_formats);
4911  }
4912  #[inline]
4913  pub fn add_external_subtitles(&mut self, external_subtitles: bool) {
4914    self.fbb_.push_slot::<bool>(MediaCapabilities::VT_EXTERNAL_SUBTITLES, external_subtitles, false);
4915  }
4916  #[inline]
4917  pub fn add_mirroring(&mut self, mirroring: bool) {
4918    self.fbb_.push_slot::<bool>(MediaCapabilities::VT_MIRRORING, mirroring, false);
4919  }
4920  #[inline]
4921  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> MediaCapabilitiesBuilder<'a, 'b, A> {
4922    let start = _fbb.start_table();
4923    MediaCapabilitiesBuilder {
4924      fbb_: _fbb,
4925      start_: start,
4926    }
4927  }
4928  #[inline]
4929  pub fn finish(self) -> ::flatbuffers::WIPOffset<MediaCapabilities<'a>> {
4930    let o = self.fbb_.end_table(self.start_);
4931    ::flatbuffers::WIPOffset::new(o.value())
4932  }
4933}
4934
4935impl ::core::fmt::Debug for MediaCapabilities<'_> {
4936  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4937    let mut ds = f.debug_struct("MediaCapabilities");
4938      ds.field("protocols", &self.protocols());
4939      ds.field("containers", &self.containers());
4940      ds.field("video_formats", &self.video_formats());
4941      ds.field("audio_formats", &self.audio_formats());
4942      ds.field("subtitle_formats", &self.subtitle_formats());
4943      ds.field("hdr_formats", &self.hdr_formats());
4944      ds.field("image_formats", &self.image_formats());
4945      ds.field("external_subtitles", &self.external_subtitles());
4946      ds.field("mirroring", &self.mirroring());
4947      ds.finish()
4948  }
4949}
4950pub enum AudioCapabilitiesOffset {}
4951#[derive(Copy, Clone, PartialEq)]
4952
4953pub struct AudioCapabilities<'a> {
4954  pub _tab: ::flatbuffers::Table<'a>,
4955}
4956
4957impl<'a> ::flatbuffers::Follow<'a> for AudioCapabilities<'a> {
4958  type Inner = AudioCapabilities<'a>;
4959  #[inline]
4960  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4961    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
4962  }
4963}
4964
4965impl<'a> AudioCapabilities<'a> {
4966  pub const VT_VOLUME_STEP_INTERVAL: ::flatbuffers::VOffsetT = 4;
4967
4968  #[inline]
4969  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
4970    AudioCapabilities { _tab: table }
4971  }
4972  #[allow(unused_mut)]
4973  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
4974    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
4975    args: &'args AudioCapabilitiesArgs
4976  ) -> ::flatbuffers::WIPOffset<AudioCapabilities<'bldr>> {
4977    let mut builder = AudioCapabilitiesBuilder::new(_fbb);
4978    builder.add_volume_step_interval(args.volume_step_interval);
4979    builder.finish()
4980  }
4981
4982
4983  #[inline]
4984  pub fn volume_step_interval(&self) -> f32 {
4985    // Safety:
4986    // Created from valid Table for this object
4987    // which contains a valid value in this slot
4988    unsafe { self._tab.get::<f32>(AudioCapabilities::VT_VOLUME_STEP_INTERVAL, Some(0.0)).unwrap()}
4989  }
4990}
4991
4992impl ::flatbuffers::Verifiable for AudioCapabilities<'_> {
4993  #[inline]
4994  fn run_verifier(
4995    v: &mut ::flatbuffers::Verifier, pos: usize
4996  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
4997    v.visit_table(pos)?
4998     .visit_field::<f32>("volume_step_interval", Self::VT_VOLUME_STEP_INTERVAL, false)?
4999     .finish();
5000    Ok(())
5001  }
5002}
5003pub struct AudioCapabilitiesArgs {
5004    pub volume_step_interval: f32,
5005}
5006impl<'a> Default for AudioCapabilitiesArgs {
5007  #[inline]
5008  fn default() -> Self {
5009    AudioCapabilitiesArgs {
5010      volume_step_interval: 0.0,
5011    }
5012  }
5013}
5014
5015pub struct AudioCapabilitiesBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
5016  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
5017  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
5018}
5019impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> AudioCapabilitiesBuilder<'a, 'b, A> {
5020  #[inline]
5021  pub fn add_volume_step_interval(&mut self, volume_step_interval: f32) {
5022    self.fbb_.push_slot::<f32>(AudioCapabilities::VT_VOLUME_STEP_INTERVAL, volume_step_interval, 0.0);
5023  }
5024  #[inline]
5025  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> AudioCapabilitiesBuilder<'a, 'b, A> {
5026    let start = _fbb.start_table();
5027    AudioCapabilitiesBuilder {
5028      fbb_: _fbb,
5029      start_: start,
5030    }
5031  }
5032  #[inline]
5033  pub fn finish(self) -> ::flatbuffers::WIPOffset<AudioCapabilities<'a>> {
5034    let o = self.fbb_.end_table(self.start_);
5035    ::flatbuffers::WIPOffset::new(o.value())
5036  }
5037}
5038
5039impl ::core::fmt::Debug for AudioCapabilities<'_> {
5040  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5041    let mut ds = f.debug_struct("AudioCapabilities");
5042      ds.field("volume_step_interval", &self.volume_step_interval());
5043      ds.finish()
5044  }
5045}
5046pub enum ReceiverCapabilitiesOffset {}
5047#[derive(Copy, Clone, PartialEq)]
5048
5049pub struct ReceiverCapabilities<'a> {
5050  pub _tab: ::flatbuffers::Table<'a>,
5051}
5052
5053impl<'a> ::flatbuffers::Follow<'a> for ReceiverCapabilities<'a> {
5054  type Inner = ReceiverCapabilities<'a>;
5055  #[inline]
5056  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5057    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
5058  }
5059}
5060
5061impl<'a> ReceiverCapabilities<'a> {
5062  pub const VT_MEDIA: ::flatbuffers::VOffsetT = 4;
5063  pub const VT_DISPLAY: ::flatbuffers::VOffsetT = 6;
5064  pub const VT_AUDIO: ::flatbuffers::VOffsetT = 8;
5065
5066  #[inline]
5067  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
5068    ReceiverCapabilities { _tab: table }
5069  }
5070  #[allow(unused_mut)]
5071  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
5072    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
5073    args: &'args ReceiverCapabilitiesArgs<'args>
5074  ) -> ::flatbuffers::WIPOffset<ReceiverCapabilities<'bldr>> {
5075    let mut builder = ReceiverCapabilitiesBuilder::new(_fbb);
5076    if let Some(x) = args.audio { builder.add_audio(x); }
5077    if let Some(x) = args.display { builder.add_display(x); }
5078    if let Some(x) = args.media { builder.add_media(x); }
5079    builder.finish()
5080  }
5081
5082
5083  #[inline]
5084  pub fn media(&self) -> Option<MediaCapabilities<'a>> {
5085    // Safety:
5086    // Created from valid Table for this object
5087    // which contains a valid value in this slot
5088    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<MediaCapabilities>>(ReceiverCapabilities::VT_MEDIA, None)}
5089  }
5090  #[inline]
5091  pub fn display(&self) -> Option<DisplayCapabilities<'a>> {
5092    // Safety:
5093    // Created from valid Table for this object
5094    // which contains a valid value in this slot
5095    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<DisplayCapabilities>>(ReceiverCapabilities::VT_DISPLAY, None)}
5096  }
5097  #[inline]
5098  pub fn audio(&self) -> Option<AudioCapabilities<'a>> {
5099    // Safety:
5100    // Created from valid Table for this object
5101    // which contains a valid value in this slot
5102    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<AudioCapabilities>>(ReceiverCapabilities::VT_AUDIO, None)}
5103  }
5104}
5105
5106impl ::flatbuffers::Verifiable for ReceiverCapabilities<'_> {
5107  #[inline]
5108  fn run_verifier(
5109    v: &mut ::flatbuffers::Verifier, pos: usize
5110  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
5111    v.visit_table(pos)?
5112     .visit_field::<::flatbuffers::ForwardsUOffset<MediaCapabilities>>("media", Self::VT_MEDIA, false)?
5113     .visit_field::<::flatbuffers::ForwardsUOffset<DisplayCapabilities>>("display", Self::VT_DISPLAY, false)?
5114     .visit_field::<::flatbuffers::ForwardsUOffset<AudioCapabilities>>("audio", Self::VT_AUDIO, false)?
5115     .finish();
5116    Ok(())
5117  }
5118}
5119pub struct ReceiverCapabilitiesArgs<'a> {
5120    pub media: Option<::flatbuffers::WIPOffset<MediaCapabilities<'a>>>,
5121    pub display: Option<::flatbuffers::WIPOffset<DisplayCapabilities<'a>>>,
5122    pub audio: Option<::flatbuffers::WIPOffset<AudioCapabilities<'a>>>,
5123}
5124impl<'a> Default for ReceiverCapabilitiesArgs<'a> {
5125  #[inline]
5126  fn default() -> Self {
5127    ReceiverCapabilitiesArgs {
5128      media: None,
5129      display: None,
5130      audio: None,
5131    }
5132  }
5133}
5134
5135pub struct ReceiverCapabilitiesBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
5136  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
5137  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
5138}
5139impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> ReceiverCapabilitiesBuilder<'a, 'b, A> {
5140  #[inline]
5141  pub fn add_media(&mut self, media: ::flatbuffers::WIPOffset<MediaCapabilities<'b >>) {
5142    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<MediaCapabilities>>(ReceiverCapabilities::VT_MEDIA, media);
5143  }
5144  #[inline]
5145  pub fn add_display(&mut self, display: ::flatbuffers::WIPOffset<DisplayCapabilities<'b >>) {
5146    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<DisplayCapabilities>>(ReceiverCapabilities::VT_DISPLAY, display);
5147  }
5148  #[inline]
5149  pub fn add_audio(&mut self, audio: ::flatbuffers::WIPOffset<AudioCapabilities<'b >>) {
5150    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<AudioCapabilities>>(ReceiverCapabilities::VT_AUDIO, audio);
5151  }
5152  #[inline]
5153  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> ReceiverCapabilitiesBuilder<'a, 'b, A> {
5154    let start = _fbb.start_table();
5155    ReceiverCapabilitiesBuilder {
5156      fbb_: _fbb,
5157      start_: start,
5158    }
5159  }
5160  #[inline]
5161  pub fn finish(self) -> ::flatbuffers::WIPOffset<ReceiverCapabilities<'a>> {
5162    let o = self.fbb_.end_table(self.start_);
5163    ::flatbuffers::WIPOffset::new(o.value())
5164  }
5165}
5166
5167impl ::core::fmt::Debug for ReceiverCapabilities<'_> {
5168  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5169    let mut ds = f.debug_struct("ReceiverCapabilities");
5170      ds.field("media", &self.media());
5171      ds.field("display", &self.display());
5172      ds.field("audio", &self.audio());
5173      ds.finish()
5174  }
5175}
5176pub enum MediaTrackOffset {}
5177#[derive(Copy, Clone, PartialEq)]
5178
5179pub struct MediaTrack<'a> {
5180  pub _tab: ::flatbuffers::Table<'a>,
5181}
5182
5183impl<'a> ::flatbuffers::Follow<'a> for MediaTrack<'a> {
5184  type Inner = MediaTrack<'a>;
5185  #[inline]
5186  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5187    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
5188  }
5189}
5190
5191impl<'a> MediaTrack<'a> {
5192  pub const VT_ID: ::flatbuffers::VOffsetT = 4;
5193  pub const VT_ISO_639: ::flatbuffers::VOffsetT = 6;
5194  pub const VT_TITLE: ::flatbuffers::VOffsetT = 8;
5195  pub const VT_METADATA_TYPE: ::flatbuffers::VOffsetT = 10;
5196  pub const VT_METADATA: ::flatbuffers::VOffsetT = 12;
5197
5198  #[inline]
5199  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
5200    MediaTrack { _tab: table }
5201  }
5202  #[allow(unused_mut)]
5203  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
5204    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
5205    args: &'args MediaTrackArgs<'args>
5206  ) -> ::flatbuffers::WIPOffset<MediaTrack<'bldr>> {
5207    let mut builder = MediaTrackBuilder::new(_fbb);
5208    if let Some(x) = args.metadata { builder.add_metadata(x); }
5209    if let Some(x) = args.title { builder.add_title(x); }
5210    if let Some(x) = args.iso_639 { builder.add_iso_639(x); }
5211    builder.add_id(args.id);
5212    builder.add_metadata_type(args.metadata_type);
5213    builder.finish()
5214  }
5215
5216
5217  #[inline]
5218  pub fn id(&self) -> u32 {
5219    // Safety:
5220    // Created from valid Table for this object
5221    // which contains a valid value in this slot
5222    unsafe { self._tab.get::<u32>(MediaTrack::VT_ID, Some(0)).unwrap()}
5223  }
5224  #[inline]
5225  pub fn iso_639(&self) -> &'a str {
5226    // Safety:
5227    // Created from valid Table for this object
5228    // which contains a valid value in this slot
5229    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaTrack::VT_ISO_639, None).unwrap()}
5230  }
5231  #[inline]
5232  pub fn title(&self) -> Option<&'a str> {
5233    // Safety:
5234    // Created from valid Table for this object
5235    // which contains a valid value in this slot
5236    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaTrack::VT_TITLE, None)}
5237  }
5238  #[inline]
5239  pub fn metadata_type(&self) -> MediaTrackMetadata {
5240    // Safety:
5241    // Created from valid Table for this object
5242    // which contains a valid value in this slot
5243    unsafe { self._tab.get::<MediaTrackMetadata>(MediaTrack::VT_METADATA_TYPE, Some(MediaTrackMetadata::NONE)).unwrap()}
5244  }
5245  #[inline]
5246  pub fn metadata(&self) -> Option<::flatbuffers::Table<'a>> {
5247    // Safety:
5248    // Created from valid Table for this object
5249    // which contains a valid value in this slot
5250    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>(MediaTrack::VT_METADATA, None)}
5251  }
5252  #[inline]
5253  #[allow(non_snake_case)]
5254  pub fn metadata_as_video(&self) -> Option<VideoTrackMeta<'a>> {
5255    if self.metadata_type() == MediaTrackMetadata::Video {
5256      self.metadata().map(|t| {
5257       // Safety:
5258       // Created from a valid Table for this object
5259       // Which contains a valid union in this slot
5260       unsafe { VideoTrackMeta::init_from_table(t) }
5261     })
5262    } else {
5263      None
5264    }
5265  }
5266
5267  #[inline]
5268  #[allow(non_snake_case)]
5269  pub fn metadata_as_audio(&self) -> Option<AudioTrackMeta<'a>> {
5270    if self.metadata_type() == MediaTrackMetadata::Audio {
5271      self.metadata().map(|t| {
5272       // Safety:
5273       // Created from a valid Table for this object
5274       // Which contains a valid union in this slot
5275       unsafe { AudioTrackMeta::init_from_table(t) }
5276     })
5277    } else {
5278      None
5279    }
5280  }
5281
5282  #[inline]
5283  #[allow(non_snake_case)]
5284  pub fn metadata_as_subtitle(&self) -> Option<SubtitleTrackMeta<'a>> {
5285    if self.metadata_type() == MediaTrackMetadata::Subtitle {
5286      self.metadata().map(|t| {
5287       // Safety:
5288       // Created from a valid Table for this object
5289       // Which contains a valid union in this slot
5290       unsafe { SubtitleTrackMeta::init_from_table(t) }
5291     })
5292    } else {
5293      None
5294    }
5295  }
5296
5297}
5298
5299impl ::flatbuffers::Verifiable for MediaTrack<'_> {
5300  #[inline]
5301  fn run_verifier(
5302    v: &mut ::flatbuffers::Verifier, pos: usize
5303  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
5304    v.visit_table(pos)?
5305     .visit_field::<u32>("id", Self::VT_ID, false)?
5306     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("iso_639", Self::VT_ISO_639, true)?
5307     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("title", Self::VT_TITLE, false)?
5308     .visit_union::<MediaTrackMetadata, _>("metadata_type", Self::VT_METADATA_TYPE, "metadata", Self::VT_METADATA, false, |key, v, pos| {
5309        match key {
5310          MediaTrackMetadata::Video => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<VideoTrackMeta>>("MediaTrackMetadata::Video", pos),
5311          MediaTrackMetadata::Audio => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<AudioTrackMeta>>("MediaTrackMetadata::Audio", pos),
5312          MediaTrackMetadata::Subtitle => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<SubtitleTrackMeta>>("MediaTrackMetadata::Subtitle", pos),
5313          _ => Ok(()),
5314        }
5315     })?
5316     .finish();
5317    Ok(())
5318  }
5319}
5320pub struct MediaTrackArgs<'a> {
5321    pub id: u32,
5322    pub iso_639: Option<::flatbuffers::WIPOffset<&'a str>>,
5323    pub title: Option<::flatbuffers::WIPOffset<&'a str>>,
5324    pub metadata_type: MediaTrackMetadata,
5325    pub metadata: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>,
5326}
5327impl<'a> Default for MediaTrackArgs<'a> {
5328  #[inline]
5329  fn default() -> Self {
5330    MediaTrackArgs {
5331      id: 0,
5332      iso_639: None, // required field
5333      title: None,
5334      metadata_type: MediaTrackMetadata::NONE,
5335      metadata: None,
5336    }
5337  }
5338}
5339
5340pub struct MediaTrackBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
5341  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
5342  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
5343}
5344impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> MediaTrackBuilder<'a, 'b, A> {
5345  #[inline]
5346  pub fn add_id(&mut self, id: u32) {
5347    self.fbb_.push_slot::<u32>(MediaTrack::VT_ID, id, 0);
5348  }
5349  #[inline]
5350  pub fn add_iso_639(&mut self, iso_639: ::flatbuffers::WIPOffset<&'b  str>) {
5351    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaTrack::VT_ISO_639, iso_639);
5352  }
5353  #[inline]
5354  pub fn add_title(&mut self, title: ::flatbuffers::WIPOffset<&'b  str>) {
5355    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaTrack::VT_TITLE, title);
5356  }
5357  #[inline]
5358  pub fn add_metadata_type(&mut self, metadata_type: MediaTrackMetadata) {
5359    self.fbb_.push_slot::<MediaTrackMetadata>(MediaTrack::VT_METADATA_TYPE, metadata_type, MediaTrackMetadata::NONE);
5360  }
5361  #[inline]
5362  pub fn add_metadata(&mut self, metadata: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>) {
5363    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaTrack::VT_METADATA, metadata);
5364  }
5365  #[inline]
5366  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> MediaTrackBuilder<'a, 'b, A> {
5367    let start = _fbb.start_table();
5368    MediaTrackBuilder {
5369      fbb_: _fbb,
5370      start_: start,
5371    }
5372  }
5373  #[inline]
5374  pub fn finish(self) -> ::flatbuffers::WIPOffset<MediaTrack<'a>> {
5375    let o = self.fbb_.end_table(self.start_);
5376    self.fbb_.required(o, MediaTrack::VT_ISO_639,"iso_639");
5377    ::flatbuffers::WIPOffset::new(o.value())
5378  }
5379}
5380
5381impl ::core::fmt::Debug for MediaTrack<'_> {
5382  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5383    let mut ds = f.debug_struct("MediaTrack");
5384      ds.field("id", &self.id());
5385      ds.field("iso_639", &self.iso_639());
5386      ds.field("title", &self.title());
5387      ds.field("metadata_type", &self.metadata_type());
5388      match self.metadata_type() {
5389        MediaTrackMetadata::Video => {
5390          if let Some(x) = self.metadata_as_video() {
5391            ds.field("metadata", &x)
5392          } else {
5393            ds.field("metadata", &"InvalidFlatbuffer: Union discriminant does not match value.")
5394          }
5395        },
5396        MediaTrackMetadata::Audio => {
5397          if let Some(x) = self.metadata_as_audio() {
5398            ds.field("metadata", &x)
5399          } else {
5400            ds.field("metadata", &"InvalidFlatbuffer: Union discriminant does not match value.")
5401          }
5402        },
5403        MediaTrackMetadata::Subtitle => {
5404          if let Some(x) = self.metadata_as_subtitle() {
5405            ds.field("metadata", &x)
5406          } else {
5407            ds.field("metadata", &"InvalidFlatbuffer: Union discriminant does not match value.")
5408          }
5409        },
5410        _ => {
5411          let x: Option<()> = None;
5412          ds.field("metadata", &x)
5413        },
5414      };
5415      ds.finish()
5416  }
5417}
5418pub enum ProgressChangedOffset {}
5419#[derive(Copy, Clone, PartialEq)]
5420
5421pub struct ProgressChanged<'a> {
5422  pub _tab: ::flatbuffers::Table<'a>,
5423}
5424
5425impl<'a> ::flatbuffers::Follow<'a> for ProgressChanged<'a> {
5426  type Inner = ProgressChanged<'a>;
5427  #[inline]
5428  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5429    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
5430  }
5431}
5432
5433impl<'a> ProgressChanged<'a> {
5434  pub const VT_POSITION: ::flatbuffers::VOffsetT = 4;
5435  pub const VT_DURATION: ::flatbuffers::VOffsetT = 6;
5436
5437  #[inline]
5438  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
5439    ProgressChanged { _tab: table }
5440  }
5441  #[allow(unused_mut)]
5442  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
5443    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
5444    args: &'args ProgressChangedArgs<'args>
5445  ) -> ::flatbuffers::WIPOffset<ProgressChanged<'bldr>> {
5446    let mut builder = ProgressChangedBuilder::new(_fbb);
5447    if let Some(x) = args.duration { builder.add_duration(x); }
5448    if let Some(x) = args.position { builder.add_position(x); }
5449    builder.finish()
5450  }
5451
5452
5453  #[inline]
5454  pub fn position(&self) -> Option<&'a Time> {
5455    // Safety:
5456    // Created from valid Table for this object
5457    // which contains a valid value in this slot
5458    unsafe { self._tab.get::<Time>(ProgressChanged::VT_POSITION, None)}
5459  }
5460  #[inline]
5461  pub fn duration(&self) -> Option<&'a Time> {
5462    // Safety:
5463    // Created from valid Table for this object
5464    // which contains a valid value in this slot
5465    unsafe { self._tab.get::<Time>(ProgressChanged::VT_DURATION, None)}
5466  }
5467}
5468
5469impl ::flatbuffers::Verifiable for ProgressChanged<'_> {
5470  #[inline]
5471  fn run_verifier(
5472    v: &mut ::flatbuffers::Verifier, pos: usize
5473  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
5474    v.visit_table(pos)?
5475     .visit_field::<Time>("position", Self::VT_POSITION, false)?
5476     .visit_field::<Time>("duration", Self::VT_DURATION, false)?
5477     .finish();
5478    Ok(())
5479  }
5480}
5481pub struct ProgressChangedArgs<'a> {
5482    pub position: Option<&'a Time>,
5483    pub duration: Option<&'a Time>,
5484}
5485impl<'a> Default for ProgressChangedArgs<'a> {
5486  #[inline]
5487  fn default() -> Self {
5488    ProgressChangedArgs {
5489      position: None,
5490      duration: None,
5491    }
5492  }
5493}
5494
5495pub struct ProgressChangedBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
5496  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
5497  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
5498}
5499impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> ProgressChangedBuilder<'a, 'b, A> {
5500  #[inline]
5501  pub fn add_position(&mut self, position: &Time) {
5502    self.fbb_.push_slot_always::<&Time>(ProgressChanged::VT_POSITION, position);
5503  }
5504  #[inline]
5505  pub fn add_duration(&mut self, duration: &Time) {
5506    self.fbb_.push_slot_always::<&Time>(ProgressChanged::VT_DURATION, duration);
5507  }
5508  #[inline]
5509  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> ProgressChangedBuilder<'a, 'b, A> {
5510    let start = _fbb.start_table();
5511    ProgressChangedBuilder {
5512      fbb_: _fbb,
5513      start_: start,
5514    }
5515  }
5516  #[inline]
5517  pub fn finish(self) -> ::flatbuffers::WIPOffset<ProgressChanged<'a>> {
5518    let o = self.fbb_.end_table(self.start_);
5519    ::flatbuffers::WIPOffset::new(o.value())
5520  }
5521}
5522
5523impl ::core::fmt::Debug for ProgressChanged<'_> {
5524  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5525    let mut ds = f.debug_struct("ProgressChanged");
5526      ds.field("position", &self.position());
5527      ds.field("duration", &self.duration());
5528      ds.finish()
5529  }
5530}
5531pub enum LoadOffset {}
5532#[derive(Copy, Clone, PartialEq)]
5533
5534pub struct Load<'a> {
5535  pub _tab: ::flatbuffers::Table<'a>,
5536}
5537
5538impl<'a> ::flatbuffers::Follow<'a> for Load<'a> {
5539  type Inner = Load<'a>;
5540  #[inline]
5541  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5542    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
5543  }
5544}
5545
5546impl<'a> Load<'a> {
5547  pub const VT_SOURCE_TYPE: ::flatbuffers::VOffsetT = 4;
5548  pub const VT_SOURCE: ::flatbuffers::VOffsetT = 6;
5549
5550  #[inline]
5551  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
5552    Load { _tab: table }
5553  }
5554  #[allow(unused_mut)]
5555  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
5556    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
5557    args: &'args LoadArgs
5558  ) -> ::flatbuffers::WIPOffset<Load<'bldr>> {
5559    let mut builder = LoadBuilder::new(_fbb);
5560    if let Some(x) = args.source { builder.add_source(x); }
5561    builder.add_source_type(args.source_type);
5562    builder.finish()
5563  }
5564
5565
5566  #[inline]
5567  pub fn source_type(&self) -> MediaSource {
5568    // Safety:
5569    // Created from valid Table for this object
5570    // which contains a valid value in this slot
5571    unsafe { self._tab.get::<MediaSource>(Load::VT_SOURCE_TYPE, Some(MediaSource::NONE)).unwrap()}
5572  }
5573  #[inline]
5574  pub fn source(&self) -> ::flatbuffers::Table<'a> {
5575    // Safety:
5576    // Created from valid Table for this object
5577    // which contains a valid value in this slot
5578    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>(Load::VT_SOURCE, None).unwrap()}
5579  }
5580  #[inline]
5581  #[allow(non_snake_case)]
5582  pub fn source_as_single(&self) -> Option<MediaItem<'a>> {
5583    if self.source_type() == MediaSource::Single {
5584      let u = self.source();
5585      // Safety:
5586      // Created from a valid Table for this object
5587      // Which contains a valid union in this slot
5588      Some(unsafe { MediaItem::init_from_table(u) })
5589    } else {
5590      None
5591    }
5592  }
5593
5594  #[inline]
5595  #[allow(non_snake_case)]
5596  pub fn source_as_queue(&self) -> Option<Queue<'a>> {
5597    if self.source_type() == MediaSource::Queue {
5598      let u = self.source();
5599      // Safety:
5600      // Created from a valid Table for this object
5601      // Which contains a valid union in this slot
5602      Some(unsafe { Queue::init_from_table(u) })
5603    } else {
5604      None
5605    }
5606  }
5607
5608}
5609
5610impl ::flatbuffers::Verifiable for Load<'_> {
5611  #[inline]
5612  fn run_verifier(
5613    v: &mut ::flatbuffers::Verifier, pos: usize
5614  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
5615    v.visit_table(pos)?
5616     .visit_union::<MediaSource, _>("source_type", Self::VT_SOURCE_TYPE, "source", Self::VT_SOURCE, true, |key, v, pos| {
5617        match key {
5618          MediaSource::Single => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<MediaItem>>("MediaSource::Single", pos),
5619          MediaSource::Queue => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<Queue>>("MediaSource::Queue", pos),
5620          _ => Ok(()),
5621        }
5622     })?
5623     .finish();
5624    Ok(())
5625  }
5626}
5627pub struct LoadArgs {
5628    pub source_type: MediaSource,
5629    pub source: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>,
5630}
5631impl<'a> Default for LoadArgs {
5632  #[inline]
5633  fn default() -> Self {
5634    LoadArgs {
5635      source_type: MediaSource::NONE,
5636      source: None, // required field
5637    }
5638  }
5639}
5640
5641pub struct LoadBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
5642  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
5643  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
5644}
5645impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> LoadBuilder<'a, 'b, A> {
5646  #[inline]
5647  pub fn add_source_type(&mut self, source_type: MediaSource) {
5648    self.fbb_.push_slot::<MediaSource>(Load::VT_SOURCE_TYPE, source_type, MediaSource::NONE);
5649  }
5650  #[inline]
5651  pub fn add_source(&mut self, source: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>) {
5652    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Load::VT_SOURCE, source);
5653  }
5654  #[inline]
5655  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> LoadBuilder<'a, 'b, A> {
5656    let start = _fbb.start_table();
5657    LoadBuilder {
5658      fbb_: _fbb,
5659      start_: start,
5660    }
5661  }
5662  #[inline]
5663  pub fn finish(self) -> ::flatbuffers::WIPOffset<Load<'a>> {
5664    let o = self.fbb_.end_table(self.start_);
5665    self.fbb_.required(o, Load::VT_SOURCE,"source");
5666    ::flatbuffers::WIPOffset::new(o.value())
5667  }
5668}
5669
5670impl ::core::fmt::Debug for Load<'_> {
5671  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5672    let mut ds = f.debug_struct("Load");
5673      ds.field("source_type", &self.source_type());
5674      match self.source_type() {
5675        MediaSource::Single => {
5676          if let Some(x) = self.source_as_single() {
5677            ds.field("source", &x)
5678          } else {
5679            ds.field("source", &"InvalidFlatbuffer: Union discriminant does not match value.")
5680          }
5681        },
5682        MediaSource::Queue => {
5683          if let Some(x) = self.source_as_queue() {
5684            ds.field("source", &x)
5685          } else {
5686            ds.field("source", &"InvalidFlatbuffer: Union discriminant does not match value.")
5687          }
5688        },
5689        _ => {
5690          let x: Option<()> = None;
5691          ds.field("source", &x)
5692        },
5693      };
5694      ds.finish()
5695  }
5696}
5697pub enum QueueInsertOffset {}
5698#[derive(Copy, Clone, PartialEq)]
5699
5700pub struct QueueInsert<'a> {
5701  pub _tab: ::flatbuffers::Table<'a>,
5702}
5703
5704impl<'a> ::flatbuffers::Follow<'a> for QueueInsert<'a> {
5705  type Inner = QueueInsert<'a>;
5706  #[inline]
5707  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5708    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
5709  }
5710}
5711
5712impl<'a> QueueInsert<'a> {
5713  pub const VT_ITEM: ::flatbuffers::VOffsetT = 4;
5714  pub const VT_POSITION_TYPE: ::flatbuffers::VOffsetT = 6;
5715  pub const VT_POSITION: ::flatbuffers::VOffsetT = 8;
5716
5717  #[inline]
5718  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
5719    QueueInsert { _tab: table }
5720  }
5721  #[allow(unused_mut)]
5722  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
5723    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
5724    args: &'args QueueInsertArgs<'args>
5725  ) -> ::flatbuffers::WIPOffset<QueueInsert<'bldr>> {
5726    let mut builder = QueueInsertBuilder::new(_fbb);
5727    if let Some(x) = args.position { builder.add_position(x); }
5728    if let Some(x) = args.item { builder.add_item(x); }
5729    builder.add_position_type(args.position_type);
5730    builder.finish()
5731  }
5732
5733
5734  #[inline]
5735  pub fn item(&self) -> QueueItem<'a> {
5736    // Safety:
5737    // Created from valid Table for this object
5738    // which contains a valid value in this slot
5739    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<QueueItem>>(QueueInsert::VT_ITEM, None).unwrap()}
5740  }
5741  #[inline]
5742  pub fn position_type(&self) -> QueuePosition {
5743    // Safety:
5744    // Created from valid Table for this object
5745    // which contains a valid value in this slot
5746    unsafe { self._tab.get::<QueuePosition>(QueueInsert::VT_POSITION_TYPE, Some(QueuePosition::NONE)).unwrap()}
5747  }
5748  #[inline]
5749  pub fn position(&self) -> ::flatbuffers::Table<'a> {
5750    // Safety:
5751    // Created from valid Table for this object
5752    // which contains a valid value in this slot
5753    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>(QueueInsert::VT_POSITION, None).unwrap()}
5754  }
5755  #[inline]
5756  #[allow(non_snake_case)]
5757  pub fn position_as_index(&self) -> Option<QueueIndex<'a>> {
5758    if self.position_type() == QueuePosition::Index {
5759      let u = self.position();
5760      // Safety:
5761      // Created from a valid Table for this object
5762      // Which contains a valid union in this slot
5763      Some(unsafe { QueueIndex::init_from_table(u) })
5764    } else {
5765      None
5766    }
5767  }
5768
5769  #[inline]
5770  #[allow(non_snake_case)]
5771  pub fn position_as_front(&self) -> Option<QueueMarkerFront<'a>> {
5772    if self.position_type() == QueuePosition::Front {
5773      let u = self.position();
5774      // Safety:
5775      // Created from a valid Table for this object
5776      // Which contains a valid union in this slot
5777      Some(unsafe { QueueMarkerFront::init_from_table(u) })
5778    } else {
5779      None
5780    }
5781  }
5782
5783  #[inline]
5784  #[allow(non_snake_case)]
5785  pub fn position_as_back(&self) -> Option<QueueMarkerBack<'a>> {
5786    if self.position_type() == QueuePosition::Back {
5787      let u = self.position();
5788      // Safety:
5789      // Created from a valid Table for this object
5790      // Which contains a valid union in this slot
5791      Some(unsafe { QueueMarkerBack::init_from_table(u) })
5792    } else {
5793      None
5794    }
5795  }
5796
5797}
5798
5799impl ::flatbuffers::Verifiable for QueueInsert<'_> {
5800  #[inline]
5801  fn run_verifier(
5802    v: &mut ::flatbuffers::Verifier, pos: usize
5803  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
5804    v.visit_table(pos)?
5805     .visit_field::<::flatbuffers::ForwardsUOffset<QueueItem>>("item", Self::VT_ITEM, true)?
5806     .visit_union::<QueuePosition, _>("position_type", Self::VT_POSITION_TYPE, "position", Self::VT_POSITION, true, |key, v, pos| {
5807        match key {
5808          QueuePosition::Index => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<QueueIndex>>("QueuePosition::Index", pos),
5809          QueuePosition::Front => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<QueueMarkerFront>>("QueuePosition::Front", pos),
5810          QueuePosition::Back => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<QueueMarkerBack>>("QueuePosition::Back", pos),
5811          _ => Ok(()),
5812        }
5813     })?
5814     .finish();
5815    Ok(())
5816  }
5817}
5818pub struct QueueInsertArgs<'a> {
5819    pub item: Option<::flatbuffers::WIPOffset<QueueItem<'a>>>,
5820    pub position_type: QueuePosition,
5821    pub position: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>,
5822}
5823impl<'a> Default for QueueInsertArgs<'a> {
5824  #[inline]
5825  fn default() -> Self {
5826    QueueInsertArgs {
5827      item: None, // required field
5828      position_type: QueuePosition::NONE,
5829      position: None, // required field
5830    }
5831  }
5832}
5833
5834pub struct QueueInsertBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
5835  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
5836  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
5837}
5838impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> QueueInsertBuilder<'a, 'b, A> {
5839  #[inline]
5840  pub fn add_item(&mut self, item: ::flatbuffers::WIPOffset<QueueItem<'b >>) {
5841    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<QueueItem>>(QueueInsert::VT_ITEM, item);
5842  }
5843  #[inline]
5844  pub fn add_position_type(&mut self, position_type: QueuePosition) {
5845    self.fbb_.push_slot::<QueuePosition>(QueueInsert::VT_POSITION_TYPE, position_type, QueuePosition::NONE);
5846  }
5847  #[inline]
5848  pub fn add_position(&mut self, position: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>) {
5849    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(QueueInsert::VT_POSITION, position);
5850  }
5851  #[inline]
5852  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> QueueInsertBuilder<'a, 'b, A> {
5853    let start = _fbb.start_table();
5854    QueueInsertBuilder {
5855      fbb_: _fbb,
5856      start_: start,
5857    }
5858  }
5859  #[inline]
5860  pub fn finish(self) -> ::flatbuffers::WIPOffset<QueueInsert<'a>> {
5861    let o = self.fbb_.end_table(self.start_);
5862    self.fbb_.required(o, QueueInsert::VT_ITEM,"item");
5863    self.fbb_.required(o, QueueInsert::VT_POSITION,"position");
5864    ::flatbuffers::WIPOffset::new(o.value())
5865  }
5866}
5867
5868impl ::core::fmt::Debug for QueueInsert<'_> {
5869  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5870    let mut ds = f.debug_struct("QueueInsert");
5871      ds.field("item", &self.item());
5872      ds.field("position_type", &self.position_type());
5873      match self.position_type() {
5874        QueuePosition::Index => {
5875          if let Some(x) = self.position_as_index() {
5876            ds.field("position", &x)
5877          } else {
5878            ds.field("position", &"InvalidFlatbuffer: Union discriminant does not match value.")
5879          }
5880        },
5881        QueuePosition::Front => {
5882          if let Some(x) = self.position_as_front() {
5883            ds.field("position", &x)
5884          } else {
5885            ds.field("position", &"InvalidFlatbuffer: Union discriminant does not match value.")
5886          }
5887        },
5888        QueuePosition::Back => {
5889          if let Some(x) = self.position_as_back() {
5890            ds.field("position", &x)
5891          } else {
5892            ds.field("position", &"InvalidFlatbuffer: Union discriminant does not match value.")
5893          }
5894        },
5895        _ => {
5896          let x: Option<()> = None;
5897          ds.field("position", &x)
5898        },
5899      };
5900      ds.finish()
5901  }
5902}
5903pub enum QueueRemoveOffset {}
5904#[derive(Copy, Clone, PartialEq)]
5905
5906pub struct QueueRemove<'a> {
5907  pub _tab: ::flatbuffers::Table<'a>,
5908}
5909
5910impl<'a> ::flatbuffers::Follow<'a> for QueueRemove<'a> {
5911  type Inner = QueueRemove<'a>;
5912  #[inline]
5913  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5914    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
5915  }
5916}
5917
5918impl<'a> QueueRemove<'a> {
5919  pub const VT_POSITION_TYPE: ::flatbuffers::VOffsetT = 4;
5920  pub const VT_POSITION: ::flatbuffers::VOffsetT = 6;
5921
5922  #[inline]
5923  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
5924    QueueRemove { _tab: table }
5925  }
5926  #[allow(unused_mut)]
5927  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
5928    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
5929    args: &'args QueueRemoveArgs
5930  ) -> ::flatbuffers::WIPOffset<QueueRemove<'bldr>> {
5931    let mut builder = QueueRemoveBuilder::new(_fbb);
5932    if let Some(x) = args.position { builder.add_position(x); }
5933    builder.add_position_type(args.position_type);
5934    builder.finish()
5935  }
5936
5937
5938  #[inline]
5939  pub fn position_type(&self) -> QueuePosition {
5940    // Safety:
5941    // Created from valid Table for this object
5942    // which contains a valid value in this slot
5943    unsafe { self._tab.get::<QueuePosition>(QueueRemove::VT_POSITION_TYPE, Some(QueuePosition::NONE)).unwrap()}
5944  }
5945  #[inline]
5946  pub fn position(&self) -> ::flatbuffers::Table<'a> {
5947    // Safety:
5948    // Created from valid Table for this object
5949    // which contains a valid value in this slot
5950    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>(QueueRemove::VT_POSITION, None).unwrap()}
5951  }
5952  #[inline]
5953  #[allow(non_snake_case)]
5954  pub fn position_as_index(&self) -> Option<QueueIndex<'a>> {
5955    if self.position_type() == QueuePosition::Index {
5956      let u = self.position();
5957      // Safety:
5958      // Created from a valid Table for this object
5959      // Which contains a valid union in this slot
5960      Some(unsafe { QueueIndex::init_from_table(u) })
5961    } else {
5962      None
5963    }
5964  }
5965
5966  #[inline]
5967  #[allow(non_snake_case)]
5968  pub fn position_as_front(&self) -> Option<QueueMarkerFront<'a>> {
5969    if self.position_type() == QueuePosition::Front {
5970      let u = self.position();
5971      // Safety:
5972      // Created from a valid Table for this object
5973      // Which contains a valid union in this slot
5974      Some(unsafe { QueueMarkerFront::init_from_table(u) })
5975    } else {
5976      None
5977    }
5978  }
5979
5980  #[inline]
5981  #[allow(non_snake_case)]
5982  pub fn position_as_back(&self) -> Option<QueueMarkerBack<'a>> {
5983    if self.position_type() == QueuePosition::Back {
5984      let u = self.position();
5985      // Safety:
5986      // Created from a valid Table for this object
5987      // Which contains a valid union in this slot
5988      Some(unsafe { QueueMarkerBack::init_from_table(u) })
5989    } else {
5990      None
5991    }
5992  }
5993
5994}
5995
5996impl ::flatbuffers::Verifiable for QueueRemove<'_> {
5997  #[inline]
5998  fn run_verifier(
5999    v: &mut ::flatbuffers::Verifier, pos: usize
6000  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
6001    v.visit_table(pos)?
6002     .visit_union::<QueuePosition, _>("position_type", Self::VT_POSITION_TYPE, "position", Self::VT_POSITION, true, |key, v, pos| {
6003        match key {
6004          QueuePosition::Index => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<QueueIndex>>("QueuePosition::Index", pos),
6005          QueuePosition::Front => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<QueueMarkerFront>>("QueuePosition::Front", pos),
6006          QueuePosition::Back => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<QueueMarkerBack>>("QueuePosition::Back", pos),
6007          _ => Ok(()),
6008        }
6009     })?
6010     .finish();
6011    Ok(())
6012  }
6013}
6014pub struct QueueRemoveArgs {
6015    pub position_type: QueuePosition,
6016    pub position: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>,
6017}
6018impl<'a> Default for QueueRemoveArgs {
6019  #[inline]
6020  fn default() -> Self {
6021    QueueRemoveArgs {
6022      position_type: QueuePosition::NONE,
6023      position: None, // required field
6024    }
6025  }
6026}
6027
6028pub struct QueueRemoveBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
6029  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
6030  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
6031}
6032impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> QueueRemoveBuilder<'a, 'b, A> {
6033  #[inline]
6034  pub fn add_position_type(&mut self, position_type: QueuePosition) {
6035    self.fbb_.push_slot::<QueuePosition>(QueueRemove::VT_POSITION_TYPE, position_type, QueuePosition::NONE);
6036  }
6037  #[inline]
6038  pub fn add_position(&mut self, position: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>) {
6039    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(QueueRemove::VT_POSITION, position);
6040  }
6041  #[inline]
6042  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> QueueRemoveBuilder<'a, 'b, A> {
6043    let start = _fbb.start_table();
6044    QueueRemoveBuilder {
6045      fbb_: _fbb,
6046      start_: start,
6047    }
6048  }
6049  #[inline]
6050  pub fn finish(self) -> ::flatbuffers::WIPOffset<QueueRemove<'a>> {
6051    let o = self.fbb_.end_table(self.start_);
6052    self.fbb_.required(o, QueueRemove::VT_POSITION,"position");
6053    ::flatbuffers::WIPOffset::new(o.value())
6054  }
6055}
6056
6057impl ::core::fmt::Debug for QueueRemove<'_> {
6058  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6059    let mut ds = f.debug_struct("QueueRemove");
6060      ds.field("position_type", &self.position_type());
6061      match self.position_type() {
6062        QueuePosition::Index => {
6063          if let Some(x) = self.position_as_index() {
6064            ds.field("position", &x)
6065          } else {
6066            ds.field("position", &"InvalidFlatbuffer: Union discriminant does not match value.")
6067          }
6068        },
6069        QueuePosition::Front => {
6070          if let Some(x) = self.position_as_front() {
6071            ds.field("position", &x)
6072          } else {
6073            ds.field("position", &"InvalidFlatbuffer: Union discriminant does not match value.")
6074          }
6075        },
6076        QueuePosition::Back => {
6077          if let Some(x) = self.position_as_back() {
6078            ds.field("position", &x)
6079          } else {
6080            ds.field("position", &"InvalidFlatbuffer: Union discriminant does not match value.")
6081          }
6082        },
6083        _ => {
6084          let x: Option<()> = None;
6085          ds.field("position", &x)
6086        },
6087      };
6088      ds.finish()
6089  }
6090}
6091pub enum QueueItemSelectedOffset {}
6092#[derive(Copy, Clone, PartialEq)]
6093
6094pub struct QueueItemSelected<'a> {
6095  pub _tab: ::flatbuffers::Table<'a>,
6096}
6097
6098impl<'a> ::flatbuffers::Follow<'a> for QueueItemSelected<'a> {
6099  type Inner = QueueItemSelected<'a>;
6100  #[inline]
6101  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6102    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
6103  }
6104}
6105
6106impl<'a> QueueItemSelected<'a> {
6107  pub const VT_POSITION_TYPE: ::flatbuffers::VOffsetT = 4;
6108  pub const VT_POSITION: ::flatbuffers::VOffsetT = 6;
6109
6110  #[inline]
6111  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
6112    QueueItemSelected { _tab: table }
6113  }
6114  #[allow(unused_mut)]
6115  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
6116    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
6117    args: &'args QueueItemSelectedArgs
6118  ) -> ::flatbuffers::WIPOffset<QueueItemSelected<'bldr>> {
6119    let mut builder = QueueItemSelectedBuilder::new(_fbb);
6120    if let Some(x) = args.position { builder.add_position(x); }
6121    builder.add_position_type(args.position_type);
6122    builder.finish()
6123  }
6124
6125
6126  #[inline]
6127  pub fn position_type(&self) -> QueuePosition {
6128    // Safety:
6129    // Created from valid Table for this object
6130    // which contains a valid value in this slot
6131    unsafe { self._tab.get::<QueuePosition>(QueueItemSelected::VT_POSITION_TYPE, Some(QueuePosition::NONE)).unwrap()}
6132  }
6133  #[inline]
6134  pub fn position(&self) -> ::flatbuffers::Table<'a> {
6135    // Safety:
6136    // Created from valid Table for this object
6137    // which contains a valid value in this slot
6138    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>(QueueItemSelected::VT_POSITION, None).unwrap()}
6139  }
6140  #[inline]
6141  #[allow(non_snake_case)]
6142  pub fn position_as_index(&self) -> Option<QueueIndex<'a>> {
6143    if self.position_type() == QueuePosition::Index {
6144      let u = self.position();
6145      // Safety:
6146      // Created from a valid Table for this object
6147      // Which contains a valid union in this slot
6148      Some(unsafe { QueueIndex::init_from_table(u) })
6149    } else {
6150      None
6151    }
6152  }
6153
6154  #[inline]
6155  #[allow(non_snake_case)]
6156  pub fn position_as_front(&self) -> Option<QueueMarkerFront<'a>> {
6157    if self.position_type() == QueuePosition::Front {
6158      let u = self.position();
6159      // Safety:
6160      // Created from a valid Table for this object
6161      // Which contains a valid union in this slot
6162      Some(unsafe { QueueMarkerFront::init_from_table(u) })
6163    } else {
6164      None
6165    }
6166  }
6167
6168  #[inline]
6169  #[allow(non_snake_case)]
6170  pub fn position_as_back(&self) -> Option<QueueMarkerBack<'a>> {
6171    if self.position_type() == QueuePosition::Back {
6172      let u = self.position();
6173      // Safety:
6174      // Created from a valid Table for this object
6175      // Which contains a valid union in this slot
6176      Some(unsafe { QueueMarkerBack::init_from_table(u) })
6177    } else {
6178      None
6179    }
6180  }
6181
6182}
6183
6184impl ::flatbuffers::Verifiable for QueueItemSelected<'_> {
6185  #[inline]
6186  fn run_verifier(
6187    v: &mut ::flatbuffers::Verifier, pos: usize
6188  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
6189    v.visit_table(pos)?
6190     .visit_union::<QueuePosition, _>("position_type", Self::VT_POSITION_TYPE, "position", Self::VT_POSITION, true, |key, v, pos| {
6191        match key {
6192          QueuePosition::Index => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<QueueIndex>>("QueuePosition::Index", pos),
6193          QueuePosition::Front => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<QueueMarkerFront>>("QueuePosition::Front", pos),
6194          QueuePosition::Back => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<QueueMarkerBack>>("QueuePosition::Back", pos),
6195          _ => Ok(()),
6196        }
6197     })?
6198     .finish();
6199    Ok(())
6200  }
6201}
6202pub struct QueueItemSelectedArgs {
6203    pub position_type: QueuePosition,
6204    pub position: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>,
6205}
6206impl<'a> Default for QueueItemSelectedArgs {
6207  #[inline]
6208  fn default() -> Self {
6209    QueueItemSelectedArgs {
6210      position_type: QueuePosition::NONE,
6211      position: None, // required field
6212    }
6213  }
6214}
6215
6216pub struct QueueItemSelectedBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
6217  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
6218  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
6219}
6220impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> QueueItemSelectedBuilder<'a, 'b, A> {
6221  #[inline]
6222  pub fn add_position_type(&mut self, position_type: QueuePosition) {
6223    self.fbb_.push_slot::<QueuePosition>(QueueItemSelected::VT_POSITION_TYPE, position_type, QueuePosition::NONE);
6224  }
6225  #[inline]
6226  pub fn add_position(&mut self, position: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>) {
6227    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(QueueItemSelected::VT_POSITION, position);
6228  }
6229  #[inline]
6230  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> QueueItemSelectedBuilder<'a, 'b, A> {
6231    let start = _fbb.start_table();
6232    QueueItemSelectedBuilder {
6233      fbb_: _fbb,
6234      start_: start,
6235    }
6236  }
6237  #[inline]
6238  pub fn finish(self) -> ::flatbuffers::WIPOffset<QueueItemSelected<'a>> {
6239    let o = self.fbb_.end_table(self.start_);
6240    self.fbb_.required(o, QueueItemSelected::VT_POSITION,"position");
6241    ::flatbuffers::WIPOffset::new(o.value())
6242  }
6243}
6244
6245impl ::core::fmt::Debug for QueueItemSelected<'_> {
6246  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6247    let mut ds = f.debug_struct("QueueItemSelected");
6248      ds.field("position_type", &self.position_type());
6249      match self.position_type() {
6250        QueuePosition::Index => {
6251          if let Some(x) = self.position_as_index() {
6252            ds.field("position", &x)
6253          } else {
6254            ds.field("position", &"InvalidFlatbuffer: Union discriminant does not match value.")
6255          }
6256        },
6257        QueuePosition::Front => {
6258          if let Some(x) = self.position_as_front() {
6259            ds.field("position", &x)
6260          } else {
6261            ds.field("position", &"InvalidFlatbuffer: Union discriminant does not match value.")
6262          }
6263        },
6264        QueuePosition::Back => {
6265          if let Some(x) = self.position_as_back() {
6266            ds.field("position", &x)
6267          } else {
6268            ds.field("position", &"InvalidFlatbuffer: Union discriminant does not match value.")
6269          }
6270        },
6271        _ => {
6272          let x: Option<()> = None;
6273          ds.field("position", &x)
6274        },
6275      };
6276      ds.finish()
6277  }
6278}
6279pub enum TracksAvailableOffset {}
6280#[derive(Copy, Clone, PartialEq)]
6281
6282pub struct TracksAvailable<'a> {
6283  pub _tab: ::flatbuffers::Table<'a>,
6284}
6285
6286impl<'a> ::flatbuffers::Follow<'a> for TracksAvailable<'a> {
6287  type Inner = TracksAvailable<'a>;
6288  #[inline]
6289  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6290    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
6291  }
6292}
6293
6294impl<'a> TracksAvailable<'a> {
6295  pub const VT_TRACKS: ::flatbuffers::VOffsetT = 4;
6296
6297  #[inline]
6298  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
6299    TracksAvailable { _tab: table }
6300  }
6301  #[allow(unused_mut)]
6302  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
6303    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
6304    args: &'args TracksAvailableArgs<'args>
6305  ) -> ::flatbuffers::WIPOffset<TracksAvailable<'bldr>> {
6306    let mut builder = TracksAvailableBuilder::new(_fbb);
6307    if let Some(x) = args.tracks { builder.add_tracks(x); }
6308    builder.finish()
6309  }
6310
6311
6312  #[inline]
6313  pub fn tracks(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<MediaTrack<'a>>>> {
6314    // Safety:
6315    // Created from valid Table for this object
6316    // which contains a valid value in this slot
6317    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<MediaTrack>>>>(TracksAvailable::VT_TRACKS, None)}
6318  }
6319}
6320
6321impl ::flatbuffers::Verifiable for TracksAvailable<'_> {
6322  #[inline]
6323  fn run_verifier(
6324    v: &mut ::flatbuffers::Verifier, pos: usize
6325  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
6326    v.visit_table(pos)?
6327     .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<MediaTrack>>>>("tracks", Self::VT_TRACKS, false)?
6328     .finish();
6329    Ok(())
6330  }
6331}
6332pub struct TracksAvailableArgs<'a> {
6333    pub tracks: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<MediaTrack<'a>>>>>,
6334}
6335impl<'a> Default for TracksAvailableArgs<'a> {
6336  #[inline]
6337  fn default() -> Self {
6338    TracksAvailableArgs {
6339      tracks: None,
6340    }
6341  }
6342}
6343
6344pub struct TracksAvailableBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
6345  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
6346  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
6347}
6348impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> TracksAvailableBuilder<'a, 'b, A> {
6349  #[inline]
6350  pub fn add_tracks(&mut self, tracks: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<MediaTrack<'b >>>>) {
6351    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(TracksAvailable::VT_TRACKS, tracks);
6352  }
6353  #[inline]
6354  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> TracksAvailableBuilder<'a, 'b, A> {
6355    let start = _fbb.start_table();
6356    TracksAvailableBuilder {
6357      fbb_: _fbb,
6358      start_: start,
6359    }
6360  }
6361  #[inline]
6362  pub fn finish(self) -> ::flatbuffers::WIPOffset<TracksAvailable<'a>> {
6363    let o = self.fbb_.end_table(self.start_);
6364    ::flatbuffers::WIPOffset::new(o.value())
6365  }
6366}
6367
6368impl ::core::fmt::Debug for TracksAvailable<'_> {
6369  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6370    let mut ds = f.debug_struct("TracksAvailable");
6371      ds.field("tracks", &self.tracks());
6372      ds.finish()
6373  }
6374}
6375pub enum ChangeTrackOffset {}
6376#[derive(Copy, Clone, PartialEq)]
6377
6378pub struct ChangeTrack<'a> {
6379  pub _tab: ::flatbuffers::Table<'a>,
6380}
6381
6382impl<'a> ::flatbuffers::Follow<'a> for ChangeTrack<'a> {
6383  type Inner = ChangeTrack<'a>;
6384  #[inline]
6385  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6386    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
6387  }
6388}
6389
6390impl<'a> ChangeTrack<'a> {
6391  pub const VT_ID: ::flatbuffers::VOffsetT = 4;
6392  pub const VT_TRACK_TYPE: ::flatbuffers::VOffsetT = 6;
6393
6394  #[inline]
6395  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
6396    ChangeTrack { _tab: table }
6397  }
6398  #[allow(unused_mut)]
6399  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
6400    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
6401    args: &'args ChangeTrackArgs
6402  ) -> ::flatbuffers::WIPOffset<ChangeTrack<'bldr>> {
6403    let mut builder = ChangeTrackBuilder::new(_fbb);
6404    if let Some(x) = args.id { builder.add_id(x); }
6405    builder.add_track_type(args.track_type);
6406    builder.finish()
6407  }
6408
6409
6410  #[inline]
6411  pub fn id(&self) -> Option<u32> {
6412    // Safety:
6413    // Created from valid Table for this object
6414    // which contains a valid value in this slot
6415    unsafe { self._tab.get::<u32>(ChangeTrack::VT_ID, None)}
6416  }
6417  #[inline]
6418  pub fn track_type(&self) -> MediaTrackType {
6419    // Safety:
6420    // Created from valid Table for this object
6421    // which contains a valid value in this slot
6422    unsafe { self._tab.get::<MediaTrackType>(ChangeTrack::VT_TRACK_TYPE, Some(MediaTrackType::Video)).unwrap()}
6423  }
6424}
6425
6426impl ::flatbuffers::Verifiable for ChangeTrack<'_> {
6427  #[inline]
6428  fn run_verifier(
6429    v: &mut ::flatbuffers::Verifier, pos: usize
6430  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
6431    v.visit_table(pos)?
6432     .visit_field::<u32>("id", Self::VT_ID, false)?
6433     .visit_field::<MediaTrackType>("track_type", Self::VT_TRACK_TYPE, false)?
6434     .finish();
6435    Ok(())
6436  }
6437}
6438pub struct ChangeTrackArgs {
6439    pub id: Option<u32>,
6440    pub track_type: MediaTrackType,
6441}
6442impl<'a> Default for ChangeTrackArgs {
6443  #[inline]
6444  fn default() -> Self {
6445    ChangeTrackArgs {
6446      id: None,
6447      track_type: MediaTrackType::Video,
6448    }
6449  }
6450}
6451
6452pub struct ChangeTrackBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
6453  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
6454  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
6455}
6456impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> ChangeTrackBuilder<'a, 'b, A> {
6457  #[inline]
6458  pub fn add_id(&mut self, id: u32) {
6459    self.fbb_.push_slot_always::<u32>(ChangeTrack::VT_ID, id);
6460  }
6461  #[inline]
6462  pub fn add_track_type(&mut self, track_type: MediaTrackType) {
6463    self.fbb_.push_slot::<MediaTrackType>(ChangeTrack::VT_TRACK_TYPE, track_type, MediaTrackType::Video);
6464  }
6465  #[inline]
6466  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> ChangeTrackBuilder<'a, 'b, A> {
6467    let start = _fbb.start_table();
6468    ChangeTrackBuilder {
6469      fbb_: _fbb,
6470      start_: start,
6471    }
6472  }
6473  #[inline]
6474  pub fn finish(self) -> ::flatbuffers::WIPOffset<ChangeTrack<'a>> {
6475    let o = self.fbb_.end_table(self.start_);
6476    ::flatbuffers::WIPOffset::new(o.value())
6477  }
6478}
6479
6480impl ::core::fmt::Debug for ChangeTrack<'_> {
6481  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6482    let mut ds = f.debug_struct("ChangeTrack");
6483      ds.field("id", &self.id());
6484      ds.field("track_type", &self.track_type());
6485      ds.finish()
6486  }
6487}
6488pub enum SenderIntroductionOffset {}
6489#[derive(Copy, Clone, PartialEq)]
6490
6491pub struct SenderIntroduction<'a> {
6492  pub _tab: ::flatbuffers::Table<'a>,
6493}
6494
6495impl<'a> ::flatbuffers::Follow<'a> for SenderIntroduction<'a> {
6496  type Inner = SenderIntroduction<'a>;
6497  #[inline]
6498  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6499    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
6500  }
6501}
6502
6503impl<'a> SenderIntroduction<'a> {
6504  pub const VT_DEVICE_INFO: ::flatbuffers::VOffsetT = 4;
6505
6506  #[inline]
6507  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
6508    SenderIntroduction { _tab: table }
6509  }
6510  #[allow(unused_mut)]
6511  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
6512    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
6513    args: &'args SenderIntroductionArgs<'args>
6514  ) -> ::flatbuffers::WIPOffset<SenderIntroduction<'bldr>> {
6515    let mut builder = SenderIntroductionBuilder::new(_fbb);
6516    if let Some(x) = args.device_info { builder.add_device_info(x); }
6517    builder.finish()
6518  }
6519
6520
6521  #[inline]
6522  pub fn device_info(&self) -> DeviceInfo<'a> {
6523    // Safety:
6524    // Created from valid Table for this object
6525    // which contains a valid value in this slot
6526    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<DeviceInfo>>(SenderIntroduction::VT_DEVICE_INFO, None).unwrap()}
6527  }
6528}
6529
6530impl ::flatbuffers::Verifiable for SenderIntroduction<'_> {
6531  #[inline]
6532  fn run_verifier(
6533    v: &mut ::flatbuffers::Verifier, pos: usize
6534  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
6535    v.visit_table(pos)?
6536     .visit_field::<::flatbuffers::ForwardsUOffset<DeviceInfo>>("device_info", Self::VT_DEVICE_INFO, true)?
6537     .finish();
6538    Ok(())
6539  }
6540}
6541pub struct SenderIntroductionArgs<'a> {
6542    pub device_info: Option<::flatbuffers::WIPOffset<DeviceInfo<'a>>>,
6543}
6544impl<'a> Default for SenderIntroductionArgs<'a> {
6545  #[inline]
6546  fn default() -> Self {
6547    SenderIntroductionArgs {
6548      device_info: None, // required field
6549    }
6550  }
6551}
6552
6553pub struct SenderIntroductionBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
6554  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
6555  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
6556}
6557impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> SenderIntroductionBuilder<'a, 'b, A> {
6558  #[inline]
6559  pub fn add_device_info(&mut self, device_info: ::flatbuffers::WIPOffset<DeviceInfo<'b >>) {
6560    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<DeviceInfo>>(SenderIntroduction::VT_DEVICE_INFO, device_info);
6561  }
6562  #[inline]
6563  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> SenderIntroductionBuilder<'a, 'b, A> {
6564    let start = _fbb.start_table();
6565    SenderIntroductionBuilder {
6566      fbb_: _fbb,
6567      start_: start,
6568    }
6569  }
6570  #[inline]
6571  pub fn finish(self) -> ::flatbuffers::WIPOffset<SenderIntroduction<'a>> {
6572    let o = self.fbb_.end_table(self.start_);
6573    self.fbb_.required(o, SenderIntroduction::VT_DEVICE_INFO,"device_info");
6574    ::flatbuffers::WIPOffset::new(o.value())
6575  }
6576}
6577
6578impl ::core::fmt::Debug for SenderIntroduction<'_> {
6579  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6580    let mut ds = f.debug_struct("SenderIntroduction");
6581      ds.field("device_info", &self.device_info());
6582      ds.finish()
6583  }
6584}
6585pub enum ReceiverIntroductionOffset {}
6586#[derive(Copy, Clone, PartialEq)]
6587
6588pub struct ReceiverIntroduction<'a> {
6589  pub _tab: ::flatbuffers::Table<'a>,
6590}
6591
6592impl<'a> ::flatbuffers::Follow<'a> for ReceiverIntroduction<'a> {
6593  type Inner = ReceiverIntroduction<'a>;
6594  #[inline]
6595  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6596    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
6597  }
6598}
6599
6600impl<'a> ReceiverIntroduction<'a> {
6601  pub const VT_DEVICE_INFO: ::flatbuffers::VOffsetT = 4;
6602  pub const VT_CAPABILITIES: ::flatbuffers::VOffsetT = 6;
6603
6604  #[inline]
6605  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
6606    ReceiverIntroduction { _tab: table }
6607  }
6608  #[allow(unused_mut)]
6609  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
6610    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
6611    args: &'args ReceiverIntroductionArgs<'args>
6612  ) -> ::flatbuffers::WIPOffset<ReceiverIntroduction<'bldr>> {
6613    let mut builder = ReceiverIntroductionBuilder::new(_fbb);
6614    if let Some(x) = args.capabilities { builder.add_capabilities(x); }
6615    if let Some(x) = args.device_info { builder.add_device_info(x); }
6616    builder.finish()
6617  }
6618
6619
6620  #[inline]
6621  pub fn device_info(&self) -> DeviceInfo<'a> {
6622    // Safety:
6623    // Created from valid Table for this object
6624    // which contains a valid value in this slot
6625    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<DeviceInfo>>(ReceiverIntroduction::VT_DEVICE_INFO, None).unwrap()}
6626  }
6627  #[inline]
6628  pub fn capabilities(&self) -> Option<ReceiverCapabilities<'a>> {
6629    // Safety:
6630    // Created from valid Table for this object
6631    // which contains a valid value in this slot
6632    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<ReceiverCapabilities>>(ReceiverIntroduction::VT_CAPABILITIES, None)}
6633  }
6634}
6635
6636impl ::flatbuffers::Verifiable for ReceiverIntroduction<'_> {
6637  #[inline]
6638  fn run_verifier(
6639    v: &mut ::flatbuffers::Verifier, pos: usize
6640  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
6641    v.visit_table(pos)?
6642     .visit_field::<::flatbuffers::ForwardsUOffset<DeviceInfo>>("device_info", Self::VT_DEVICE_INFO, true)?
6643     .visit_field::<::flatbuffers::ForwardsUOffset<ReceiverCapabilities>>("capabilities", Self::VT_CAPABILITIES, false)?
6644     .finish();
6645    Ok(())
6646  }
6647}
6648pub struct ReceiverIntroductionArgs<'a> {
6649    pub device_info: Option<::flatbuffers::WIPOffset<DeviceInfo<'a>>>,
6650    pub capabilities: Option<::flatbuffers::WIPOffset<ReceiverCapabilities<'a>>>,
6651}
6652impl<'a> Default for ReceiverIntroductionArgs<'a> {
6653  #[inline]
6654  fn default() -> Self {
6655    ReceiverIntroductionArgs {
6656      device_info: None, // required field
6657      capabilities: None,
6658    }
6659  }
6660}
6661
6662pub struct ReceiverIntroductionBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
6663  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
6664  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
6665}
6666impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> ReceiverIntroductionBuilder<'a, 'b, A> {
6667  #[inline]
6668  pub fn add_device_info(&mut self, device_info: ::flatbuffers::WIPOffset<DeviceInfo<'b >>) {
6669    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<DeviceInfo>>(ReceiverIntroduction::VT_DEVICE_INFO, device_info);
6670  }
6671  #[inline]
6672  pub fn add_capabilities(&mut self, capabilities: ::flatbuffers::WIPOffset<ReceiverCapabilities<'b >>) {
6673    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<ReceiverCapabilities>>(ReceiverIntroduction::VT_CAPABILITIES, capabilities);
6674  }
6675  #[inline]
6676  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> ReceiverIntroductionBuilder<'a, 'b, A> {
6677    let start = _fbb.start_table();
6678    ReceiverIntroductionBuilder {
6679      fbb_: _fbb,
6680      start_: start,
6681    }
6682  }
6683  #[inline]
6684  pub fn finish(self) -> ::flatbuffers::WIPOffset<ReceiverIntroduction<'a>> {
6685    let o = self.fbb_.end_table(self.start_);
6686    self.fbb_.required(o, ReceiverIntroduction::VT_DEVICE_INFO,"device_info");
6687    ::flatbuffers::WIPOffset::new(o.value())
6688  }
6689}
6690
6691impl ::core::fmt::Debug for ReceiverIntroduction<'_> {
6692  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6693    let mut ds = f.debug_struct("ReceiverIntroduction");
6694      ds.field("device_info", &self.device_info());
6695      ds.field("capabilities", &self.capabilities());
6696      ds.finish()
6697  }
6698}
6699pub enum SpeedChangedOffset {}
6700#[derive(Copy, Clone, PartialEq)]
6701
6702pub struct SpeedChanged<'a> {
6703  pub _tab: ::flatbuffers::Table<'a>,
6704}
6705
6706impl<'a> ::flatbuffers::Follow<'a> for SpeedChanged<'a> {
6707  type Inner = SpeedChanged<'a>;
6708  #[inline]
6709  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6710    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
6711  }
6712}
6713
6714impl<'a> SpeedChanged<'a> {
6715  pub const VT_SPEED: ::flatbuffers::VOffsetT = 4;
6716
6717  #[inline]
6718  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
6719    SpeedChanged { _tab: table }
6720  }
6721  #[allow(unused_mut)]
6722  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
6723    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
6724    args: &'args SpeedChangedArgs
6725  ) -> ::flatbuffers::WIPOffset<SpeedChanged<'bldr>> {
6726    let mut builder = SpeedChangedBuilder::new(_fbb);
6727    builder.add_speed(args.speed);
6728    builder.finish()
6729  }
6730
6731
6732  #[inline]
6733  pub fn speed(&self) -> f32 {
6734    // Safety:
6735    // Created from valid Table for this object
6736    // which contains a valid value in this slot
6737    unsafe { self._tab.get::<f32>(SpeedChanged::VT_SPEED, Some(0.0)).unwrap()}
6738  }
6739}
6740
6741impl ::flatbuffers::Verifiable for SpeedChanged<'_> {
6742  #[inline]
6743  fn run_verifier(
6744    v: &mut ::flatbuffers::Verifier, pos: usize
6745  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
6746    v.visit_table(pos)?
6747     .visit_field::<f32>("speed", Self::VT_SPEED, false)?
6748     .finish();
6749    Ok(())
6750  }
6751}
6752pub struct SpeedChangedArgs {
6753    pub speed: f32,
6754}
6755impl<'a> Default for SpeedChangedArgs {
6756  #[inline]
6757  fn default() -> Self {
6758    SpeedChangedArgs {
6759      speed: 0.0,
6760    }
6761  }
6762}
6763
6764pub struct SpeedChangedBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
6765  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
6766  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
6767}
6768impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> SpeedChangedBuilder<'a, 'b, A> {
6769  #[inline]
6770  pub fn add_speed(&mut self, speed: f32) {
6771    self.fbb_.push_slot::<f32>(SpeedChanged::VT_SPEED, speed, 0.0);
6772  }
6773  #[inline]
6774  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> SpeedChangedBuilder<'a, 'b, A> {
6775    let start = _fbb.start_table();
6776    SpeedChangedBuilder {
6777      fbb_: _fbb,
6778      start_: start,
6779    }
6780  }
6781  #[inline]
6782  pub fn finish(self) -> ::flatbuffers::WIPOffset<SpeedChanged<'a>> {
6783    let o = self.fbb_.end_table(self.start_);
6784    ::flatbuffers::WIPOffset::new(o.value())
6785  }
6786}
6787
6788impl ::core::fmt::Debug for SpeedChanged<'_> {
6789  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6790    let mut ds = f.debug_struct("SpeedChanged");
6791      ds.field("speed", &self.speed());
6792      ds.finish()
6793  }
6794}
6795pub enum AddSubtitleSourceOffset {}
6796#[derive(Copy, Clone, PartialEq)]
6797
6798pub struct AddSubtitleSource<'a> {
6799  pub _tab: ::flatbuffers::Table<'a>,
6800}
6801
6802impl<'a> ::flatbuffers::Follow<'a> for AddSubtitleSource<'a> {
6803  type Inner = AddSubtitleSource<'a>;
6804  #[inline]
6805  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6806    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
6807  }
6808}
6809
6810impl<'a> AddSubtitleSource<'a> {
6811  pub const VT_URL: ::flatbuffers::VOffsetT = 4;
6812  pub const VT_SELECT: ::flatbuffers::VOffsetT = 6;
6813  pub const VT_NAME: ::flatbuffers::VOffsetT = 8;
6814  pub const VT_METADATA: ::flatbuffers::VOffsetT = 10;
6815
6816  #[inline]
6817  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
6818    AddSubtitleSource { _tab: table }
6819  }
6820  #[allow(unused_mut)]
6821  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
6822    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
6823    args: &'args AddSubtitleSourceArgs<'args>
6824  ) -> ::flatbuffers::WIPOffset<AddSubtitleSource<'bldr>> {
6825    let mut builder = AddSubtitleSourceBuilder::new(_fbb);
6826    if let Some(x) = args.metadata { builder.add_metadata(x); }
6827    if let Some(x) = args.name { builder.add_name(x); }
6828    if let Some(x) = args.url { builder.add_url(x); }
6829    builder.add_select(args.select);
6830    builder.finish()
6831  }
6832
6833
6834  #[inline]
6835  pub fn url(&self) -> &'a str {
6836    // Safety:
6837    // Created from valid Table for this object
6838    // which contains a valid value in this slot
6839    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(AddSubtitleSource::VT_URL, None).unwrap()}
6840  }
6841  #[inline]
6842  pub fn select(&self) -> bool {
6843    // Safety:
6844    // Created from valid Table for this object
6845    // which contains a valid value in this slot
6846    unsafe { self._tab.get::<bool>(AddSubtitleSource::VT_SELECT, Some(false)).unwrap()}
6847  }
6848  #[inline]
6849  pub fn name(&self) -> Option<&'a str> {
6850    // Safety:
6851    // Created from valid Table for this object
6852    // which contains a valid value in this slot
6853    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(AddSubtitleSource::VT_NAME, None)}
6854  }
6855  #[inline]
6856  pub fn metadata(&self) -> Option<SubtitleTrackMeta<'a>> {
6857    // Safety:
6858    // Created from valid Table for this object
6859    // which contains a valid value in this slot
6860    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<SubtitleTrackMeta>>(AddSubtitleSource::VT_METADATA, None)}
6861  }
6862}
6863
6864impl ::flatbuffers::Verifiable for AddSubtitleSource<'_> {
6865  #[inline]
6866  fn run_verifier(
6867    v: &mut ::flatbuffers::Verifier, pos: usize
6868  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
6869    v.visit_table(pos)?
6870     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("url", Self::VT_URL, true)?
6871     .visit_field::<bool>("select", Self::VT_SELECT, false)?
6872     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
6873     .visit_field::<::flatbuffers::ForwardsUOffset<SubtitleTrackMeta>>("metadata", Self::VT_METADATA, false)?
6874     .finish();
6875    Ok(())
6876  }
6877}
6878pub struct AddSubtitleSourceArgs<'a> {
6879    pub url: Option<::flatbuffers::WIPOffset<&'a str>>,
6880    pub select: bool,
6881    pub name: Option<::flatbuffers::WIPOffset<&'a str>>,
6882    pub metadata: Option<::flatbuffers::WIPOffset<SubtitleTrackMeta<'a>>>,
6883}
6884impl<'a> Default for AddSubtitleSourceArgs<'a> {
6885  #[inline]
6886  fn default() -> Self {
6887    AddSubtitleSourceArgs {
6888      url: None, // required field
6889      select: false,
6890      name: None,
6891      metadata: None,
6892    }
6893  }
6894}
6895
6896pub struct AddSubtitleSourceBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
6897  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
6898  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
6899}
6900impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> AddSubtitleSourceBuilder<'a, 'b, A> {
6901  #[inline]
6902  pub fn add_url(&mut self, url: ::flatbuffers::WIPOffset<&'b  str>) {
6903    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(AddSubtitleSource::VT_URL, url);
6904  }
6905  #[inline]
6906  pub fn add_select(&mut self, select: bool) {
6907    self.fbb_.push_slot::<bool>(AddSubtitleSource::VT_SELECT, select, false);
6908  }
6909  #[inline]
6910  pub fn add_name(&mut self, name: ::flatbuffers::WIPOffset<&'b  str>) {
6911    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(AddSubtitleSource::VT_NAME, name);
6912  }
6913  #[inline]
6914  pub fn add_metadata(&mut self, metadata: ::flatbuffers::WIPOffset<SubtitleTrackMeta<'b >>) {
6915    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<SubtitleTrackMeta>>(AddSubtitleSource::VT_METADATA, metadata);
6916  }
6917  #[inline]
6918  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> AddSubtitleSourceBuilder<'a, 'b, A> {
6919    let start = _fbb.start_table();
6920    AddSubtitleSourceBuilder {
6921      fbb_: _fbb,
6922      start_: start,
6923    }
6924  }
6925  #[inline]
6926  pub fn finish(self) -> ::flatbuffers::WIPOffset<AddSubtitleSource<'a>> {
6927    let o = self.fbb_.end_table(self.start_);
6928    self.fbb_.required(o, AddSubtitleSource::VT_URL,"url");
6929    ::flatbuffers::WIPOffset::new(o.value())
6930  }
6931}
6932
6933impl ::core::fmt::Debug for AddSubtitleSource<'_> {
6934  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6935    let mut ds = f.debug_struct("AddSubtitleSource");
6936      ds.field("url", &self.url());
6937      ds.field("select", &self.select());
6938      ds.field("name", &self.name());
6939      ds.field("metadata", &self.metadata());
6940      ds.finish()
6941  }
6942}
6943pub enum SetProgressUpdateIntervalOffset {}
6944#[derive(Copy, Clone, PartialEq)]
6945
6946pub struct SetProgressUpdateInterval<'a> {
6947  pub _tab: ::flatbuffers::Table<'a>,
6948}
6949
6950impl<'a> ::flatbuffers::Follow<'a> for SetProgressUpdateInterval<'a> {
6951  type Inner = SetProgressUpdateInterval<'a>;
6952  #[inline]
6953  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6954    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
6955  }
6956}
6957
6958impl<'a> SetProgressUpdateInterval<'a> {
6959  pub const VT_INTERVAL: ::flatbuffers::VOffsetT = 4;
6960
6961  #[inline]
6962  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
6963    SetProgressUpdateInterval { _tab: table }
6964  }
6965  #[allow(unused_mut)]
6966  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
6967    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
6968    args: &'args SetProgressUpdateIntervalArgs<'args>
6969  ) -> ::flatbuffers::WIPOffset<SetProgressUpdateInterval<'bldr>> {
6970    let mut builder = SetProgressUpdateIntervalBuilder::new(_fbb);
6971    if let Some(x) = args.interval { builder.add_interval(x); }
6972    builder.finish()
6973  }
6974
6975
6976  #[inline]
6977  pub fn interval(&self) -> Option<&'a Time> {
6978    // Safety:
6979    // Created from valid Table for this object
6980    // which contains a valid value in this slot
6981    unsafe { self._tab.get::<Time>(SetProgressUpdateInterval::VT_INTERVAL, None)}
6982  }
6983}
6984
6985impl ::flatbuffers::Verifiable for SetProgressUpdateInterval<'_> {
6986  #[inline]
6987  fn run_verifier(
6988    v: &mut ::flatbuffers::Verifier, pos: usize
6989  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
6990    v.visit_table(pos)?
6991     .visit_field::<Time>("interval", Self::VT_INTERVAL, false)?
6992     .finish();
6993    Ok(())
6994  }
6995}
6996pub struct SetProgressUpdateIntervalArgs<'a> {
6997    pub interval: Option<&'a Time>,
6998}
6999impl<'a> Default for SetProgressUpdateIntervalArgs<'a> {
7000  #[inline]
7001  fn default() -> Self {
7002    SetProgressUpdateIntervalArgs {
7003      interval: None,
7004    }
7005  }
7006}
7007
7008pub struct SetProgressUpdateIntervalBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
7009  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
7010  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
7011}
7012impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> SetProgressUpdateIntervalBuilder<'a, 'b, A> {
7013  #[inline]
7014  pub fn add_interval(&mut self, interval: &Time) {
7015    self.fbb_.push_slot_always::<&Time>(SetProgressUpdateInterval::VT_INTERVAL, interval);
7016  }
7017  #[inline]
7018  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> SetProgressUpdateIntervalBuilder<'a, 'b, A> {
7019    let start = _fbb.start_table();
7020    SetProgressUpdateIntervalBuilder {
7021      fbb_: _fbb,
7022      start_: start,
7023    }
7024  }
7025  #[inline]
7026  pub fn finish(self) -> ::flatbuffers::WIPOffset<SetProgressUpdateInterval<'a>> {
7027    let o = self.fbb_.end_table(self.start_);
7028    ::flatbuffers::WIPOffset::new(o.value())
7029  }
7030}
7031
7032impl ::core::fmt::Debug for SetProgressUpdateInterval<'_> {
7033  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7034    let mut ds = f.debug_struct("SetProgressUpdateInterval");
7035      ds.field("interval", &self.interval());
7036      ds.finish()
7037  }
7038}
7039pub enum StartMirroringSessionOffset {}
7040#[derive(Copy, Clone, PartialEq)]
7041
7042pub struct StartMirroringSession<'a> {
7043  pub _tab: ::flatbuffers::Table<'a>,
7044}
7045
7046impl<'a> ::flatbuffers::Follow<'a> for StartMirroringSession<'a> {
7047  type Inner = StartMirroringSession<'a>;
7048  #[inline]
7049  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7050    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
7051  }
7052}
7053
7054impl<'a> StartMirroringSession<'a> {
7055  pub const VT_SESSION_ID: ::flatbuffers::VOffsetT = 4;
7056
7057  #[inline]
7058  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
7059    StartMirroringSession { _tab: table }
7060  }
7061  #[allow(unused_mut)]
7062  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
7063    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
7064    args: &'args StartMirroringSessionArgs
7065  ) -> ::flatbuffers::WIPOffset<StartMirroringSession<'bldr>> {
7066    let mut builder = StartMirroringSessionBuilder::new(_fbb);
7067    builder.add_session_id(args.session_id);
7068    builder.finish()
7069  }
7070
7071
7072  #[inline]
7073  pub fn session_id(&self) -> u16 {
7074    // Safety:
7075    // Created from valid Table for this object
7076    // which contains a valid value in this slot
7077    unsafe { self._tab.get::<u16>(StartMirroringSession::VT_SESSION_ID, Some(0)).unwrap()}
7078  }
7079}
7080
7081impl ::flatbuffers::Verifiable for StartMirroringSession<'_> {
7082  #[inline]
7083  fn run_verifier(
7084    v: &mut ::flatbuffers::Verifier, pos: usize
7085  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
7086    v.visit_table(pos)?
7087     .visit_field::<u16>("session_id", Self::VT_SESSION_ID, false)?
7088     .finish();
7089    Ok(())
7090  }
7091}
7092pub struct StartMirroringSessionArgs {
7093    pub session_id: u16,
7094}
7095impl<'a> Default for StartMirroringSessionArgs {
7096  #[inline]
7097  fn default() -> Self {
7098    StartMirroringSessionArgs {
7099      session_id: 0,
7100    }
7101  }
7102}
7103
7104pub struct StartMirroringSessionBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
7105  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
7106  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
7107}
7108impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> StartMirroringSessionBuilder<'a, 'b, A> {
7109  #[inline]
7110  pub fn add_session_id(&mut self, session_id: u16) {
7111    self.fbb_.push_slot::<u16>(StartMirroringSession::VT_SESSION_ID, session_id, 0);
7112  }
7113  #[inline]
7114  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> StartMirroringSessionBuilder<'a, 'b, A> {
7115    let start = _fbb.start_table();
7116    StartMirroringSessionBuilder {
7117      fbb_: _fbb,
7118      start_: start,
7119    }
7120  }
7121  #[inline]
7122  pub fn finish(self) -> ::flatbuffers::WIPOffset<StartMirroringSession<'a>> {
7123    let o = self.fbb_.end_table(self.start_);
7124    ::flatbuffers::WIPOffset::new(o.value())
7125  }
7126}
7127
7128impl ::core::fmt::Debug for StartMirroringSession<'_> {
7129  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7130    let mut ds = f.debug_struct("StartMirroringSession");
7131      ds.field("session_id", &self.session_id());
7132      ds.finish()
7133  }
7134}
7135pub enum MirroringSessionDescriptionOffset {}
7136#[derive(Copy, Clone, PartialEq)]
7137
7138pub struct MirroringSessionDescription<'a> {
7139  pub _tab: ::flatbuffers::Table<'a>,
7140}
7141
7142impl<'a> ::flatbuffers::Follow<'a> for MirroringSessionDescription<'a> {
7143  type Inner = MirroringSessionDescription<'a>;
7144  #[inline]
7145  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7146    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
7147  }
7148}
7149
7150impl<'a> MirroringSessionDescription<'a> {
7151  pub const VT_SESSION_ID: ::flatbuffers::VOffsetT = 4;
7152  pub const VT_SDP: ::flatbuffers::VOffsetT = 6;
7153
7154  #[inline]
7155  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
7156    MirroringSessionDescription { _tab: table }
7157  }
7158  #[allow(unused_mut)]
7159  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
7160    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
7161    args: &'args MirroringSessionDescriptionArgs<'args>
7162  ) -> ::flatbuffers::WIPOffset<MirroringSessionDescription<'bldr>> {
7163    let mut builder = MirroringSessionDescriptionBuilder::new(_fbb);
7164    if let Some(x) = args.sdp { builder.add_sdp(x); }
7165    builder.add_session_id(args.session_id);
7166    builder.finish()
7167  }
7168
7169
7170  #[inline]
7171  pub fn session_id(&self) -> u16 {
7172    // Safety:
7173    // Created from valid Table for this object
7174    // which contains a valid value in this slot
7175    unsafe { self._tab.get::<u16>(MirroringSessionDescription::VT_SESSION_ID, Some(0)).unwrap()}
7176  }
7177  #[inline]
7178  pub fn sdp(&self) -> &'a str {
7179    // Safety:
7180    // Created from valid Table for this object
7181    // which contains a valid value in this slot
7182    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MirroringSessionDescription::VT_SDP, None).unwrap()}
7183  }
7184}
7185
7186impl ::flatbuffers::Verifiable for MirroringSessionDescription<'_> {
7187  #[inline]
7188  fn run_verifier(
7189    v: &mut ::flatbuffers::Verifier, pos: usize
7190  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
7191    v.visit_table(pos)?
7192     .visit_field::<u16>("session_id", Self::VT_SESSION_ID, false)?
7193     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("sdp", Self::VT_SDP, true)?
7194     .finish();
7195    Ok(())
7196  }
7197}
7198pub struct MirroringSessionDescriptionArgs<'a> {
7199    pub session_id: u16,
7200    pub sdp: Option<::flatbuffers::WIPOffset<&'a str>>,
7201}
7202impl<'a> Default for MirroringSessionDescriptionArgs<'a> {
7203  #[inline]
7204  fn default() -> Self {
7205    MirroringSessionDescriptionArgs {
7206      session_id: 0,
7207      sdp: None, // required field
7208    }
7209  }
7210}
7211
7212pub struct MirroringSessionDescriptionBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
7213  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
7214  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
7215}
7216impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> MirroringSessionDescriptionBuilder<'a, 'b, A> {
7217  #[inline]
7218  pub fn add_session_id(&mut self, session_id: u16) {
7219    self.fbb_.push_slot::<u16>(MirroringSessionDescription::VT_SESSION_ID, session_id, 0);
7220  }
7221  #[inline]
7222  pub fn add_sdp(&mut self, sdp: ::flatbuffers::WIPOffset<&'b  str>) {
7223    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MirroringSessionDescription::VT_SDP, sdp);
7224  }
7225  #[inline]
7226  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> MirroringSessionDescriptionBuilder<'a, 'b, A> {
7227    let start = _fbb.start_table();
7228    MirroringSessionDescriptionBuilder {
7229      fbb_: _fbb,
7230      start_: start,
7231    }
7232  }
7233  #[inline]
7234  pub fn finish(self) -> ::flatbuffers::WIPOffset<MirroringSessionDescription<'a>> {
7235    let o = self.fbb_.end_table(self.start_);
7236    self.fbb_.required(o, MirroringSessionDescription::VT_SDP,"sdp");
7237    ::flatbuffers::WIPOffset::new(o.value())
7238  }
7239}
7240
7241impl ::core::fmt::Debug for MirroringSessionDescription<'_> {
7242  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7243    let mut ds = f.debug_struct("MirroringSessionDescription");
7244      ds.field("session_id", &self.session_id());
7245      ds.field("sdp", &self.sdp());
7246      ds.finish()
7247  }
7248}
7249pub enum VolumeChangedOffset {}
7250#[derive(Copy, Clone, PartialEq)]
7251
7252pub struct VolumeChanged<'a> {
7253  pub _tab: ::flatbuffers::Table<'a>,
7254}
7255
7256impl<'a> ::flatbuffers::Follow<'a> for VolumeChanged<'a> {
7257  type Inner = VolumeChanged<'a>;
7258  #[inline]
7259  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7260    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
7261  }
7262}
7263
7264impl<'a> VolumeChanged<'a> {
7265  pub const VT_VOLUME: ::flatbuffers::VOffsetT = 4;
7266
7267  #[inline]
7268  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
7269    VolumeChanged { _tab: table }
7270  }
7271  #[allow(unused_mut)]
7272  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
7273    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
7274    args: &'args VolumeChangedArgs
7275  ) -> ::flatbuffers::WIPOffset<VolumeChanged<'bldr>> {
7276    let mut builder = VolumeChangedBuilder::new(_fbb);
7277    builder.add_volume(args.volume);
7278    builder.finish()
7279  }
7280
7281
7282  #[inline]
7283  pub fn volume(&self) -> f32 {
7284    // Safety:
7285    // Created from valid Table for this object
7286    // which contains a valid value in this slot
7287    unsafe { self._tab.get::<f32>(VolumeChanged::VT_VOLUME, Some(0.0)).unwrap()}
7288  }
7289}
7290
7291impl ::flatbuffers::Verifiable for VolumeChanged<'_> {
7292  #[inline]
7293  fn run_verifier(
7294    v: &mut ::flatbuffers::Verifier, pos: usize
7295  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
7296    v.visit_table(pos)?
7297     .visit_field::<f32>("volume", Self::VT_VOLUME, false)?
7298     .finish();
7299    Ok(())
7300  }
7301}
7302pub struct VolumeChangedArgs {
7303    pub volume: f32,
7304}
7305impl<'a> Default for VolumeChangedArgs {
7306  #[inline]
7307  fn default() -> Self {
7308    VolumeChangedArgs {
7309      volume: 0.0,
7310    }
7311  }
7312}
7313
7314pub struct VolumeChangedBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
7315  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
7316  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
7317}
7318impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> VolumeChangedBuilder<'a, 'b, A> {
7319  #[inline]
7320  pub fn add_volume(&mut self, volume: f32) {
7321    self.fbb_.push_slot::<f32>(VolumeChanged::VT_VOLUME, volume, 0.0);
7322  }
7323  #[inline]
7324  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> VolumeChangedBuilder<'a, 'b, A> {
7325    let start = _fbb.start_table();
7326    VolumeChangedBuilder {
7327      fbb_: _fbb,
7328      start_: start,
7329    }
7330  }
7331  #[inline]
7332  pub fn finish(self) -> ::flatbuffers::WIPOffset<VolumeChanged<'a>> {
7333    let o = self.fbb_.end_table(self.start_);
7334    ::flatbuffers::WIPOffset::new(o.value())
7335  }
7336}
7337
7338impl ::core::fmt::Debug for VolumeChanged<'_> {
7339  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7340    let mut ds = f.debug_struct("VolumeChanged");
7341      ds.field("volume", &self.volume());
7342      ds.finish()
7343  }
7344}
7345pub enum PlaybackStateChangedOffset {}
7346#[derive(Copy, Clone, PartialEq)]
7347
7348pub struct PlaybackStateChanged<'a> {
7349  pub _tab: ::flatbuffers::Table<'a>,
7350}
7351
7352impl<'a> ::flatbuffers::Follow<'a> for PlaybackStateChanged<'a> {
7353  type Inner = PlaybackStateChanged<'a>;
7354  #[inline]
7355  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7356    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
7357  }
7358}
7359
7360impl<'a> PlaybackStateChanged<'a> {
7361  pub const VT_STATE: ::flatbuffers::VOffsetT = 4;
7362
7363  #[inline]
7364  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
7365    PlaybackStateChanged { _tab: table }
7366  }
7367  #[allow(unused_mut)]
7368  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
7369    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
7370    args: &'args PlaybackStateChangedArgs
7371  ) -> ::flatbuffers::WIPOffset<PlaybackStateChanged<'bldr>> {
7372    let mut builder = PlaybackStateChangedBuilder::new(_fbb);
7373    builder.add_state(args.state);
7374    builder.finish()
7375  }
7376
7377
7378  #[inline]
7379  pub fn state(&self) -> PlaybackState {
7380    // Safety:
7381    // Created from valid Table for this object
7382    // which contains a valid value in this slot
7383    unsafe { self._tab.get::<PlaybackState>(PlaybackStateChanged::VT_STATE, Some(PlaybackState::Idle)).unwrap()}
7384  }
7385}
7386
7387impl ::flatbuffers::Verifiable for PlaybackStateChanged<'_> {
7388  #[inline]
7389  fn run_verifier(
7390    v: &mut ::flatbuffers::Verifier, pos: usize
7391  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
7392    v.visit_table(pos)?
7393     .visit_field::<PlaybackState>("state", Self::VT_STATE, false)?
7394     .finish();
7395    Ok(())
7396  }
7397}
7398pub struct PlaybackStateChangedArgs {
7399    pub state: PlaybackState,
7400}
7401impl<'a> Default for PlaybackStateChangedArgs {
7402  #[inline]
7403  fn default() -> Self {
7404    PlaybackStateChangedArgs {
7405      state: PlaybackState::Idle,
7406    }
7407  }
7408}
7409
7410pub struct PlaybackStateChangedBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
7411  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
7412  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
7413}
7414impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PlaybackStateChangedBuilder<'a, 'b, A> {
7415  #[inline]
7416  pub fn add_state(&mut self, state: PlaybackState) {
7417    self.fbb_.push_slot::<PlaybackState>(PlaybackStateChanged::VT_STATE, state, PlaybackState::Idle);
7418  }
7419  #[inline]
7420  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PlaybackStateChangedBuilder<'a, 'b, A> {
7421    let start = _fbb.start_table();
7422    PlaybackStateChangedBuilder {
7423      fbb_: _fbb,
7424      start_: start,
7425    }
7426  }
7427  #[inline]
7428  pub fn finish(self) -> ::flatbuffers::WIPOffset<PlaybackStateChanged<'a>> {
7429    let o = self.fbb_.end_table(self.start_);
7430    ::flatbuffers::WIPOffset::new(o.value())
7431  }
7432}
7433
7434impl ::core::fmt::Debug for PlaybackStateChanged<'_> {
7435  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7436    let mut ds = f.debug_struct("PlaybackStateChanged");
7437      ds.field("state", &self.state());
7438      ds.finish()
7439  }
7440}
7441pub enum ErrorOffset {}
7442#[derive(Copy, Clone, PartialEq)]
7443
7444pub struct Error<'a> {
7445  pub _tab: ::flatbuffers::Table<'a>,
7446}
7447
7448impl<'a> ::flatbuffers::Follow<'a> for Error<'a> {
7449  type Inner = Error<'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> Error<'a> {
7457  pub const VT_KIND: ::flatbuffers::VOffsetT = 4;
7458  pub const VT_PACKET_NUM: ::flatbuffers::VOffsetT = 6;
7459
7460  #[inline]
7461  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
7462    Error { _tab: table }
7463  }
7464  #[allow(unused_mut)]
7465  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
7466    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
7467    args: &'args ErrorArgs
7468  ) -> ::flatbuffers::WIPOffset<Error<'bldr>> {
7469    let mut builder = ErrorBuilder::new(_fbb);
7470    if let Some(x) = args.packet_num { builder.add_packet_num(x); }
7471    builder.add_kind(args.kind);
7472    builder.finish()
7473  }
7474
7475
7476  #[inline]
7477  pub fn kind(&self) -> ErrorKind {
7478    // Safety:
7479    // Created from valid Table for this object
7480    // which contains a valid value in this slot
7481    unsafe { self._tab.get::<ErrorKind>(Error::VT_KIND, Some(ErrorKind::InvalidOpcode)).unwrap()}
7482  }
7483  #[inline]
7484  pub fn packet_num(&self) -> Option<u32> {
7485    // Safety:
7486    // Created from valid Table for this object
7487    // which contains a valid value in this slot
7488    unsafe { self._tab.get::<u32>(Error::VT_PACKET_NUM, None)}
7489  }
7490}
7491
7492impl ::flatbuffers::Verifiable for Error<'_> {
7493  #[inline]
7494  fn run_verifier(
7495    v: &mut ::flatbuffers::Verifier, pos: usize
7496  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
7497    v.visit_table(pos)?
7498     .visit_field::<ErrorKind>("kind", Self::VT_KIND, false)?
7499     .visit_field::<u32>("packet_num", Self::VT_PACKET_NUM, false)?
7500     .finish();
7501    Ok(())
7502  }
7503}
7504pub struct ErrorArgs {
7505    pub kind: ErrorKind,
7506    pub packet_num: Option<u32>,
7507}
7508impl<'a> Default for ErrorArgs {
7509  #[inline]
7510  fn default() -> Self {
7511    ErrorArgs {
7512      kind: ErrorKind::InvalidOpcode,
7513      packet_num: None,
7514    }
7515  }
7516}
7517
7518pub struct ErrorBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
7519  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
7520  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
7521}
7522impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> ErrorBuilder<'a, 'b, A> {
7523  #[inline]
7524  pub fn add_kind(&mut self, kind: ErrorKind) {
7525    self.fbb_.push_slot::<ErrorKind>(Error::VT_KIND, kind, ErrorKind::InvalidOpcode);
7526  }
7527  #[inline]
7528  pub fn add_packet_num(&mut self, packet_num: u32) {
7529    self.fbb_.push_slot_always::<u32>(Error::VT_PACKET_NUM, packet_num);
7530  }
7531  #[inline]
7532  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> ErrorBuilder<'a, 'b, A> {
7533    let start = _fbb.start_table();
7534    ErrorBuilder {
7535      fbb_: _fbb,
7536      start_: start,
7537    }
7538  }
7539  #[inline]
7540  pub fn finish(self) -> ::flatbuffers::WIPOffset<Error<'a>> {
7541    let o = self.fbb_.end_table(self.start_);
7542    ::flatbuffers::WIPOffset::new(o.value())
7543  }
7544}
7545
7546impl ::core::fmt::Debug for Error<'_> {
7547  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7548    let mut ds = f.debug_struct("Error");
7549      ds.field("kind", &self.kind());
7550      ds.field("packet_num", &self.packet_num());
7551      ds.finish()
7552  }
7553}
7554pub enum StopPlaybackOffset {}
7555#[derive(Copy, Clone, PartialEq)]
7556
7557pub struct StopPlayback<'a> {
7558  pub _tab: ::flatbuffers::Table<'a>,
7559}
7560
7561impl<'a> ::flatbuffers::Follow<'a> for StopPlayback<'a> {
7562  type Inner = StopPlayback<'a>;
7563  #[inline]
7564  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7565    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
7566  }
7567}
7568
7569impl<'a> StopPlayback<'a> {
7570
7571  #[inline]
7572  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
7573    StopPlayback { _tab: table }
7574  }
7575  #[allow(unused_mut)]
7576  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
7577    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
7578    _args: &'args StopPlaybackArgs
7579  ) -> ::flatbuffers::WIPOffset<StopPlayback<'bldr>> {
7580    let mut builder = StopPlaybackBuilder::new(_fbb);
7581    builder.finish()
7582  }
7583
7584}
7585
7586impl ::flatbuffers::Verifiable for StopPlayback<'_> {
7587  #[inline]
7588  fn run_verifier(
7589    v: &mut ::flatbuffers::Verifier, pos: usize
7590  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
7591    v.visit_table(pos)?
7592     .finish();
7593    Ok(())
7594  }
7595}
7596pub struct StopPlaybackArgs {
7597}
7598impl<'a> Default for StopPlaybackArgs {
7599  #[inline]
7600  fn default() -> Self {
7601    StopPlaybackArgs {
7602    }
7603  }
7604}
7605
7606pub struct StopPlaybackBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
7607  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
7608  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
7609}
7610impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> StopPlaybackBuilder<'a, 'b, A> {
7611  #[inline]
7612  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> StopPlaybackBuilder<'a, 'b, A> {
7613    let start = _fbb.start_table();
7614    StopPlaybackBuilder {
7615      fbb_: _fbb,
7616      start_: start,
7617    }
7618  }
7619  #[inline]
7620  pub fn finish(self) -> ::flatbuffers::WIPOffset<StopPlayback<'a>> {
7621    let o = self.fbb_.end_table(self.start_);
7622    ::flatbuffers::WIPOffset::new(o.value())
7623  }
7624}
7625
7626impl ::core::fmt::Debug for StopPlayback<'_> {
7627  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7628    let mut ds = f.debug_struct("StopPlayback");
7629      ds.finish()
7630  }
7631}
7632pub enum CompanionHelloRequestOffset {}
7633#[derive(Copy, Clone, PartialEq)]
7634
7635pub struct CompanionHelloRequest<'a> {
7636  pub _tab: ::flatbuffers::Table<'a>,
7637}
7638
7639impl<'a> ::flatbuffers::Follow<'a> for CompanionHelloRequest<'a> {
7640  type Inner = CompanionHelloRequest<'a>;
7641  #[inline]
7642  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7643    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
7644  }
7645}
7646
7647impl<'a> CompanionHelloRequest<'a> {
7648
7649  #[inline]
7650  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
7651    CompanionHelloRequest { _tab: table }
7652  }
7653  #[allow(unused_mut)]
7654  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
7655    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
7656    _args: &'args CompanionHelloRequestArgs
7657  ) -> ::flatbuffers::WIPOffset<CompanionHelloRequest<'bldr>> {
7658    let mut builder = CompanionHelloRequestBuilder::new(_fbb);
7659    builder.finish()
7660  }
7661
7662}
7663
7664impl ::flatbuffers::Verifiable for CompanionHelloRequest<'_> {
7665  #[inline]
7666  fn run_verifier(
7667    v: &mut ::flatbuffers::Verifier, pos: usize
7668  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
7669    v.visit_table(pos)?
7670     .finish();
7671    Ok(())
7672  }
7673}
7674pub struct CompanionHelloRequestArgs {
7675}
7676impl<'a> Default for CompanionHelloRequestArgs {
7677  #[inline]
7678  fn default() -> Self {
7679    CompanionHelloRequestArgs {
7680    }
7681  }
7682}
7683
7684pub struct CompanionHelloRequestBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
7685  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
7686  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
7687}
7688impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> CompanionHelloRequestBuilder<'a, 'b, A> {
7689  #[inline]
7690  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> CompanionHelloRequestBuilder<'a, 'b, A> {
7691    let start = _fbb.start_table();
7692    CompanionHelloRequestBuilder {
7693      fbb_: _fbb,
7694      start_: start,
7695    }
7696  }
7697  #[inline]
7698  pub fn finish(self) -> ::flatbuffers::WIPOffset<CompanionHelloRequest<'a>> {
7699    let o = self.fbb_.end_table(self.start_);
7700    ::flatbuffers::WIPOffset::new(o.value())
7701  }
7702}
7703
7704impl ::core::fmt::Debug for CompanionHelloRequest<'_> {
7705  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7706    let mut ds = f.debug_struct("CompanionHelloRequest");
7707      ds.finish()
7708  }
7709}
7710pub enum CompanionHelloResponseOffset {}
7711#[derive(Copy, Clone, PartialEq)]
7712
7713pub struct CompanionHelloResponse<'a> {
7714  pub _tab: ::flatbuffers::Table<'a>,
7715}
7716
7717impl<'a> ::flatbuffers::Follow<'a> for CompanionHelloResponse<'a> {
7718  type Inner = CompanionHelloResponse<'a>;
7719  #[inline]
7720  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7721    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
7722  }
7723}
7724
7725impl<'a> CompanionHelloResponse<'a> {
7726  pub const VT_PROVIDER_ID: ::flatbuffers::VOffsetT = 4;
7727
7728  #[inline]
7729  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
7730    CompanionHelloResponse { _tab: table }
7731  }
7732  #[allow(unused_mut)]
7733  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
7734    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
7735    args: &'args CompanionHelloResponseArgs
7736  ) -> ::flatbuffers::WIPOffset<CompanionHelloResponse<'bldr>> {
7737    let mut builder = CompanionHelloResponseBuilder::new(_fbb);
7738    builder.add_provider_id(args.provider_id);
7739    builder.finish()
7740  }
7741
7742
7743  #[inline]
7744  pub fn provider_id(&self) -> u16 {
7745    // Safety:
7746    // Created from valid Table for this object
7747    // which contains a valid value in this slot
7748    unsafe { self._tab.get::<u16>(CompanionHelloResponse::VT_PROVIDER_ID, Some(0)).unwrap()}
7749  }
7750}
7751
7752impl ::flatbuffers::Verifiable for CompanionHelloResponse<'_> {
7753  #[inline]
7754  fn run_verifier(
7755    v: &mut ::flatbuffers::Verifier, pos: usize
7756  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
7757    v.visit_table(pos)?
7758     .visit_field::<u16>("provider_id", Self::VT_PROVIDER_ID, false)?
7759     .finish();
7760    Ok(())
7761  }
7762}
7763pub struct CompanionHelloResponseArgs {
7764    pub provider_id: u16,
7765}
7766impl<'a> Default for CompanionHelloResponseArgs {
7767  #[inline]
7768  fn default() -> Self {
7769    CompanionHelloResponseArgs {
7770      provider_id: 0,
7771    }
7772  }
7773}
7774
7775pub struct CompanionHelloResponseBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
7776  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
7777  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
7778}
7779impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> CompanionHelloResponseBuilder<'a, 'b, A> {
7780  #[inline]
7781  pub fn add_provider_id(&mut self, provider_id: u16) {
7782    self.fbb_.push_slot::<u16>(CompanionHelloResponse::VT_PROVIDER_ID, provider_id, 0);
7783  }
7784  #[inline]
7785  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> CompanionHelloResponseBuilder<'a, 'b, A> {
7786    let start = _fbb.start_table();
7787    CompanionHelloResponseBuilder {
7788      fbb_: _fbb,
7789      start_: start,
7790    }
7791  }
7792  #[inline]
7793  pub fn finish(self) -> ::flatbuffers::WIPOffset<CompanionHelloResponse<'a>> {
7794    let o = self.fbb_.end_table(self.start_);
7795    ::flatbuffers::WIPOffset::new(o.value())
7796  }
7797}
7798
7799impl ::core::fmt::Debug for CompanionHelloResponse<'_> {
7800  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7801    let mut ds = f.debug_struct("CompanionHelloResponse");
7802      ds.field("provider_id", &self.provider_id());
7803      ds.finish()
7804  }
7805}
7806pub enum CompanionResourceInfoRequestOffset {}
7807#[derive(Copy, Clone, PartialEq)]
7808
7809pub struct CompanionResourceInfoRequest<'a> {
7810  pub _tab: ::flatbuffers::Table<'a>,
7811}
7812
7813impl<'a> ::flatbuffers::Follow<'a> for CompanionResourceInfoRequest<'a> {
7814  type Inner = CompanionResourceInfoRequest<'a>;
7815  #[inline]
7816  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7817    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
7818  }
7819}
7820
7821impl<'a> CompanionResourceInfoRequest<'a> {
7822  pub const VT_REQUEST_ID: ::flatbuffers::VOffsetT = 4;
7823  pub const VT_RESOURCE_ID: ::flatbuffers::VOffsetT = 6;
7824
7825  #[inline]
7826  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
7827    CompanionResourceInfoRequest { _tab: table }
7828  }
7829  #[allow(unused_mut)]
7830  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
7831    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
7832    args: &'args CompanionResourceInfoRequestArgs
7833  ) -> ::flatbuffers::WIPOffset<CompanionResourceInfoRequest<'bldr>> {
7834    let mut builder = CompanionResourceInfoRequestBuilder::new(_fbb);
7835    builder.add_resource_id(args.resource_id);
7836    builder.add_request_id(args.request_id);
7837    builder.finish()
7838  }
7839
7840
7841  #[inline]
7842  pub fn request_id(&self) -> u32 {
7843    // Safety:
7844    // Created from valid Table for this object
7845    // which contains a valid value in this slot
7846    unsafe { self._tab.get::<u32>(CompanionResourceInfoRequest::VT_REQUEST_ID, Some(0)).unwrap()}
7847  }
7848  #[inline]
7849  pub fn resource_id(&self) -> u32 {
7850    // Safety:
7851    // Created from valid Table for this object
7852    // which contains a valid value in this slot
7853    unsafe { self._tab.get::<u32>(CompanionResourceInfoRequest::VT_RESOURCE_ID, Some(0)).unwrap()}
7854  }
7855}
7856
7857impl ::flatbuffers::Verifiable for CompanionResourceInfoRequest<'_> {
7858  #[inline]
7859  fn run_verifier(
7860    v: &mut ::flatbuffers::Verifier, pos: usize
7861  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
7862    v.visit_table(pos)?
7863     .visit_field::<u32>("request_id", Self::VT_REQUEST_ID, false)?
7864     .visit_field::<u32>("resource_id", Self::VT_RESOURCE_ID, false)?
7865     .finish();
7866    Ok(())
7867  }
7868}
7869pub struct CompanionResourceInfoRequestArgs {
7870    pub request_id: u32,
7871    pub resource_id: u32,
7872}
7873impl<'a> Default for CompanionResourceInfoRequestArgs {
7874  #[inline]
7875  fn default() -> Self {
7876    CompanionResourceInfoRequestArgs {
7877      request_id: 0,
7878      resource_id: 0,
7879    }
7880  }
7881}
7882
7883pub struct CompanionResourceInfoRequestBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
7884  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
7885  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
7886}
7887impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> CompanionResourceInfoRequestBuilder<'a, 'b, A> {
7888  #[inline]
7889  pub fn add_request_id(&mut self, request_id: u32) {
7890    self.fbb_.push_slot::<u32>(CompanionResourceInfoRequest::VT_REQUEST_ID, request_id, 0);
7891  }
7892  #[inline]
7893  pub fn add_resource_id(&mut self, resource_id: u32) {
7894    self.fbb_.push_slot::<u32>(CompanionResourceInfoRequest::VT_RESOURCE_ID, resource_id, 0);
7895  }
7896  #[inline]
7897  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> CompanionResourceInfoRequestBuilder<'a, 'b, A> {
7898    let start = _fbb.start_table();
7899    CompanionResourceInfoRequestBuilder {
7900      fbb_: _fbb,
7901      start_: start,
7902    }
7903  }
7904  #[inline]
7905  pub fn finish(self) -> ::flatbuffers::WIPOffset<CompanionResourceInfoRequest<'a>> {
7906    let o = self.fbb_.end_table(self.start_);
7907    ::flatbuffers::WIPOffset::new(o.value())
7908  }
7909}
7910
7911impl ::core::fmt::Debug for CompanionResourceInfoRequest<'_> {
7912  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7913    let mut ds = f.debug_struct("CompanionResourceInfoRequest");
7914      ds.field("request_id", &self.request_id());
7915      ds.field("resource_id", &self.resource_id());
7916      ds.finish()
7917  }
7918}
7919pub enum UnknownResourceSizeOffset {}
7920#[derive(Copy, Clone, PartialEq)]
7921
7922pub struct UnknownResourceSize<'a> {
7923  pub _tab: ::flatbuffers::Table<'a>,
7924}
7925
7926impl<'a> ::flatbuffers::Follow<'a> for UnknownResourceSize<'a> {
7927  type Inner = UnknownResourceSize<'a>;
7928  #[inline]
7929  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7930    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
7931  }
7932}
7933
7934impl<'a> UnknownResourceSize<'a> {
7935
7936  #[inline]
7937  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
7938    UnknownResourceSize { _tab: table }
7939  }
7940  #[allow(unused_mut)]
7941  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
7942    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
7943    _args: &'args UnknownResourceSizeArgs
7944  ) -> ::flatbuffers::WIPOffset<UnknownResourceSize<'bldr>> {
7945    let mut builder = UnknownResourceSizeBuilder::new(_fbb);
7946    builder.finish()
7947  }
7948
7949}
7950
7951impl ::flatbuffers::Verifiable for UnknownResourceSize<'_> {
7952  #[inline]
7953  fn run_verifier(
7954    v: &mut ::flatbuffers::Verifier, pos: usize
7955  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
7956    v.visit_table(pos)?
7957     .finish();
7958    Ok(())
7959  }
7960}
7961pub struct UnknownResourceSizeArgs {
7962}
7963impl<'a> Default for UnknownResourceSizeArgs {
7964  #[inline]
7965  fn default() -> Self {
7966    UnknownResourceSizeArgs {
7967    }
7968  }
7969}
7970
7971pub struct UnknownResourceSizeBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
7972  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
7973  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
7974}
7975impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> UnknownResourceSizeBuilder<'a, 'b, A> {
7976  #[inline]
7977  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> UnknownResourceSizeBuilder<'a, 'b, A> {
7978    let start = _fbb.start_table();
7979    UnknownResourceSizeBuilder {
7980      fbb_: _fbb,
7981      start_: start,
7982    }
7983  }
7984  #[inline]
7985  pub fn finish(self) -> ::flatbuffers::WIPOffset<UnknownResourceSize<'a>> {
7986    let o = self.fbb_.end_table(self.start_);
7987    ::flatbuffers::WIPOffset::new(o.value())
7988  }
7989}
7990
7991impl ::core::fmt::Debug for UnknownResourceSize<'_> {
7992  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7993    let mut ds = f.debug_struct("UnknownResourceSize");
7994      ds.finish()
7995  }
7996}
7997pub enum KnownResourceSizeOffset {}
7998#[derive(Copy, Clone, PartialEq)]
7999
8000pub struct KnownResourceSize<'a> {
8001  pub _tab: ::flatbuffers::Table<'a>,
8002}
8003
8004impl<'a> ::flatbuffers::Follow<'a> for KnownResourceSize<'a> {
8005  type Inner = KnownResourceSize<'a>;
8006  #[inline]
8007  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
8008    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
8009  }
8010}
8011
8012impl<'a> KnownResourceSize<'a> {
8013  pub const VT_SIZE: ::flatbuffers::VOffsetT = 4;
8014
8015  #[inline]
8016  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
8017    KnownResourceSize { _tab: table }
8018  }
8019  #[allow(unused_mut)]
8020  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
8021    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
8022    args: &'args KnownResourceSizeArgs
8023  ) -> ::flatbuffers::WIPOffset<KnownResourceSize<'bldr>> {
8024    let mut builder = KnownResourceSizeBuilder::new(_fbb);
8025    builder.add_size(args.size);
8026    builder.finish()
8027  }
8028
8029
8030  #[inline]
8031  pub fn size(&self) -> u64 {
8032    // Safety:
8033    // Created from valid Table for this object
8034    // which contains a valid value in this slot
8035    unsafe { self._tab.get::<u64>(KnownResourceSize::VT_SIZE, Some(0)).unwrap()}
8036  }
8037}
8038
8039impl ::flatbuffers::Verifiable for KnownResourceSize<'_> {
8040  #[inline]
8041  fn run_verifier(
8042    v: &mut ::flatbuffers::Verifier, pos: usize
8043  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
8044    v.visit_table(pos)?
8045     .visit_field::<u64>("size", Self::VT_SIZE, false)?
8046     .finish();
8047    Ok(())
8048  }
8049}
8050pub struct KnownResourceSizeArgs {
8051    pub size: u64,
8052}
8053impl<'a> Default for KnownResourceSizeArgs {
8054  #[inline]
8055  fn default() -> Self {
8056    KnownResourceSizeArgs {
8057      size: 0,
8058    }
8059  }
8060}
8061
8062pub struct KnownResourceSizeBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
8063  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
8064  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
8065}
8066impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> KnownResourceSizeBuilder<'a, 'b, A> {
8067  #[inline]
8068  pub fn add_size(&mut self, size: u64) {
8069    self.fbb_.push_slot::<u64>(KnownResourceSize::VT_SIZE, size, 0);
8070  }
8071  #[inline]
8072  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> KnownResourceSizeBuilder<'a, 'b, A> {
8073    let start = _fbb.start_table();
8074    KnownResourceSizeBuilder {
8075      fbb_: _fbb,
8076      start_: start,
8077    }
8078  }
8079  #[inline]
8080  pub fn finish(self) -> ::flatbuffers::WIPOffset<KnownResourceSize<'a>> {
8081    let o = self.fbb_.end_table(self.start_);
8082    ::flatbuffers::WIPOffset::new(o.value())
8083  }
8084}
8085
8086impl ::core::fmt::Debug for KnownResourceSize<'_> {
8087  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8088    let mut ds = f.debug_struct("KnownResourceSize");
8089      ds.field("size", &self.size());
8090      ds.finish()
8091  }
8092}
8093pub enum CompanionResourceInfoResponseOffset {}
8094#[derive(Copy, Clone, PartialEq)]
8095
8096pub struct CompanionResourceInfoResponse<'a> {
8097  pub _tab: ::flatbuffers::Table<'a>,
8098}
8099
8100impl<'a> ::flatbuffers::Follow<'a> for CompanionResourceInfoResponse<'a> {
8101  type Inner = CompanionResourceInfoResponse<'a>;
8102  #[inline]
8103  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
8104    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
8105  }
8106}
8107
8108impl<'a> CompanionResourceInfoResponse<'a> {
8109  pub const VT_REQUEST_ID: ::flatbuffers::VOffsetT = 4;
8110  pub const VT_CONTENT_TYPE: ::flatbuffers::VOffsetT = 6;
8111  pub const VT_RESOURCE_SIZE_TYPE: ::flatbuffers::VOffsetT = 8;
8112  pub const VT_RESOURCE_SIZE: ::flatbuffers::VOffsetT = 10;
8113
8114  #[inline]
8115  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
8116    CompanionResourceInfoResponse { _tab: table }
8117  }
8118  #[allow(unused_mut)]
8119  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
8120    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
8121    args: &'args CompanionResourceInfoResponseArgs<'args>
8122  ) -> ::flatbuffers::WIPOffset<CompanionResourceInfoResponse<'bldr>> {
8123    let mut builder = CompanionResourceInfoResponseBuilder::new(_fbb);
8124    if let Some(x) = args.resource_size { builder.add_resource_size(x); }
8125    if let Some(x) = args.content_type { builder.add_content_type(x); }
8126    builder.add_request_id(args.request_id);
8127    builder.add_resource_size_type(args.resource_size_type);
8128    builder.finish()
8129  }
8130
8131
8132  #[inline]
8133  pub fn request_id(&self) -> u32 {
8134    // Safety:
8135    // Created from valid Table for this object
8136    // which contains a valid value in this slot
8137    unsafe { self._tab.get::<u32>(CompanionResourceInfoResponse::VT_REQUEST_ID, Some(0)).unwrap()}
8138  }
8139  #[inline]
8140  pub fn content_type(&self) -> &'a str {
8141    // Safety:
8142    // Created from valid Table for this object
8143    // which contains a valid value in this slot
8144    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(CompanionResourceInfoResponse::VT_CONTENT_TYPE, None).unwrap()}
8145  }
8146  #[inline]
8147  pub fn resource_size_type(&self) -> CompanionResourceSize {
8148    // Safety:
8149    // Created from valid Table for this object
8150    // which contains a valid value in this slot
8151    unsafe { self._tab.get::<CompanionResourceSize>(CompanionResourceInfoResponse::VT_RESOURCE_SIZE_TYPE, Some(CompanionResourceSize::NONE)).unwrap()}
8152  }
8153  #[inline]
8154  pub fn resource_size(&self) -> Option<::flatbuffers::Table<'a>> {
8155    // Safety:
8156    // Created from valid Table for this object
8157    // which contains a valid value in this slot
8158    unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>(CompanionResourceInfoResponse::VT_RESOURCE_SIZE, None)}
8159  }
8160  #[inline]
8161  #[allow(non_snake_case)]
8162  pub fn resource_size_as_unknown(&self) -> Option<UnknownResourceSize<'a>> {
8163    if self.resource_size_type() == CompanionResourceSize::Unknown {
8164      self.resource_size().map(|t| {
8165       // Safety:
8166       // Created from a valid Table for this object
8167       // Which contains a valid union in this slot
8168       unsafe { UnknownResourceSize::init_from_table(t) }
8169     })
8170    } else {
8171      None
8172    }
8173  }
8174
8175  #[inline]
8176  #[allow(non_snake_case)]
8177  pub fn resource_size_as_known(&self) -> Option<KnownResourceSize<'a>> {
8178    if self.resource_size_type() == CompanionResourceSize::Known {
8179      self.resource_size().map(|t| {
8180       // Safety:
8181       // Created from a valid Table for this object
8182       // Which contains a valid union in this slot
8183       unsafe { KnownResourceSize::init_from_table(t) }
8184     })
8185    } else {
8186      None
8187    }
8188  }
8189
8190}
8191
8192impl ::flatbuffers::Verifiable for CompanionResourceInfoResponse<'_> {
8193  #[inline]
8194  fn run_verifier(
8195    v: &mut ::flatbuffers::Verifier, pos: usize
8196  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
8197    v.visit_table(pos)?
8198     .visit_field::<u32>("request_id", Self::VT_REQUEST_ID, false)?
8199     .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("content_type", Self::VT_CONTENT_TYPE, true)?
8200     .visit_union::<CompanionResourceSize, _>("resource_size_type", Self::VT_RESOURCE_SIZE_TYPE, "resource_size", Self::VT_RESOURCE_SIZE, false, |key, v, pos| {
8201        match key {
8202          CompanionResourceSize::Unknown => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<UnknownResourceSize>>("CompanionResourceSize::Unknown", pos),
8203          CompanionResourceSize::Known => v.verify_union_variant::<::flatbuffers::ForwardsUOffset<KnownResourceSize>>("CompanionResourceSize::Known", pos),
8204          _ => Ok(()),
8205        }
8206     })?
8207     .finish();
8208    Ok(())
8209  }
8210}
8211pub struct CompanionResourceInfoResponseArgs<'a> {
8212    pub request_id: u32,
8213    pub content_type: Option<::flatbuffers::WIPOffset<&'a str>>,
8214    pub resource_size_type: CompanionResourceSize,
8215    pub resource_size: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>,
8216}
8217impl<'a> Default for CompanionResourceInfoResponseArgs<'a> {
8218  #[inline]
8219  fn default() -> Self {
8220    CompanionResourceInfoResponseArgs {
8221      request_id: 0,
8222      content_type: None, // required field
8223      resource_size_type: CompanionResourceSize::NONE,
8224      resource_size: None,
8225    }
8226  }
8227}
8228
8229pub struct CompanionResourceInfoResponseBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
8230  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
8231  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
8232}
8233impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> CompanionResourceInfoResponseBuilder<'a, 'b, A> {
8234  #[inline]
8235  pub fn add_request_id(&mut self, request_id: u32) {
8236    self.fbb_.push_slot::<u32>(CompanionResourceInfoResponse::VT_REQUEST_ID, request_id, 0);
8237  }
8238  #[inline]
8239  pub fn add_content_type(&mut self, content_type: ::flatbuffers::WIPOffset<&'b  str>) {
8240    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(CompanionResourceInfoResponse::VT_CONTENT_TYPE, content_type);
8241  }
8242  #[inline]
8243  pub fn add_resource_size_type(&mut self, resource_size_type: CompanionResourceSize) {
8244    self.fbb_.push_slot::<CompanionResourceSize>(CompanionResourceInfoResponse::VT_RESOURCE_SIZE_TYPE, resource_size_type, CompanionResourceSize::NONE);
8245  }
8246  #[inline]
8247  pub fn add_resource_size(&mut self, resource_size: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>) {
8248    self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(CompanionResourceInfoResponse::VT_RESOURCE_SIZE, resource_size);
8249  }
8250  #[inline]
8251  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> CompanionResourceInfoResponseBuilder<'a, 'b, A> {
8252    let start = _fbb.start_table();
8253    CompanionResourceInfoResponseBuilder {
8254      fbb_: _fbb,
8255      start_: start,
8256    }
8257  }
8258  #[inline]
8259  pub fn finish(self) -> ::flatbuffers::WIPOffset<CompanionResourceInfoResponse<'a>> {
8260    let o = self.fbb_.end_table(self.start_);
8261    self.fbb_.required(o, CompanionResourceInfoResponse::VT_CONTENT_TYPE,"content_type");
8262    ::flatbuffers::WIPOffset::new(o.value())
8263  }
8264}
8265
8266impl ::core::fmt::Debug for CompanionResourceInfoResponse<'_> {
8267  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8268    let mut ds = f.debug_struct("CompanionResourceInfoResponse");
8269      ds.field("request_id", &self.request_id());
8270      ds.field("content_type", &self.content_type());
8271      ds.field("resource_size_type", &self.resource_size_type());
8272      match self.resource_size_type() {
8273        CompanionResourceSize::Unknown => {
8274          if let Some(x) = self.resource_size_as_unknown() {
8275            ds.field("resource_size", &x)
8276          } else {
8277            ds.field("resource_size", &"InvalidFlatbuffer: Union discriminant does not match value.")
8278          }
8279        },
8280        CompanionResourceSize::Known => {
8281          if let Some(x) = self.resource_size_as_known() {
8282            ds.field("resource_size", &x)
8283          } else {
8284            ds.field("resource_size", &"InvalidFlatbuffer: Union discriminant does not match value.")
8285          }
8286        },
8287        _ => {
8288          let x: Option<()> = None;
8289          ds.field("resource_size", &x)
8290        },
8291      };
8292      ds.finish()
8293  }
8294}
8295pub enum CompanionResourceRequestOffset {}
8296#[derive(Copy, Clone, PartialEq)]
8297
8298pub struct CompanionResourceRequest<'a> {
8299  pub _tab: ::flatbuffers::Table<'a>,
8300}
8301
8302impl<'a> ::flatbuffers::Follow<'a> for CompanionResourceRequest<'a> {
8303  type Inner = CompanionResourceRequest<'a>;
8304  #[inline]
8305  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
8306    Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
8307  }
8308}
8309
8310impl<'a> CompanionResourceRequest<'a> {
8311  pub const VT_REQUEST_ID: ::flatbuffers::VOffsetT = 4;
8312  pub const VT_RESOURCE_ID: ::flatbuffers::VOffsetT = 6;
8313  pub const VT_READ_HEAD: ::flatbuffers::VOffsetT = 8;
8314
8315  #[inline]
8316  pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
8317    CompanionResourceRequest { _tab: table }
8318  }
8319  #[allow(unused_mut)]
8320  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
8321    _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
8322    args: &'args CompanionResourceRequestArgs<'args>
8323  ) -> ::flatbuffers::WIPOffset<CompanionResourceRequest<'bldr>> {
8324    let mut builder = CompanionResourceRequestBuilder::new(_fbb);
8325    if let Some(x) = args.read_head { builder.add_read_head(x); }
8326    builder.add_resource_id(args.resource_id);
8327    builder.add_request_id(args.request_id);
8328    builder.finish()
8329  }
8330
8331
8332  #[inline]
8333  pub fn request_id(&self) -> u32 {
8334    // Safety:
8335    // Created from valid Table for this object
8336    // which contains a valid value in this slot
8337    unsafe { self._tab.get::<u32>(CompanionResourceRequest::VT_REQUEST_ID, Some(0)).unwrap()}
8338  }
8339  #[inline]
8340  pub fn resource_id(&self) -> u32 {
8341    // Safety:
8342    // Created from valid Table for this object
8343    // which contains a valid value in this slot
8344    unsafe { self._tab.get::<u32>(CompanionResourceRequest::VT_RESOURCE_ID, Some(0)).unwrap()}
8345  }
8346  #[inline]
8347  pub fn read_head(&self) -> Option<&'a ResourceReadHead> {
8348    // Safety:
8349    // Created from valid Table for this object
8350    // which contains a valid value in this slot
8351    unsafe { self._tab.get::<ResourceReadHead>(CompanionResourceRequest::VT_READ_HEAD, None)}
8352  }
8353}
8354
8355impl ::flatbuffers::Verifiable for CompanionResourceRequest<'_> {
8356  #[inline]
8357  fn run_verifier(
8358    v: &mut ::flatbuffers::Verifier, pos: usize
8359  ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
8360    v.visit_table(pos)?
8361     .visit_field::<u32>("request_id", Self::VT_REQUEST_ID, false)?
8362     .visit_field::<u32>("resource_id", Self::VT_RESOURCE_ID, false)?
8363     .visit_field::<ResourceReadHead>("read_head", Self::VT_READ_HEAD, false)?
8364     .finish();
8365    Ok(())
8366  }
8367}
8368pub struct CompanionResourceRequestArgs<'a> {
8369    pub request_id: u32,
8370    pub resource_id: u32,
8371    pub read_head: Option<&'a ResourceReadHead>,
8372}
8373impl<'a> Default for CompanionResourceRequestArgs<'a> {
8374  #[inline]
8375  fn default() -> Self {
8376    CompanionResourceRequestArgs {
8377      request_id: 0,
8378      resource_id: 0,
8379      read_head: None,
8380    }
8381  }
8382}
8383
8384pub struct CompanionResourceRequestBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
8385  fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
8386  start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
8387}
8388impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> CompanionResourceRequestBuilder<'a, 'b, A> {
8389  #[inline]
8390  pub fn add_request_id(&mut self, request_id: u32) {
8391    self.fbb_.push_slot::<u32>(CompanionResourceRequest::VT_REQUEST_ID, request_id, 0);
8392  }
8393  #[inline]
8394  pub fn add_resource_id(&mut self, resource_id: u32) {
8395    self.fbb_.push_slot::<u32>(CompanionResourceRequest::VT_RESOURCE_ID, resource_id, 0);
8396  }
8397  #[inline]
8398  pub fn add_read_head(&mut self, read_head: &ResourceReadHead) {
8399    self.fbb_.push_slot_always::<&ResourceReadHead>(CompanionResourceRequest::VT_READ_HEAD, read_head);
8400  }
8401  #[inline]
8402  pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> CompanionResourceRequestBuilder<'a, 'b, A> {
8403    let start = _fbb.start_table();
8404    CompanionResourceRequestBuilder {
8405      fbb_: _fbb,
8406      start_: start,
8407    }
8408  }
8409  #[inline]
8410  pub fn finish(self) -> ::flatbuffers::WIPOffset<CompanionResourceRequest<'a>> {
8411    let o = self.fbb_.end_table(self.start_);
8412    ::flatbuffers::WIPOffset::new(o.value())
8413  }
8414}
8415
8416impl ::core::fmt::Debug for CompanionResourceRequest<'_> {
8417  fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8418    let mut ds = f.debug_struct("CompanionResourceRequest");
8419      ds.field("request_id", &self.request_id());
8420      ds.field("resource_id", &self.resource_id());
8421      ds.field("read_head", &self.read_head());
8422      ds.finish()
8423  }
8424}
8425#[inline]
8426/// Verifies that a buffer of bytes contains a `Packet`
8427/// and returns it.
8428/// Note that verification is still experimental and may not
8429/// catch every error, or be maximally performant. For the
8430/// previous, unchecked, behavior use
8431/// `root_as_packet_unchecked`.
8432pub fn root_as_packet(buf: &[u8]) -> Result<Packet<'_>, ::flatbuffers::InvalidFlatbuffer> {
8433  ::flatbuffers::root::<Packet>(buf)
8434}
8435#[inline]
8436/// Verifies that a buffer of bytes contains a size prefixed
8437/// `Packet` and returns it.
8438/// Note that verification is still experimental and may not
8439/// catch every error, or be maximally performant. For the
8440/// previous, unchecked, behavior use
8441/// `size_prefixed_root_as_packet_unchecked`.
8442pub fn size_prefixed_root_as_packet(buf: &[u8]) -> Result<Packet<'_>, ::flatbuffers::InvalidFlatbuffer> {
8443  ::flatbuffers::size_prefixed_root::<Packet>(buf)
8444}
8445#[inline]
8446/// Verifies, with the given options, that a buffer of bytes
8447/// contains a `Packet` and returns it.
8448/// Note that verification is still experimental and may not
8449/// catch every error, or be maximally performant. For the
8450/// previous, unchecked, behavior use
8451/// `root_as_packet_unchecked`.
8452pub fn root_as_packet_with_opts<'b, 'o>(
8453  opts: &'o ::flatbuffers::VerifierOptions,
8454  buf: &'b [u8],
8455) -> Result<Packet<'b>, ::flatbuffers::InvalidFlatbuffer> {
8456  ::flatbuffers::root_with_opts::<Packet<'b>>(opts, buf)
8457}
8458#[inline]
8459/// Verifies, with the given verifier options, that a buffer of
8460/// bytes contains a size prefixed `Packet` and returns
8461/// it. Note that verification is still experimental and may not
8462/// catch every error, or be maximally performant. For the
8463/// previous, unchecked, behavior use
8464/// `root_as_packet_unchecked`.
8465pub fn size_prefixed_root_as_packet_with_opts<'b, 'o>(
8466  opts: &'o ::flatbuffers::VerifierOptions,
8467  buf: &'b [u8],
8468) -> Result<Packet<'b>, ::flatbuffers::InvalidFlatbuffer> {
8469  ::flatbuffers::size_prefixed_root_with_opts::<Packet<'b>>(opts, buf)
8470}
8471#[inline]
8472/// Assumes, without verification, that a buffer of bytes contains a Packet and returns it.
8473/// # Safety
8474/// Callers must trust the given bytes do indeed contain a valid `Packet`.
8475pub unsafe fn root_as_packet_unchecked(buf: &[u8]) -> Packet<'_> {
8476  unsafe { ::flatbuffers::root_unchecked::<Packet>(buf) }
8477}
8478#[inline]
8479/// Assumes, without verification, that a buffer of bytes contains a size prefixed Packet and returns it.
8480/// # Safety
8481/// Callers must trust the given bytes do indeed contain a valid size prefixed `Packet`.
8482pub unsafe fn size_prefixed_root_as_packet_unchecked(buf: &[u8]) -> Packet<'_> {
8483  unsafe { ::flatbuffers::size_prefixed_root_unchecked::<Packet>(buf) }
8484}
8485#[inline]
8486pub fn finish_packet_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>(
8487    fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
8488    root: ::flatbuffers::WIPOffset<Packet<'a>>) {
8489  fbb.finish(root, None);
8490}
8491
8492#[inline]
8493pub fn finish_size_prefixed_packet_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>(fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, root: ::flatbuffers::WIPOffset<Packet<'a>>) {
8494  fbb.finish_size_prefixed(root, None);
8495}
8496}  // pub mod V4
8497}  // pub mod FCast
8498