1use core::mem;
7use core::cmp::Ordering;
8
9extern crate flatbuffers;
10use self::flatbuffers::{EndianScalar, Follow};
11
12#[allow(unused_imports, dead_code)]
13pub mod protocol {
14
15 use core::mem;
16 use core::cmp::Ordering;
17
18 extern crate flatbuffers;
19 use self::flatbuffers::{EndianScalar, Follow};
20
21#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
22pub const ENUM_MIN_VALUE: u8 = 0;
23#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
24pub const ENUM_MAX_VALUE: u8 = 8;
25#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
26#[allow(non_camel_case_types)]
27pub const ENUM_VALUES_VALUE: [Value; 9] = [
28 Value::NONE,
29 Value::Null,
30 Value::Text,
31 Value::Bool,
32 Value::Integer,
33 Value::Float,
34 Value::List,
35 Value::Document,
36 Value::Time,
37];
38
39#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
40#[repr(transparent)]
41pub struct Value(pub u8);
42#[allow(non_upper_case_globals)]
43impl Value {
44 pub const NONE: Self = Self(0);
45 pub const Null: Self = Self(1);
46 pub const Text: Self = Self(2);
47 pub const Bool: Self = Self(3);
48 pub const Integer: Self = Self(4);
49 pub const Float: Self = Self(5);
50 pub const List: Self = Self(6);
51 pub const Document: Self = Self(7);
52 pub const Time: Self = Self(8);
53
54 pub const ENUM_MIN: u8 = 0;
55 pub const ENUM_MAX: u8 = 8;
56 pub const ENUM_VALUES: &'static [Self] = &[
57 Self::NONE,
58 Self::Null,
59 Self::Text,
60 Self::Bool,
61 Self::Integer,
62 Self::Float,
63 Self::List,
64 Self::Document,
65 Self::Time,
66 ];
67 pub fn variant_name(self) -> Option<&'static str> {
69 match self {
70 Self::NONE => Some("NONE"),
71 Self::Null => Some("Null"),
72 Self::Text => Some("Text"),
73 Self::Bool => Some("Bool"),
74 Self::Integer => Some("Integer"),
75 Self::Float => Some("Float"),
76 Self::List => Some("List"),
77 Self::Document => Some("Document"),
78 Self::Time => Some("Time"),
79 _ => None,
80 }
81 }
82}
83impl core::fmt::Debug for Value {
84 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
85 if let Some(name) = self.variant_name() {
86 f.write_str(name)
87 } else {
88 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
89 }
90 }
91}
92impl<'a> flatbuffers::Follow<'a> for Value {
93 type Inner = Self;
94 #[inline]
95 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
96 let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
97 Self(b)
98 }
99}
100
101impl flatbuffers::Push for Value {
102 type Output = Value;
103 #[inline]
104 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
105 flatbuffers::emplace_scalar::<u8>(dst, self.0);
106 }
107}
108
109impl flatbuffers::EndianScalar for Value {
110 type Scalar = u8;
111 #[inline]
112 fn to_little_endian(self) -> u8 {
113 self.0.to_le()
114 }
115 #[inline]
116 #[allow(clippy::wrong_self_convention)]
117 fn from_little_endian(v: u8) -> Self {
118 let b = u8::from_le(v);
119 Self(b)
120 }
121}
122
123impl<'a> flatbuffers::Verifiable for Value {
124 #[inline]
125 fn run_verifier(
126 v: &mut flatbuffers::Verifier, pos: usize
127 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
128 use self::flatbuffers::Verifiable;
129 u8::run_verifier(v, pos)
130 }
131}
132
133impl flatbuffers::SimpleToVerifyInSlice for Value {}
134pub struct ValueUnionTableOffset {}
135
136#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
137pub const ENUM_MIN_TRANSFORM_TYPE: u8 = 0;
138#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
139pub const ENUM_MAX_TRANSFORM_TYPE: u8 = 1;
140#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
141#[allow(non_camel_case_types)]
142pub const ENUM_VALUES_TRANSFORM_TYPE: [TransformType; 2] = [
143 TransformType::NONE,
144 TransformType::LanguageTransform,
145];
146
147#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
148#[repr(transparent)]
149pub struct TransformType(pub u8);
150#[allow(non_upper_case_globals)]
151impl TransformType {
152 pub const NONE: Self = Self(0);
153 pub const LanguageTransform: Self = Self(1);
154
155 pub const ENUM_MIN: u8 = 0;
156 pub const ENUM_MAX: u8 = 1;
157 pub const ENUM_VALUES: &'static [Self] = &[
158 Self::NONE,
159 Self::LanguageTransform,
160 ];
161 pub fn variant_name(self) -> Option<&'static str> {
163 match self {
164 Self::NONE => Some("NONE"),
165 Self::LanguageTransform => Some("LanguageTransform"),
166 _ => None,
167 }
168 }
169}
170impl core::fmt::Debug for TransformType {
171 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
172 if let Some(name) = self.variant_name() {
173 f.write_str(name)
174 } else {
175 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
176 }
177 }
178}
179impl<'a> flatbuffers::Follow<'a> for TransformType {
180 type Inner = Self;
181 #[inline]
182 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
183 let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
184 Self(b)
185 }
186}
187
188impl flatbuffers::Push for TransformType {
189 type Output = TransformType;
190 #[inline]
191 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
192 flatbuffers::emplace_scalar::<u8>(dst, self.0);
193 }
194}
195
196impl flatbuffers::EndianScalar for TransformType {
197 type Scalar = u8;
198 #[inline]
199 fn to_little_endian(self) -> u8 {
200 self.0.to_le()
201 }
202 #[inline]
203 #[allow(clippy::wrong_self_convention)]
204 fn from_little_endian(v: u8) -> Self {
205 let b = u8::from_le(v);
206 Self(b)
207 }
208}
209
210impl<'a> flatbuffers::Verifiable for TransformType {
211 #[inline]
212 fn run_verifier(
213 v: &mut flatbuffers::Verifier, pos: usize
214 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
215 use self::flatbuffers::Verifiable;
216 u8::run_verifier(v, pos)
217 }
218}
219
220impl flatbuffers::SimpleToVerifyInSlice for TransformType {}
221pub struct TransformTypeUnionTableOffset {}
222
223#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
224pub const ENUM_MIN_PLAN_STATUS: i8 = 0;
225#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
226pub const ENUM_MAX_PLAN_STATUS: i8 = 2;
227#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
228#[allow(non_camel_case_types)]
229pub const ENUM_VALUES_PLAN_STATUS: [PlanStatus; 3] = [
230 PlanStatus::Running,
231 PlanStatus::Stopped,
232 PlanStatus::Error,
233];
234
235#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
236#[repr(transparent)]
237pub struct PlanStatus(pub i8);
238#[allow(non_upper_case_globals)]
239impl PlanStatus {
240 pub const Running: Self = Self(0);
241 pub const Stopped: Self = Self(1);
242 pub const Error: Self = Self(2);
243
244 pub const ENUM_MIN: i8 = 0;
245 pub const ENUM_MAX: i8 = 2;
246 pub const ENUM_VALUES: &'static [Self] = &[
247 Self::Running,
248 Self::Stopped,
249 Self::Error,
250 ];
251 pub fn variant_name(self) -> Option<&'static str> {
253 match self {
254 Self::Running => Some("Running"),
255 Self::Stopped => Some("Stopped"),
256 Self::Error => Some("Error"),
257 _ => None,
258 }
259 }
260}
261impl core::fmt::Debug for PlanStatus {
262 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
263 if let Some(name) = self.variant_name() {
264 f.write_str(name)
265 } else {
266 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
267 }
268 }
269}
270impl<'a> flatbuffers::Follow<'a> for PlanStatus {
271 type Inner = Self;
272 #[inline]
273 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
274 let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
275 Self(b)
276 }
277}
278
279impl flatbuffers::Push for PlanStatus {
280 type Output = PlanStatus;
281 #[inline]
282 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
283 flatbuffers::emplace_scalar::<i8>(dst, self.0);
284 }
285}
286
287impl flatbuffers::EndianScalar for PlanStatus {
288 type Scalar = i8;
289 #[inline]
290 fn to_little_endian(self) -> i8 {
291 self.0.to_le()
292 }
293 #[inline]
294 #[allow(clippy::wrong_self_convention)]
295 fn from_little_endian(v: i8) -> Self {
296 let b = i8::from_le(v);
297 Self(b)
298 }
299}
300
301impl<'a> flatbuffers::Verifiable for PlanStatus {
302 #[inline]
303 fn run_verifier(
304 v: &mut flatbuffers::Verifier, pos: usize
305 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
306 use self::flatbuffers::Verifiable;
307 i8::run_verifier(v, pos)
308 }
309}
310
311impl flatbuffers::SimpleToVerifyInSlice for PlanStatus {}
312#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
313pub const ENUM_MIN_FILTER_TYPE: u8 = 0;
314#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
315pub const ENUM_MAX_FILTER_TYPE: u8 = 1;
316#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
317#[allow(non_camel_case_types)]
318pub const ENUM_VALUES_FILTER_TYPE: [FilterType; 2] = [
319 FilterType::NONE,
320 FilterType::ByName,
321];
322
323#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
324#[repr(transparent)]
325pub struct FilterType(pub u8);
326#[allow(non_upper_case_globals)]
327impl FilterType {
328 pub const NONE: Self = Self(0);
329 pub const ByName: Self = Self(1);
330
331 pub const ENUM_MIN: u8 = 0;
332 pub const ENUM_MAX: u8 = 1;
333 pub const ENUM_VALUES: &'static [Self] = &[
334 Self::NONE,
335 Self::ByName,
336 ];
337 pub fn variant_name(self) -> Option<&'static str> {
339 match self {
340 Self::NONE => Some("NONE"),
341 Self::ByName => Some("ByName"),
342 _ => None,
343 }
344 }
345}
346impl core::fmt::Debug for FilterType {
347 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
348 if let Some(name) = self.variant_name() {
349 f.write_str(name)
350 } else {
351 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
352 }
353 }
354}
355impl<'a> flatbuffers::Follow<'a> for FilterType {
356 type Inner = Self;
357 #[inline]
358 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
359 let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
360 Self(b)
361 }
362}
363
364impl flatbuffers::Push for FilterType {
365 type Output = FilterType;
366 #[inline]
367 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
368 flatbuffers::emplace_scalar::<u8>(dst, self.0);
369 }
370}
371
372impl flatbuffers::EndianScalar for FilterType {
373 type Scalar = u8;
374 #[inline]
375 fn to_little_endian(self) -> u8 {
376 self.0.to_le()
377 }
378 #[inline]
379 #[allow(clippy::wrong_self_convention)]
380 fn from_little_endian(v: u8) -> Self {
381 let b = u8::from_le(v);
382 Self(b)
383 }
384}
385
386impl<'a> flatbuffers::Verifiable for FilterType {
387 #[inline]
388 fn run_verifier(
389 v: &mut flatbuffers::Verifier, pos: usize
390 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
391 use self::flatbuffers::Verifiable;
392 u8::run_verifier(v, pos)
393 }
394}
395
396impl flatbuffers::SimpleToVerifyInSlice for FilterType {}
397pub struct FilterTypeUnionTableOffset {}
398
399#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
400pub const ENUM_MIN_STATUS: u8 = 0;
401#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
402pub const ENUM_MAX_STATUS: u8 = 2;
403#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
404#[allow(non_camel_case_types)]
405pub const ENUM_VALUES_STATUS: [Status; 3] = [
406 Status::NONE,
407 Status::OkStatus,
408 Status::ErrorStatus,
409];
410
411#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
412#[repr(transparent)]
413pub struct Status(pub u8);
414#[allow(non_upper_case_globals)]
415impl Status {
416 pub const NONE: Self = Self(0);
417 pub const OkStatus: Self = Self(1);
418 pub const ErrorStatus: Self = Self(2);
419
420 pub const ENUM_MIN: u8 = 0;
421 pub const ENUM_MAX: u8 = 2;
422 pub const ENUM_VALUES: &'static [Self] = &[
423 Self::NONE,
424 Self::OkStatus,
425 Self::ErrorStatus,
426 ];
427 pub fn variant_name(self) -> Option<&'static str> {
429 match self {
430 Self::NONE => Some("NONE"),
431 Self::OkStatus => Some("OkStatus"),
432 Self::ErrorStatus => Some("ErrorStatus"),
433 _ => None,
434 }
435 }
436}
437impl core::fmt::Debug for Status {
438 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
439 if let Some(name) = self.variant_name() {
440 f.write_str(name)
441 } else {
442 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
443 }
444 }
445}
446impl<'a> flatbuffers::Follow<'a> for Status {
447 type Inner = Self;
448 #[inline]
449 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
450 let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
451 Self(b)
452 }
453}
454
455impl flatbuffers::Push for Status {
456 type Output = Status;
457 #[inline]
458 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
459 flatbuffers::emplace_scalar::<u8>(dst, self.0);
460 }
461}
462
463impl flatbuffers::EndianScalar for Status {
464 type Scalar = u8;
465 #[inline]
466 fn to_little_endian(self) -> u8 {
467 self.0.to_le()
468 }
469 #[inline]
470 #[allow(clippy::wrong_self_convention)]
471 fn from_little_endian(v: u8) -> Self {
472 let b = u8::from_le(v);
473 Self(b)
474 }
475}
476
477impl<'a> flatbuffers::Verifiable for Status {
478 #[inline]
479 fn run_verifier(
480 v: &mut flatbuffers::Verifier, pos: usize
481 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
482 use self::flatbuffers::Verifiable;
483 u8::run_verifier(v, pos)
484 }
485}
486
487impl flatbuffers::SimpleToVerifyInSlice for Status {}
488pub struct StatusUnionTableOffset {}
489
490#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
491pub const ENUM_MIN_PAYLOAD: u8 = 0;
492#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
493pub const ENUM_MAX_PAYLOAD: u8 = 15;
494#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
495#[allow(non_camel_case_types)]
496pub const ENUM_VALUES_PAYLOAD: [Payload; 16] = [
497 Payload::NONE,
498 Payload::CreatePlanRequest,
499 Payload::CreatePlanResponse,
500 Payload::DeletePlanRequest,
501 Payload::DeletePlanResponse,
502 Payload::GetPlanRequest,
503 Payload::GetPlansRequest,
504 Payload::Train,
505 Payload::Catalog,
506 Payload::RegisterRequest,
507 Payload::RegisterResponse,
508 Payload::BindRequest,
509 Payload::BindResponse,
510 Payload::UnbindRequest,
511 Payload::UnbindResponse,
512 Payload::Disconnect,
513];
514
515#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
516#[repr(transparent)]
517pub struct Payload(pub u8);
518#[allow(non_upper_case_globals)]
519impl Payload {
520 pub const NONE: Self = Self(0);
521 pub const CreatePlanRequest: Self = Self(1);
522 pub const CreatePlanResponse: Self = Self(2);
523 pub const DeletePlanRequest: Self = Self(3);
524 pub const DeletePlanResponse: Self = Self(4);
525 pub const GetPlanRequest: Self = Self(5);
526 pub const GetPlansRequest: Self = Self(6);
527 pub const Train: Self = Self(7);
528 pub const Catalog: Self = Self(8);
529 pub const RegisterRequest: Self = Self(9);
530 pub const RegisterResponse: Self = Self(10);
531 pub const BindRequest: Self = Self(11);
532 pub const BindResponse: Self = Self(12);
533 pub const UnbindRequest: Self = Self(13);
534 pub const UnbindResponse: Self = Self(14);
535 pub const Disconnect: Self = Self(15);
536
537 pub const ENUM_MIN: u8 = 0;
538 pub const ENUM_MAX: u8 = 15;
539 pub const ENUM_VALUES: &'static [Self] = &[
540 Self::NONE,
541 Self::CreatePlanRequest,
542 Self::CreatePlanResponse,
543 Self::DeletePlanRequest,
544 Self::DeletePlanResponse,
545 Self::GetPlanRequest,
546 Self::GetPlansRequest,
547 Self::Train,
548 Self::Catalog,
549 Self::RegisterRequest,
550 Self::RegisterResponse,
551 Self::BindRequest,
552 Self::BindResponse,
553 Self::UnbindRequest,
554 Self::UnbindResponse,
555 Self::Disconnect,
556 ];
557 pub fn variant_name(self) -> Option<&'static str> {
559 match self {
560 Self::NONE => Some("NONE"),
561 Self::CreatePlanRequest => Some("CreatePlanRequest"),
562 Self::CreatePlanResponse => Some("CreatePlanResponse"),
563 Self::DeletePlanRequest => Some("DeletePlanRequest"),
564 Self::DeletePlanResponse => Some("DeletePlanResponse"),
565 Self::GetPlanRequest => Some("GetPlanRequest"),
566 Self::GetPlansRequest => Some("GetPlansRequest"),
567 Self::Train => Some("Train"),
568 Self::Catalog => Some("Catalog"),
569 Self::RegisterRequest => Some("RegisterRequest"),
570 Self::RegisterResponse => Some("RegisterResponse"),
571 Self::BindRequest => Some("BindRequest"),
572 Self::BindResponse => Some("BindResponse"),
573 Self::UnbindRequest => Some("UnbindRequest"),
574 Self::UnbindResponse => Some("UnbindResponse"),
575 Self::Disconnect => Some("Disconnect"),
576 _ => None,
577 }
578 }
579}
580impl core::fmt::Debug for Payload {
581 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
582 if let Some(name) = self.variant_name() {
583 f.write_str(name)
584 } else {
585 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
586 }
587 }
588}
589impl<'a> flatbuffers::Follow<'a> for Payload {
590 type Inner = Self;
591 #[inline]
592 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
593 let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
594 Self(b)
595 }
596}
597
598impl flatbuffers::Push for Payload {
599 type Output = Payload;
600 #[inline]
601 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
602 flatbuffers::emplace_scalar::<u8>(dst, self.0);
603 }
604}
605
606impl flatbuffers::EndianScalar for Payload {
607 type Scalar = u8;
608 #[inline]
609 fn to_little_endian(self) -> u8 {
610 self.0.to_le()
611 }
612 #[inline]
613 #[allow(clippy::wrong_self_convention)]
614 fn from_little_endian(v: u8) -> Self {
615 let b = u8::from_le(v);
616 Self(b)
617 }
618}
619
620impl<'a> flatbuffers::Verifiable for Payload {
621 #[inline]
622 fn run_verifier(
623 v: &mut flatbuffers::Verifier, pos: usize
624 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
625 use self::flatbuffers::Verifiable;
626 u8::run_verifier(v, pos)
627 }
628}
629
630impl flatbuffers::SimpleToVerifyInSlice for Payload {}
631pub struct PayloadUnionTableOffset {}
632
633pub enum NullOffset {}
634#[derive(Copy, Clone, PartialEq)]
635
636pub struct Null<'a> {
637 pub _tab: flatbuffers::Table<'a>,
638}
639
640impl<'a> flatbuffers::Follow<'a> for Null<'a> {
641 type Inner = Null<'a>;
642 #[inline]
643 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
644 Self { _tab: flatbuffers::Table::new(buf, loc) }
645 }
646}
647
648impl<'a> Null<'a> {
649
650 #[inline]
651 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
652 Null { _tab: table }
653 }
654 #[allow(unused_mut)]
655 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
656 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
657 _args: &'args NullArgs
658 ) -> flatbuffers::WIPOffset<Null<'bldr>> {
659 let mut builder = NullBuilder::new(_fbb);
660 builder.finish()
661 }
662
663}
664
665impl flatbuffers::Verifiable for Null<'_> {
666 #[inline]
667 fn run_verifier(
668 v: &mut flatbuffers::Verifier, pos: usize
669 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
670 use self::flatbuffers::Verifiable;
671 v.visit_table(pos)?
672 .finish();
673 Ok(())
674 }
675}
676pub struct NullArgs {
677}
678impl<'a> Default for NullArgs {
679 #[inline]
680 fn default() -> Self {
681 NullArgs {
682 }
683 }
684}
685
686pub struct NullBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
687 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
688 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
689}
690impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> NullBuilder<'a, 'b, A> {
691 #[inline]
692 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> NullBuilder<'a, 'b, A> {
693 let start = _fbb.start_table();
694 NullBuilder {
695 fbb_: _fbb,
696 start_: start,
697 }
698 }
699 #[inline]
700 pub fn finish(self) -> flatbuffers::WIPOffset<Null<'a>> {
701 let o = self.fbb_.end_table(self.start_);
702 flatbuffers::WIPOffset::new(o.value())
703 }
704}
705
706impl core::fmt::Debug for Null<'_> {
707 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
708 let mut ds = f.debug_struct("Null");
709 ds.finish()
710 }
711}
712pub enum TimeOffset {}
713#[derive(Copy, Clone, PartialEq)]
714
715pub struct Time<'a> {
716 pub _tab: flatbuffers::Table<'a>,
717}
718
719impl<'a> flatbuffers::Follow<'a> for Time<'a> {
720 type Inner = Time<'a>;
721 #[inline]
722 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
723 Self { _tab: flatbuffers::Table::new(buf, loc) }
724 }
725}
726
727impl<'a> Time<'a> {
728 pub const VT_DATA: flatbuffers::VOffsetT = 4;
729
730 #[inline]
731 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
732 Time { _tab: table }
733 }
734 #[allow(unused_mut)]
735 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
736 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
737 args: &'args TimeArgs
738 ) -> flatbuffers::WIPOffset<Time<'bldr>> {
739 let mut builder = TimeBuilder::new(_fbb);
740 builder.add_data(args.data);
741 builder.finish()
742 }
743
744
745 #[inline]
746 pub fn data(&self) -> i64 {
747 unsafe { self._tab.get::<i64>(Time::VT_DATA, Some(0)).unwrap()}
751 }
752}
753
754impl flatbuffers::Verifiable for Time<'_> {
755 #[inline]
756 fn run_verifier(
757 v: &mut flatbuffers::Verifier, pos: usize
758 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
759 use self::flatbuffers::Verifiable;
760 v.visit_table(pos)?
761 .visit_field::<i64>("data", Self::VT_DATA, false)?
762 .finish();
763 Ok(())
764 }
765}
766pub struct TimeArgs {
767 pub data: i64,
768}
769impl<'a> Default for TimeArgs {
770 #[inline]
771 fn default() -> Self {
772 TimeArgs {
773 data: 0,
774 }
775 }
776}
777
778pub struct TimeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
779 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
780 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
781}
782impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TimeBuilder<'a, 'b, A> {
783 #[inline]
784 pub fn add_data(&mut self, data: i64) {
785 self.fbb_.push_slot::<i64>(Time::VT_DATA, data, 0);
786 }
787 #[inline]
788 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TimeBuilder<'a, 'b, A> {
789 let start = _fbb.start_table();
790 TimeBuilder {
791 fbb_: _fbb,
792 start_: start,
793 }
794 }
795 #[inline]
796 pub fn finish(self) -> flatbuffers::WIPOffset<Time<'a>> {
797 let o = self.fbb_.end_table(self.start_);
798 flatbuffers::WIPOffset::new(o.value())
799 }
800}
801
802impl core::fmt::Debug for Time<'_> {
803 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
804 let mut ds = f.debug_struct("Time");
805 ds.field("data", &self.data());
806 ds.finish()
807 }
808}
809pub enum BoolOffset {}
810#[derive(Copy, Clone, PartialEq)]
811
812pub struct Bool<'a> {
813 pub _tab: flatbuffers::Table<'a>,
814}
815
816impl<'a> flatbuffers::Follow<'a> for Bool<'a> {
817 type Inner = Bool<'a>;
818 #[inline]
819 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
820 Self { _tab: flatbuffers::Table::new(buf, loc) }
821 }
822}
823
824impl<'a> Bool<'a> {
825 pub const VT_DATA: flatbuffers::VOffsetT = 4;
826
827 #[inline]
828 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
829 Bool { _tab: table }
830 }
831 #[allow(unused_mut)]
832 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
833 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
834 args: &'args BoolArgs
835 ) -> flatbuffers::WIPOffset<Bool<'bldr>> {
836 let mut builder = BoolBuilder::new(_fbb);
837 builder.add_data(args.data);
838 builder.finish()
839 }
840
841
842 #[inline]
843 pub fn data(&self) -> bool {
844 unsafe { self._tab.get::<bool>(Bool::VT_DATA, Some(false)).unwrap()}
848 }
849}
850
851impl flatbuffers::Verifiable for Bool<'_> {
852 #[inline]
853 fn run_verifier(
854 v: &mut flatbuffers::Verifier, pos: usize
855 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
856 use self::flatbuffers::Verifiable;
857 v.visit_table(pos)?
858 .visit_field::<bool>("data", Self::VT_DATA, false)?
859 .finish();
860 Ok(())
861 }
862}
863pub struct BoolArgs {
864 pub data: bool,
865}
866impl<'a> Default for BoolArgs {
867 #[inline]
868 fn default() -> Self {
869 BoolArgs {
870 data: false,
871 }
872 }
873}
874
875pub struct BoolBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
876 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
877 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
878}
879impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BoolBuilder<'a, 'b, A> {
880 #[inline]
881 pub fn add_data(&mut self, data: bool) {
882 self.fbb_.push_slot::<bool>(Bool::VT_DATA, data, false);
883 }
884 #[inline]
885 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BoolBuilder<'a, 'b, A> {
886 let start = _fbb.start_table();
887 BoolBuilder {
888 fbb_: _fbb,
889 start_: start,
890 }
891 }
892 #[inline]
893 pub fn finish(self) -> flatbuffers::WIPOffset<Bool<'a>> {
894 let o = self.fbb_.end_table(self.start_);
895 flatbuffers::WIPOffset::new(o.value())
896 }
897}
898
899impl core::fmt::Debug for Bool<'_> {
900 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
901 let mut ds = f.debug_struct("Bool");
902 ds.field("data", &self.data());
903 ds.finish()
904 }
905}
906pub enum TextOffset {}
907#[derive(Copy, Clone, PartialEq)]
908
909pub struct Text<'a> {
910 pub _tab: flatbuffers::Table<'a>,
911}
912
913impl<'a> flatbuffers::Follow<'a> for Text<'a> {
914 type Inner = Text<'a>;
915 #[inline]
916 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
917 Self { _tab: flatbuffers::Table::new(buf, loc) }
918 }
919}
920
921impl<'a> Text<'a> {
922 pub const VT_DATA: flatbuffers::VOffsetT = 4;
923
924 #[inline]
925 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
926 Text { _tab: table }
927 }
928 #[allow(unused_mut)]
929 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
930 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
931 args: &'args TextArgs<'args>
932 ) -> flatbuffers::WIPOffset<Text<'bldr>> {
933 let mut builder = TextBuilder::new(_fbb);
934 if let Some(x) = args.data { builder.add_data(x); }
935 builder.finish()
936 }
937
938
939 #[inline]
940 pub fn data(&self) -> &'a str {
941 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Text::VT_DATA, None).unwrap()}
945 }
946}
947
948impl flatbuffers::Verifiable for Text<'_> {
949 #[inline]
950 fn run_verifier(
951 v: &mut flatbuffers::Verifier, pos: usize
952 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
953 use self::flatbuffers::Verifiable;
954 v.visit_table(pos)?
955 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("data", Self::VT_DATA, true)?
956 .finish();
957 Ok(())
958 }
959}
960pub struct TextArgs<'a> {
961 pub data: Option<flatbuffers::WIPOffset<&'a str>>,
962}
963impl<'a> Default for TextArgs<'a> {
964 #[inline]
965 fn default() -> Self {
966 TextArgs {
967 data: None, }
969 }
970}
971
972pub struct TextBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
973 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
974 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
975}
976impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TextBuilder<'a, 'b, A> {
977 #[inline]
978 pub fn add_data(&mut self, data: flatbuffers::WIPOffset<&'b str>) {
979 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Text::VT_DATA, data);
980 }
981 #[inline]
982 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TextBuilder<'a, 'b, A> {
983 let start = _fbb.start_table();
984 TextBuilder {
985 fbb_: _fbb,
986 start_: start,
987 }
988 }
989 #[inline]
990 pub fn finish(self) -> flatbuffers::WIPOffset<Text<'a>> {
991 let o = self.fbb_.end_table(self.start_);
992 self.fbb_.required(o, Text::VT_DATA,"data");
993 flatbuffers::WIPOffset::new(o.value())
994 }
995}
996
997impl core::fmt::Debug for Text<'_> {
998 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
999 let mut ds = f.debug_struct("Text");
1000 ds.field("data", &self.data());
1001 ds.finish()
1002 }
1003}
1004pub enum IntegerOffset {}
1005#[derive(Copy, Clone, PartialEq)]
1006
1007pub struct Integer<'a> {
1008 pub _tab: flatbuffers::Table<'a>,
1009}
1010
1011impl<'a> flatbuffers::Follow<'a> for Integer<'a> {
1012 type Inner = Integer<'a>;
1013 #[inline]
1014 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1015 Self { _tab: flatbuffers::Table::new(buf, loc) }
1016 }
1017}
1018
1019impl<'a> Integer<'a> {
1020 pub const VT_DATA: flatbuffers::VOffsetT = 4;
1021
1022 #[inline]
1023 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1024 Integer { _tab: table }
1025 }
1026 #[allow(unused_mut)]
1027 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1028 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1029 args: &'args IntegerArgs
1030 ) -> flatbuffers::WIPOffset<Integer<'bldr>> {
1031 let mut builder = IntegerBuilder::new(_fbb);
1032 builder.add_data(args.data);
1033 builder.finish()
1034 }
1035
1036
1037 #[inline]
1038 pub fn data(&self) -> i64 {
1039 unsafe { self._tab.get::<i64>(Integer::VT_DATA, Some(0)).unwrap()}
1043 }
1044}
1045
1046impl flatbuffers::Verifiable for Integer<'_> {
1047 #[inline]
1048 fn run_verifier(
1049 v: &mut flatbuffers::Verifier, pos: usize
1050 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1051 use self::flatbuffers::Verifiable;
1052 v.visit_table(pos)?
1053 .visit_field::<i64>("data", Self::VT_DATA, false)?
1054 .finish();
1055 Ok(())
1056 }
1057}
1058pub struct IntegerArgs {
1059 pub data: i64,
1060}
1061impl<'a> Default for IntegerArgs {
1062 #[inline]
1063 fn default() -> Self {
1064 IntegerArgs {
1065 data: 0,
1066 }
1067 }
1068}
1069
1070pub struct IntegerBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1071 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1072 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1073}
1074impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> IntegerBuilder<'a, 'b, A> {
1075 #[inline]
1076 pub fn add_data(&mut self, data: i64) {
1077 self.fbb_.push_slot::<i64>(Integer::VT_DATA, data, 0);
1078 }
1079 #[inline]
1080 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> IntegerBuilder<'a, 'b, A> {
1081 let start = _fbb.start_table();
1082 IntegerBuilder {
1083 fbb_: _fbb,
1084 start_: start,
1085 }
1086 }
1087 #[inline]
1088 pub fn finish(self) -> flatbuffers::WIPOffset<Integer<'a>> {
1089 let o = self.fbb_.end_table(self.start_);
1090 flatbuffers::WIPOffset::new(o.value())
1091 }
1092}
1093
1094impl core::fmt::Debug for Integer<'_> {
1095 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1096 let mut ds = f.debug_struct("Integer");
1097 ds.field("data", &self.data());
1098 ds.finish()
1099 }
1100}
1101pub enum FloatOffset {}
1102#[derive(Copy, Clone, PartialEq)]
1103
1104pub struct Float<'a> {
1105 pub _tab: flatbuffers::Table<'a>,
1106}
1107
1108impl<'a> flatbuffers::Follow<'a> for Float<'a> {
1109 type Inner = Float<'a>;
1110 #[inline]
1111 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1112 Self { _tab: flatbuffers::Table::new(buf, loc) }
1113 }
1114}
1115
1116impl<'a> Float<'a> {
1117 pub const VT_DATA: flatbuffers::VOffsetT = 4;
1118
1119 #[inline]
1120 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1121 Float { _tab: table }
1122 }
1123 #[allow(unused_mut)]
1124 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1125 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1126 args: &'args FloatArgs
1127 ) -> flatbuffers::WIPOffset<Float<'bldr>> {
1128 let mut builder = FloatBuilder::new(_fbb);
1129 builder.add_data(args.data);
1130 builder.finish()
1131 }
1132
1133
1134 #[inline]
1135 pub fn data(&self) -> f32 {
1136 unsafe { self._tab.get::<f32>(Float::VT_DATA, Some(0.0)).unwrap()}
1140 }
1141}
1142
1143impl flatbuffers::Verifiable for Float<'_> {
1144 #[inline]
1145 fn run_verifier(
1146 v: &mut flatbuffers::Verifier, pos: usize
1147 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1148 use self::flatbuffers::Verifiable;
1149 v.visit_table(pos)?
1150 .visit_field::<f32>("data", Self::VT_DATA, false)?
1151 .finish();
1152 Ok(())
1153 }
1154}
1155pub struct FloatArgs {
1156 pub data: f32,
1157}
1158impl<'a> Default for FloatArgs {
1159 #[inline]
1160 fn default() -> Self {
1161 FloatArgs {
1162 data: 0.0,
1163 }
1164 }
1165}
1166
1167pub struct FloatBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1168 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1169 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1170}
1171impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FloatBuilder<'a, 'b, A> {
1172 #[inline]
1173 pub fn add_data(&mut self, data: f32) {
1174 self.fbb_.push_slot::<f32>(Float::VT_DATA, data, 0.0);
1175 }
1176 #[inline]
1177 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> FloatBuilder<'a, 'b, A> {
1178 let start = _fbb.start_table();
1179 FloatBuilder {
1180 fbb_: _fbb,
1181 start_: start,
1182 }
1183 }
1184 #[inline]
1185 pub fn finish(self) -> flatbuffers::WIPOffset<Float<'a>> {
1186 let o = self.fbb_.end_table(self.start_);
1187 flatbuffers::WIPOffset::new(o.value())
1188 }
1189}
1190
1191impl core::fmt::Debug for Float<'_> {
1192 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1193 let mut ds = f.debug_struct("Float");
1194 ds.field("data", &self.data());
1195 ds.finish()
1196 }
1197}
1198pub enum ValueWrapperOffset {}
1199#[derive(Copy, Clone, PartialEq)]
1200
1201pub struct ValueWrapper<'a> {
1202 pub _tab: flatbuffers::Table<'a>,
1203}
1204
1205impl<'a> flatbuffers::Follow<'a> for ValueWrapper<'a> {
1206 type Inner = ValueWrapper<'a>;
1207 #[inline]
1208 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1209 Self { _tab: flatbuffers::Table::new(buf, loc) }
1210 }
1211}
1212
1213impl<'a> ValueWrapper<'a> {
1214 pub const VT_DATA_TYPE: flatbuffers::VOffsetT = 4;
1215 pub const VT_DATA: flatbuffers::VOffsetT = 6;
1216
1217 #[inline]
1218 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1219 ValueWrapper { _tab: table }
1220 }
1221 #[allow(unused_mut)]
1222 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1223 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1224 args: &'args ValueWrapperArgs
1225 ) -> flatbuffers::WIPOffset<ValueWrapper<'bldr>> {
1226 let mut builder = ValueWrapperBuilder::new(_fbb);
1227 if let Some(x) = args.data { builder.add_data(x); }
1228 builder.add_data_type(args.data_type);
1229 builder.finish()
1230 }
1231
1232
1233 #[inline]
1234 pub fn data_type(&self) -> Value {
1235 unsafe { self._tab.get::<Value>(ValueWrapper::VT_DATA_TYPE, Some(Value::NONE)).unwrap()}
1239 }
1240 #[inline]
1241 pub fn data(&self) -> flatbuffers::Table<'a> {
1242 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(ValueWrapper::VT_DATA, None).unwrap()}
1246 }
1247 #[inline]
1248 #[allow(non_snake_case)]
1249 pub fn data_as_null(&self) -> Option<Null<'a>> {
1250 if self.data_type() == Value::Null {
1251 let u = self.data();
1252 Some(unsafe { Null::init_from_table(u) })
1256 } else {
1257 None
1258 }
1259 }
1260
1261 #[inline]
1262 #[allow(non_snake_case)]
1263 pub fn data_as_text(&self) -> Option<Text<'a>> {
1264 if self.data_type() == Value::Text {
1265 let u = self.data();
1266 Some(unsafe { Text::init_from_table(u) })
1270 } else {
1271 None
1272 }
1273 }
1274
1275 #[inline]
1276 #[allow(non_snake_case)]
1277 pub fn data_as_bool(&self) -> Option<Bool<'a>> {
1278 if self.data_type() == Value::Bool {
1279 let u = self.data();
1280 Some(unsafe { Bool::init_from_table(u) })
1284 } else {
1285 None
1286 }
1287 }
1288
1289 #[inline]
1290 #[allow(non_snake_case)]
1291 pub fn data_as_integer(&self) -> Option<Integer<'a>> {
1292 if self.data_type() == Value::Integer {
1293 let u = self.data();
1294 Some(unsafe { Integer::init_from_table(u) })
1298 } else {
1299 None
1300 }
1301 }
1302
1303 #[inline]
1304 #[allow(non_snake_case)]
1305 pub fn data_as_float(&self) -> Option<Float<'a>> {
1306 if self.data_type() == Value::Float {
1307 let u = self.data();
1308 Some(unsafe { Float::init_from_table(u) })
1312 } else {
1313 None
1314 }
1315 }
1316
1317 #[inline]
1318 #[allow(non_snake_case)]
1319 pub fn data_as_list(&self) -> Option<List<'a>> {
1320 if self.data_type() == Value::List {
1321 let u = self.data();
1322 Some(unsafe { List::init_from_table(u) })
1326 } else {
1327 None
1328 }
1329 }
1330
1331 #[inline]
1332 #[allow(non_snake_case)]
1333 pub fn data_as_document(&self) -> Option<Document<'a>> {
1334 if self.data_type() == Value::Document {
1335 let u = self.data();
1336 Some(unsafe { Document::init_from_table(u) })
1340 } else {
1341 None
1342 }
1343 }
1344
1345 #[inline]
1346 #[allow(non_snake_case)]
1347 pub fn data_as_time(&self) -> Option<Time<'a>> {
1348 if self.data_type() == Value::Time {
1349 let u = self.data();
1350 Some(unsafe { Time::init_from_table(u) })
1354 } else {
1355 None
1356 }
1357 }
1358
1359}
1360
1361impl flatbuffers::Verifiable for ValueWrapper<'_> {
1362 #[inline]
1363 fn run_verifier(
1364 v: &mut flatbuffers::Verifier, pos: usize
1365 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1366 use self::flatbuffers::Verifiable;
1367 v.visit_table(pos)?
1368 .visit_union::<Value, _>("data_type", Self::VT_DATA_TYPE, "data", Self::VT_DATA, true, |key, v, pos| {
1369 match key {
1370 Value::Null => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Null>>("Value::Null", pos),
1371 Value::Text => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Text>>("Value::Text", pos),
1372 Value::Bool => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Bool>>("Value::Bool", pos),
1373 Value::Integer => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Integer>>("Value::Integer", pos),
1374 Value::Float => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Float>>("Value::Float", pos),
1375 Value::List => v.verify_union_variant::<flatbuffers::ForwardsUOffset<List>>("Value::List", pos),
1376 Value::Document => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Document>>("Value::Document", pos),
1377 Value::Time => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Time>>("Value::Time", pos),
1378 _ => Ok(()),
1379 }
1380 })?
1381 .finish();
1382 Ok(())
1383 }
1384}
1385pub struct ValueWrapperArgs {
1386 pub data_type: Value,
1387 pub data: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
1388}
1389impl<'a> Default for ValueWrapperArgs {
1390 #[inline]
1391 fn default() -> Self {
1392 ValueWrapperArgs {
1393 data_type: Value::NONE,
1394 data: None, }
1396 }
1397}
1398
1399pub struct ValueWrapperBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1400 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1401 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1402}
1403impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ValueWrapperBuilder<'a, 'b, A> {
1404 #[inline]
1405 pub fn add_data_type(&mut self, data_type: Value) {
1406 self.fbb_.push_slot::<Value>(ValueWrapper::VT_DATA_TYPE, data_type, Value::NONE);
1407 }
1408 #[inline]
1409 pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
1410 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ValueWrapper::VT_DATA, data);
1411 }
1412 #[inline]
1413 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ValueWrapperBuilder<'a, 'b, A> {
1414 let start = _fbb.start_table();
1415 ValueWrapperBuilder {
1416 fbb_: _fbb,
1417 start_: start,
1418 }
1419 }
1420 #[inline]
1421 pub fn finish(self) -> flatbuffers::WIPOffset<ValueWrapper<'a>> {
1422 let o = self.fbb_.end_table(self.start_);
1423 self.fbb_.required(o, ValueWrapper::VT_DATA,"data");
1424 flatbuffers::WIPOffset::new(o.value())
1425 }
1426}
1427
1428impl core::fmt::Debug for ValueWrapper<'_> {
1429 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1430 let mut ds = f.debug_struct("ValueWrapper");
1431 ds.field("data_type", &self.data_type());
1432 match self.data_type() {
1433 Value::Null => {
1434 if let Some(x) = self.data_as_null() {
1435 ds.field("data", &x)
1436 } else {
1437 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1438 }
1439 },
1440 Value::Text => {
1441 if let Some(x) = self.data_as_text() {
1442 ds.field("data", &x)
1443 } else {
1444 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1445 }
1446 },
1447 Value::Bool => {
1448 if let Some(x) = self.data_as_bool() {
1449 ds.field("data", &x)
1450 } else {
1451 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1452 }
1453 },
1454 Value::Integer => {
1455 if let Some(x) = self.data_as_integer() {
1456 ds.field("data", &x)
1457 } else {
1458 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1459 }
1460 },
1461 Value::Float => {
1462 if let Some(x) = self.data_as_float() {
1463 ds.field("data", &x)
1464 } else {
1465 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1466 }
1467 },
1468 Value::List => {
1469 if let Some(x) = self.data_as_list() {
1470 ds.field("data", &x)
1471 } else {
1472 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1473 }
1474 },
1475 Value::Document => {
1476 if let Some(x) = self.data_as_document() {
1477 ds.field("data", &x)
1478 } else {
1479 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1480 }
1481 },
1482 Value::Time => {
1483 if let Some(x) = self.data_as_time() {
1484 ds.field("data", &x)
1485 } else {
1486 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1487 }
1488 },
1489 _ => {
1490 let x: Option<()> = None;
1491 ds.field("data", &x)
1492 },
1493 };
1494 ds.finish()
1495 }
1496}
1497pub enum ListOffset {}
1498#[derive(Copy, Clone, PartialEq)]
1499
1500pub struct List<'a> {
1501 pub _tab: flatbuffers::Table<'a>,
1502}
1503
1504impl<'a> flatbuffers::Follow<'a> for List<'a> {
1505 type Inner = List<'a>;
1506 #[inline]
1507 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1508 Self { _tab: flatbuffers::Table::new(buf, loc) }
1509 }
1510}
1511
1512impl<'a> List<'a> {
1513 pub const VT_DATA: flatbuffers::VOffsetT = 4;
1514
1515 #[inline]
1516 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1517 List { _tab: table }
1518 }
1519 #[allow(unused_mut)]
1520 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1521 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1522 args: &'args ListArgs<'args>
1523 ) -> flatbuffers::WIPOffset<List<'bldr>> {
1524 let mut builder = ListBuilder::new(_fbb);
1525 if let Some(x) = args.data { builder.add_data(x); }
1526 builder.finish()
1527 }
1528
1529
1530 #[inline]
1531 pub fn data(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ValueWrapper<'a>>> {
1532 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ValueWrapper>>>>(List::VT_DATA, None).unwrap()}
1536 }
1537}
1538
1539impl flatbuffers::Verifiable for List<'_> {
1540 #[inline]
1541 fn run_verifier(
1542 v: &mut flatbuffers::Verifier, pos: usize
1543 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1544 use self::flatbuffers::Verifiable;
1545 v.visit_table(pos)?
1546 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ValueWrapper>>>>("data", Self::VT_DATA, true)?
1547 .finish();
1548 Ok(())
1549 }
1550}
1551pub struct ListArgs<'a> {
1552 pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ValueWrapper<'a>>>>>,
1553}
1554impl<'a> Default for ListArgs<'a> {
1555 #[inline]
1556 fn default() -> Self {
1557 ListArgs {
1558 data: None, }
1560 }
1561}
1562
1563pub struct ListBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1564 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1565 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1566}
1567impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ListBuilder<'a, 'b, A> {
1568 #[inline]
1569 pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<ValueWrapper<'b >>>>) {
1570 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(List::VT_DATA, data);
1571 }
1572 #[inline]
1573 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ListBuilder<'a, 'b, A> {
1574 let start = _fbb.start_table();
1575 ListBuilder {
1576 fbb_: _fbb,
1577 start_: start,
1578 }
1579 }
1580 #[inline]
1581 pub fn finish(self) -> flatbuffers::WIPOffset<List<'a>> {
1582 let o = self.fbb_.end_table(self.start_);
1583 self.fbb_.required(o, List::VT_DATA,"data");
1584 flatbuffers::WIPOffset::new(o.value())
1585 }
1586}
1587
1588impl core::fmt::Debug for List<'_> {
1589 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1590 let mut ds = f.debug_struct("List");
1591 ds.field("data", &self.data());
1592 ds.finish()
1593 }
1594}
1595pub enum KeyValueOffset {}
1596#[derive(Copy, Clone, PartialEq)]
1597
1598pub struct KeyValue<'a> {
1599 pub _tab: flatbuffers::Table<'a>,
1600}
1601
1602impl<'a> flatbuffers::Follow<'a> for KeyValue<'a> {
1603 type Inner = KeyValue<'a>;
1604 #[inline]
1605 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1606 Self { _tab: flatbuffers::Table::new(buf, loc) }
1607 }
1608}
1609
1610impl<'a> KeyValue<'a> {
1611 pub const VT_KEY_TYPE: flatbuffers::VOffsetT = 4;
1612 pub const VT_KEY: flatbuffers::VOffsetT = 6;
1613 pub const VT_VALUES_TYPE: flatbuffers::VOffsetT = 8;
1614 pub const VT_VALUES: flatbuffers::VOffsetT = 10;
1615
1616 #[inline]
1617 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1618 KeyValue { _tab: table }
1619 }
1620 #[allow(unused_mut)]
1621 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1622 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1623 args: &'args KeyValueArgs
1624 ) -> flatbuffers::WIPOffset<KeyValue<'bldr>> {
1625 let mut builder = KeyValueBuilder::new(_fbb);
1626 if let Some(x) = args.values { builder.add_values(x); }
1627 if let Some(x) = args.key { builder.add_key(x); }
1628 builder.add_values_type(args.values_type);
1629 builder.add_key_type(args.key_type);
1630 builder.finish()
1631 }
1632
1633
1634 #[inline]
1635 pub fn key_type(&self) -> Value {
1636 unsafe { self._tab.get::<Value>(KeyValue::VT_KEY_TYPE, Some(Value::NONE)).unwrap()}
1640 }
1641 #[inline]
1642 pub fn key(&self) -> flatbuffers::Table<'a> {
1643 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(KeyValue::VT_KEY, None).unwrap()}
1647 }
1648 #[inline]
1649 pub fn values_type(&self) -> Value {
1650 unsafe { self._tab.get::<Value>(KeyValue::VT_VALUES_TYPE, Some(Value::NONE)).unwrap()}
1654 }
1655 #[inline]
1656 pub fn values(&self) -> flatbuffers::Table<'a> {
1657 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(KeyValue::VT_VALUES, None).unwrap()}
1661 }
1662 #[inline]
1663 #[allow(non_snake_case)]
1664 pub fn key_as_null(&self) -> Option<Null<'a>> {
1665 if self.key_type() == Value::Null {
1666 let u = self.key();
1667 Some(unsafe { Null::init_from_table(u) })
1671 } else {
1672 None
1673 }
1674 }
1675
1676 #[inline]
1677 #[allow(non_snake_case)]
1678 pub fn key_as_text(&self) -> Option<Text<'a>> {
1679 if self.key_type() == Value::Text {
1680 let u = self.key();
1681 Some(unsafe { Text::init_from_table(u) })
1685 } else {
1686 None
1687 }
1688 }
1689
1690 #[inline]
1691 #[allow(non_snake_case)]
1692 pub fn key_as_bool(&self) -> Option<Bool<'a>> {
1693 if self.key_type() == Value::Bool {
1694 let u = self.key();
1695 Some(unsafe { Bool::init_from_table(u) })
1699 } else {
1700 None
1701 }
1702 }
1703
1704 #[inline]
1705 #[allow(non_snake_case)]
1706 pub fn key_as_integer(&self) -> Option<Integer<'a>> {
1707 if self.key_type() == Value::Integer {
1708 let u = self.key();
1709 Some(unsafe { Integer::init_from_table(u) })
1713 } else {
1714 None
1715 }
1716 }
1717
1718 #[inline]
1719 #[allow(non_snake_case)]
1720 pub fn key_as_float(&self) -> Option<Float<'a>> {
1721 if self.key_type() == Value::Float {
1722 let u = self.key();
1723 Some(unsafe { Float::init_from_table(u) })
1727 } else {
1728 None
1729 }
1730 }
1731
1732 #[inline]
1733 #[allow(non_snake_case)]
1734 pub fn key_as_list(&self) -> Option<List<'a>> {
1735 if self.key_type() == Value::List {
1736 let u = self.key();
1737 Some(unsafe { List::init_from_table(u) })
1741 } else {
1742 None
1743 }
1744 }
1745
1746 #[inline]
1747 #[allow(non_snake_case)]
1748 pub fn key_as_document(&self) -> Option<Document<'a>> {
1749 if self.key_type() == Value::Document {
1750 let u = self.key();
1751 Some(unsafe { Document::init_from_table(u) })
1755 } else {
1756 None
1757 }
1758 }
1759
1760 #[inline]
1761 #[allow(non_snake_case)]
1762 pub fn key_as_time(&self) -> Option<Time<'a>> {
1763 if self.key_type() == Value::Time {
1764 let u = self.key();
1765 Some(unsafe { Time::init_from_table(u) })
1769 } else {
1770 None
1771 }
1772 }
1773
1774 #[inline]
1775 #[allow(non_snake_case)]
1776 pub fn values_as_null(&self) -> Option<Null<'a>> {
1777 if self.values_type() == Value::Null {
1778 let u = self.values();
1779 Some(unsafe { Null::init_from_table(u) })
1783 } else {
1784 None
1785 }
1786 }
1787
1788 #[inline]
1789 #[allow(non_snake_case)]
1790 pub fn values_as_text(&self) -> Option<Text<'a>> {
1791 if self.values_type() == Value::Text {
1792 let u = self.values();
1793 Some(unsafe { Text::init_from_table(u) })
1797 } else {
1798 None
1799 }
1800 }
1801
1802 #[inline]
1803 #[allow(non_snake_case)]
1804 pub fn values_as_bool(&self) -> Option<Bool<'a>> {
1805 if self.values_type() == Value::Bool {
1806 let u = self.values();
1807 Some(unsafe { Bool::init_from_table(u) })
1811 } else {
1812 None
1813 }
1814 }
1815
1816 #[inline]
1817 #[allow(non_snake_case)]
1818 pub fn values_as_integer(&self) -> Option<Integer<'a>> {
1819 if self.values_type() == Value::Integer {
1820 let u = self.values();
1821 Some(unsafe { Integer::init_from_table(u) })
1825 } else {
1826 None
1827 }
1828 }
1829
1830 #[inline]
1831 #[allow(non_snake_case)]
1832 pub fn values_as_float(&self) -> Option<Float<'a>> {
1833 if self.values_type() == Value::Float {
1834 let u = self.values();
1835 Some(unsafe { Float::init_from_table(u) })
1839 } else {
1840 None
1841 }
1842 }
1843
1844 #[inline]
1845 #[allow(non_snake_case)]
1846 pub fn values_as_list(&self) -> Option<List<'a>> {
1847 if self.values_type() == Value::List {
1848 let u = self.values();
1849 Some(unsafe { List::init_from_table(u) })
1853 } else {
1854 None
1855 }
1856 }
1857
1858 #[inline]
1859 #[allow(non_snake_case)]
1860 pub fn values_as_document(&self) -> Option<Document<'a>> {
1861 if self.values_type() == Value::Document {
1862 let u = self.values();
1863 Some(unsafe { Document::init_from_table(u) })
1867 } else {
1868 None
1869 }
1870 }
1871
1872 #[inline]
1873 #[allow(non_snake_case)]
1874 pub fn values_as_time(&self) -> Option<Time<'a>> {
1875 if self.values_type() == Value::Time {
1876 let u = self.values();
1877 Some(unsafe { Time::init_from_table(u) })
1881 } else {
1882 None
1883 }
1884 }
1885
1886}
1887
1888impl flatbuffers::Verifiable for KeyValue<'_> {
1889 #[inline]
1890 fn run_verifier(
1891 v: &mut flatbuffers::Verifier, pos: usize
1892 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1893 use self::flatbuffers::Verifiable;
1894 v.visit_table(pos)?
1895 .visit_union::<Value, _>("key_type", Self::VT_KEY_TYPE, "key", Self::VT_KEY, true, |key, v, pos| {
1896 match key {
1897 Value::Null => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Null>>("Value::Null", pos),
1898 Value::Text => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Text>>("Value::Text", pos),
1899 Value::Bool => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Bool>>("Value::Bool", pos),
1900 Value::Integer => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Integer>>("Value::Integer", pos),
1901 Value::Float => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Float>>("Value::Float", pos),
1902 Value::List => v.verify_union_variant::<flatbuffers::ForwardsUOffset<List>>("Value::List", pos),
1903 Value::Document => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Document>>("Value::Document", pos),
1904 Value::Time => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Time>>("Value::Time", pos),
1905 _ => Ok(()),
1906 }
1907 })?
1908 .visit_union::<Value, _>("values_type", Self::VT_VALUES_TYPE, "values", Self::VT_VALUES, true, |key, v, pos| {
1909 match key {
1910 Value::Null => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Null>>("Value::Null", pos),
1911 Value::Text => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Text>>("Value::Text", pos),
1912 Value::Bool => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Bool>>("Value::Bool", pos),
1913 Value::Integer => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Integer>>("Value::Integer", pos),
1914 Value::Float => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Float>>("Value::Float", pos),
1915 Value::List => v.verify_union_variant::<flatbuffers::ForwardsUOffset<List>>("Value::List", pos),
1916 Value::Document => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Document>>("Value::Document", pos),
1917 Value::Time => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Time>>("Value::Time", pos),
1918 _ => Ok(()),
1919 }
1920 })?
1921 .finish();
1922 Ok(())
1923 }
1924}
1925pub struct KeyValueArgs {
1926 pub key_type: Value,
1927 pub key: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
1928 pub values_type: Value,
1929 pub values: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
1930}
1931impl<'a> Default for KeyValueArgs {
1932 #[inline]
1933 fn default() -> Self {
1934 KeyValueArgs {
1935 key_type: Value::NONE,
1936 key: None, values_type: Value::NONE,
1938 values: None, }
1940 }
1941}
1942
1943pub struct KeyValueBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1944 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1945 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1946}
1947impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueBuilder<'a, 'b, A> {
1948 #[inline]
1949 pub fn add_key_type(&mut self, key_type: Value) {
1950 self.fbb_.push_slot::<Value>(KeyValue::VT_KEY_TYPE, key_type, Value::NONE);
1951 }
1952 #[inline]
1953 pub fn add_key(&mut self, key: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
1954 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_KEY, key);
1955 }
1956 #[inline]
1957 pub fn add_values_type(&mut self, values_type: Value) {
1958 self.fbb_.push_slot::<Value>(KeyValue::VT_VALUES_TYPE, values_type, Value::NONE);
1959 }
1960 #[inline]
1961 pub fn add_values(&mut self, values: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
1962 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_VALUES, values);
1963 }
1964 #[inline]
1965 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> KeyValueBuilder<'a, 'b, A> {
1966 let start = _fbb.start_table();
1967 KeyValueBuilder {
1968 fbb_: _fbb,
1969 start_: start,
1970 }
1971 }
1972 #[inline]
1973 pub fn finish(self) -> flatbuffers::WIPOffset<KeyValue<'a>> {
1974 let o = self.fbb_.end_table(self.start_);
1975 self.fbb_.required(o, KeyValue::VT_KEY,"key");
1976 self.fbb_.required(o, KeyValue::VT_VALUES,"values");
1977 flatbuffers::WIPOffset::new(o.value())
1978 }
1979}
1980
1981impl core::fmt::Debug for KeyValue<'_> {
1982 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1983 let mut ds = f.debug_struct("KeyValue");
1984 ds.field("key_type", &self.key_type());
1985 match self.key_type() {
1986 Value::Null => {
1987 if let Some(x) = self.key_as_null() {
1988 ds.field("key", &x)
1989 } else {
1990 ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
1991 }
1992 },
1993 Value::Text => {
1994 if let Some(x) = self.key_as_text() {
1995 ds.field("key", &x)
1996 } else {
1997 ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
1998 }
1999 },
2000 Value::Bool => {
2001 if let Some(x) = self.key_as_bool() {
2002 ds.field("key", &x)
2003 } else {
2004 ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
2005 }
2006 },
2007 Value::Integer => {
2008 if let Some(x) = self.key_as_integer() {
2009 ds.field("key", &x)
2010 } else {
2011 ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
2012 }
2013 },
2014 Value::Float => {
2015 if let Some(x) = self.key_as_float() {
2016 ds.field("key", &x)
2017 } else {
2018 ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
2019 }
2020 },
2021 Value::List => {
2022 if let Some(x) = self.key_as_list() {
2023 ds.field("key", &x)
2024 } else {
2025 ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
2026 }
2027 },
2028 Value::Document => {
2029 if let Some(x) = self.key_as_document() {
2030 ds.field("key", &x)
2031 } else {
2032 ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
2033 }
2034 },
2035 Value::Time => {
2036 if let Some(x) = self.key_as_time() {
2037 ds.field("key", &x)
2038 } else {
2039 ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
2040 }
2041 },
2042 _ => {
2043 let x: Option<()> = None;
2044 ds.field("key", &x)
2045 },
2046 };
2047 ds.field("values_type", &self.values_type());
2048 match self.values_type() {
2049 Value::Null => {
2050 if let Some(x) = self.values_as_null() {
2051 ds.field("values", &x)
2052 } else {
2053 ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2054 }
2055 },
2056 Value::Text => {
2057 if let Some(x) = self.values_as_text() {
2058 ds.field("values", &x)
2059 } else {
2060 ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2061 }
2062 },
2063 Value::Bool => {
2064 if let Some(x) = self.values_as_bool() {
2065 ds.field("values", &x)
2066 } else {
2067 ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2068 }
2069 },
2070 Value::Integer => {
2071 if let Some(x) = self.values_as_integer() {
2072 ds.field("values", &x)
2073 } else {
2074 ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2075 }
2076 },
2077 Value::Float => {
2078 if let Some(x) = self.values_as_float() {
2079 ds.field("values", &x)
2080 } else {
2081 ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2082 }
2083 },
2084 Value::List => {
2085 if let Some(x) = self.values_as_list() {
2086 ds.field("values", &x)
2087 } else {
2088 ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2089 }
2090 },
2091 Value::Document => {
2092 if let Some(x) = self.values_as_document() {
2093 ds.field("values", &x)
2094 } else {
2095 ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2096 }
2097 },
2098 Value::Time => {
2099 if let Some(x) = self.values_as_time() {
2100 ds.field("values", &x)
2101 } else {
2102 ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2103 }
2104 },
2105 _ => {
2106 let x: Option<()> = None;
2107 ds.field("values", &x)
2108 },
2109 };
2110 ds.finish()
2111 }
2112}
2113pub enum DocumentOffset {}
2114#[derive(Copy, Clone, PartialEq)]
2115
2116pub struct Document<'a> {
2117 pub _tab: flatbuffers::Table<'a>,
2118}
2119
2120impl<'a> flatbuffers::Follow<'a> for Document<'a> {
2121 type Inner = Document<'a>;
2122 #[inline]
2123 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2124 Self { _tab: flatbuffers::Table::new(buf, loc) }
2125 }
2126}
2127
2128impl<'a> Document<'a> {
2129 pub const VT_DATA: flatbuffers::VOffsetT = 4;
2130
2131 #[inline]
2132 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2133 Document { _tab: table }
2134 }
2135 #[allow(unused_mut)]
2136 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2137 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2138 args: &'args DocumentArgs<'args>
2139 ) -> flatbuffers::WIPOffset<Document<'bldr>> {
2140 let mut builder = DocumentBuilder::new(_fbb);
2141 if let Some(x) = args.data { builder.add_data(x); }
2142 builder.finish()
2143 }
2144
2145
2146 #[inline]
2147 pub fn data(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>> {
2148 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>>>(Document::VT_DATA, None).unwrap()}
2152 }
2153}
2154
2155impl flatbuffers::Verifiable for Document<'_> {
2156 #[inline]
2157 fn run_verifier(
2158 v: &mut flatbuffers::Verifier, pos: usize
2159 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2160 use self::flatbuffers::Verifiable;
2161 v.visit_table(pos)?
2162 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>>>("data", Self::VT_DATA, true)?
2163 .finish();
2164 Ok(())
2165 }
2166}
2167pub struct DocumentArgs<'a> {
2168 pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>>>,
2169}
2170impl<'a> Default for DocumentArgs<'a> {
2171 #[inline]
2172 fn default() -> Self {
2173 DocumentArgs {
2174 data: None, }
2176 }
2177}
2178
2179pub struct DocumentBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2180 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2181 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2182}
2183impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DocumentBuilder<'a, 'b, A> {
2184 #[inline]
2185 pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValue<'b >>>>) {
2186 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Document::VT_DATA, data);
2187 }
2188 #[inline]
2189 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> DocumentBuilder<'a, 'b, A> {
2190 let start = _fbb.start_table();
2191 DocumentBuilder {
2192 fbb_: _fbb,
2193 start_: start,
2194 }
2195 }
2196 #[inline]
2197 pub fn finish(self) -> flatbuffers::WIPOffset<Document<'a>> {
2198 let o = self.fbb_.end_table(self.start_);
2199 self.fbb_.required(o, Document::VT_DATA,"data");
2200 flatbuffers::WIPOffset::new(o.value())
2201 }
2202}
2203
2204impl core::fmt::Debug for Document<'_> {
2205 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2206 let mut ds = f.debug_struct("Document");
2207 ds.field("data", &self.data());
2208 ds.finish()
2209 }
2210}
2211pub enum TrainOffset {}
2212#[derive(Copy, Clone, PartialEq)]
2213
2214pub struct Train<'a> {
2215 pub _tab: flatbuffers::Table<'a>,
2216}
2217
2218impl<'a> flatbuffers::Follow<'a> for Train<'a> {
2219 type Inner = Train<'a>;
2220 #[inline]
2221 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2222 Self { _tab: flatbuffers::Table::new(buf, loc) }
2223 }
2224}
2225
2226impl<'a> Train<'a> {
2227 pub const VT_VALUES: flatbuffers::VOffsetT = 4;
2228 pub const VT_TOPIC: flatbuffers::VOffsetT = 6;
2229 pub const VT_EVENT_TIME: flatbuffers::VOffsetT = 8;
2230
2231 #[inline]
2232 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2233 Train { _tab: table }
2234 }
2235 #[allow(unused_mut)]
2236 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2237 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2238 args: &'args TrainArgs<'args>
2239 ) -> flatbuffers::WIPOffset<Train<'bldr>> {
2240 let mut builder = TrainBuilder::new(_fbb);
2241 if let Some(x) = args.event_time { builder.add_event_time(x); }
2242 if let Some(x) = args.topic { builder.add_topic(x); }
2243 if let Some(x) = args.values { builder.add_values(x); }
2244 builder.finish()
2245 }
2246
2247
2248 #[inline]
2249 pub fn values(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ValueWrapper<'a>>> {
2250 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ValueWrapper>>>>(Train::VT_VALUES, None).unwrap()}
2254 }
2255 #[inline]
2256 pub fn topic(&self) -> Option<&'a str> {
2257 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Train::VT_TOPIC, None)}
2261 }
2262 #[inline]
2263 pub fn event_time(&self) -> Option<Time<'a>> {
2264 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Time>>(Train::VT_EVENT_TIME, None)}
2268 }
2269}
2270
2271impl flatbuffers::Verifiable for Train<'_> {
2272 #[inline]
2273 fn run_verifier(
2274 v: &mut flatbuffers::Verifier, pos: usize
2275 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2276 use self::flatbuffers::Verifiable;
2277 v.visit_table(pos)?
2278 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ValueWrapper>>>>("values", Self::VT_VALUES, true)?
2279 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("topic", Self::VT_TOPIC, false)?
2280 .visit_field::<flatbuffers::ForwardsUOffset<Time>>("event_time", Self::VT_EVENT_TIME, false)?
2281 .finish();
2282 Ok(())
2283 }
2284}
2285pub struct TrainArgs<'a> {
2286 pub values: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ValueWrapper<'a>>>>>,
2287 pub topic: Option<flatbuffers::WIPOffset<&'a str>>,
2288 pub event_time: Option<flatbuffers::WIPOffset<Time<'a>>>,
2289}
2290impl<'a> Default for TrainArgs<'a> {
2291 #[inline]
2292 fn default() -> Self {
2293 TrainArgs {
2294 values: None, topic: None,
2296 event_time: None,
2297 }
2298 }
2299}
2300
2301pub struct TrainBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2302 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2303 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2304}
2305impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TrainBuilder<'a, 'b, A> {
2306 #[inline]
2307 pub fn add_values(&mut self, values: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<ValueWrapper<'b >>>>) {
2308 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Train::VT_VALUES, values);
2309 }
2310 #[inline]
2311 pub fn add_topic(&mut self, topic: flatbuffers::WIPOffset<&'b str>) {
2312 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Train::VT_TOPIC, topic);
2313 }
2314 #[inline]
2315 pub fn add_event_time(&mut self, event_time: flatbuffers::WIPOffset<Time<'b >>) {
2316 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Time>>(Train::VT_EVENT_TIME, event_time);
2317 }
2318 #[inline]
2319 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TrainBuilder<'a, 'b, A> {
2320 let start = _fbb.start_table();
2321 TrainBuilder {
2322 fbb_: _fbb,
2323 start_: start,
2324 }
2325 }
2326 #[inline]
2327 pub fn finish(self) -> flatbuffers::WIPOffset<Train<'a>> {
2328 let o = self.fbb_.end_table(self.start_);
2329 self.fbb_.required(o, Train::VT_VALUES,"values");
2330 flatbuffers::WIPOffset::new(o.value())
2331 }
2332}
2333
2334impl core::fmt::Debug for Train<'_> {
2335 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2336 let mut ds = f.debug_struct("Train");
2337 ds.field("values", &self.values());
2338 ds.field("topic", &self.topic());
2339 ds.field("event_time", &self.event_time());
2340 ds.finish()
2341 }
2342}
2343pub enum CatalogOffset {}
2344#[derive(Copy, Clone, PartialEq)]
2345
2346pub struct Catalog<'a> {
2347 pub _tab: flatbuffers::Table<'a>,
2348}
2349
2350impl<'a> flatbuffers::Follow<'a> for Catalog<'a> {
2351 type Inner = Catalog<'a>;
2352 #[inline]
2353 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2354 Self { _tab: flatbuffers::Table::new(buf, loc) }
2355 }
2356}
2357
2358impl<'a> Catalog<'a> {
2359 pub const VT_PLANS: flatbuffers::VOffsetT = 4;
2360
2361 #[inline]
2362 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2363 Catalog { _tab: table }
2364 }
2365 #[allow(unused_mut)]
2366 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2367 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2368 args: &'args CatalogArgs<'args>
2369 ) -> flatbuffers::WIPOffset<Catalog<'bldr>> {
2370 let mut builder = CatalogBuilder::new(_fbb);
2371 if let Some(x) = args.plans { builder.add_plans(x); }
2372 builder.finish()
2373 }
2374
2375
2376 #[inline]
2377 pub fn plans(&self) -> Option<Plans<'a>> {
2378 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Plans>>(Catalog::VT_PLANS, None)}
2382 }
2383}
2384
2385impl flatbuffers::Verifiable for Catalog<'_> {
2386 #[inline]
2387 fn run_verifier(
2388 v: &mut flatbuffers::Verifier, pos: usize
2389 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2390 use self::flatbuffers::Verifiable;
2391 v.visit_table(pos)?
2392 .visit_field::<flatbuffers::ForwardsUOffset<Plans>>("plans", Self::VT_PLANS, false)?
2393 .finish();
2394 Ok(())
2395 }
2396}
2397pub struct CatalogArgs<'a> {
2398 pub plans: Option<flatbuffers::WIPOffset<Plans<'a>>>,
2399}
2400impl<'a> Default for CatalogArgs<'a> {
2401 #[inline]
2402 fn default() -> Self {
2403 CatalogArgs {
2404 plans: None,
2405 }
2406 }
2407}
2408
2409pub struct CatalogBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2410 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2411 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2412}
2413impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> CatalogBuilder<'a, 'b, A> {
2414 #[inline]
2415 pub fn add_plans(&mut self, plans: flatbuffers::WIPOffset<Plans<'b >>) {
2416 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Plans>>(Catalog::VT_PLANS, plans);
2417 }
2418 #[inline]
2419 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> CatalogBuilder<'a, 'b, A> {
2420 let start = _fbb.start_table();
2421 CatalogBuilder {
2422 fbb_: _fbb,
2423 start_: start,
2424 }
2425 }
2426 #[inline]
2427 pub fn finish(self) -> flatbuffers::WIPOffset<Catalog<'a>> {
2428 let o = self.fbb_.end_table(self.start_);
2429 flatbuffers::WIPOffset::new(o.value())
2430 }
2431}
2432
2433impl core::fmt::Debug for Catalog<'_> {
2434 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2435 let mut ds = f.debug_struct("Catalog");
2436 ds.field("plans", &self.plans());
2437 ds.finish()
2438 }
2439}
2440pub enum StationOffset {}
2441#[derive(Copy, Clone, PartialEq)]
2442
2443pub struct Station<'a> {
2444 pub _tab: flatbuffers::Table<'a>,
2445}
2446
2447impl<'a> flatbuffers::Follow<'a> for Station<'a> {
2448 type Inner = Station<'a>;
2449 #[inline]
2450 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2451 Self { _tab: flatbuffers::Table::new(buf, loc) }
2452 }
2453}
2454
2455impl<'a> Station<'a> {
2456 pub const VT_ID: flatbuffers::VOffsetT = 4;
2457 pub const VT_STOP: flatbuffers::VOffsetT = 6;
2458 pub const VT_TRANSFORM: flatbuffers::VOffsetT = 8;
2459 pub const VT_BLOCK: flatbuffers::VOffsetT = 10;
2460 pub const VT_INPUTS: flatbuffers::VOffsetT = 12;
2461
2462 #[inline]
2463 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2464 Station { _tab: table }
2465 }
2466 #[allow(unused_mut)]
2467 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2468 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2469 args: &'args StationArgs<'args>
2470 ) -> flatbuffers::WIPOffset<Station<'bldr>> {
2471 let mut builder = StationBuilder::new(_fbb);
2472 builder.add_stop(args.stop);
2473 builder.add_id(args.id);
2474 if let Some(x) = args.inputs { builder.add_inputs(x); }
2475 if let Some(x) = args.block { builder.add_block(x); }
2476 if let Some(x) = args.transform { builder.add_transform(x); }
2477 builder.finish()
2478 }
2479
2480
2481 #[inline]
2482 pub fn id(&self) -> u64 {
2483 unsafe { self._tab.get::<u64>(Station::VT_ID, Some(0)).unwrap()}
2487 }
2488 #[inline]
2489 pub fn stop(&self) -> u64 {
2490 unsafe { self._tab.get::<u64>(Station::VT_STOP, Some(0)).unwrap()}
2494 }
2495 #[inline]
2496 pub fn transform(&self) -> Option<Transform<'a>> {
2497 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Transform>>(Station::VT_TRANSFORM, None)}
2501 }
2502 #[inline]
2503 pub fn block(&self) -> Option<flatbuffers::Vector<'a, u64>> {
2504 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u64>>>(Station::VT_BLOCK, None)}
2508 }
2509 #[inline]
2510 pub fn inputs(&self) -> Option<flatbuffers::Vector<'a, u64>> {
2511 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u64>>>(Station::VT_INPUTS, None)}
2515 }
2516}
2517
2518impl flatbuffers::Verifiable for Station<'_> {
2519 #[inline]
2520 fn run_verifier(
2521 v: &mut flatbuffers::Verifier, pos: usize
2522 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2523 use self::flatbuffers::Verifiable;
2524 v.visit_table(pos)?
2525 .visit_field::<u64>("id", Self::VT_ID, false)?
2526 .visit_field::<u64>("stop", Self::VT_STOP, false)?
2527 .visit_field::<flatbuffers::ForwardsUOffset<Transform>>("transform", Self::VT_TRANSFORM, false)?
2528 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u64>>>("block", Self::VT_BLOCK, false)?
2529 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u64>>>("inputs", Self::VT_INPUTS, false)?
2530 .finish();
2531 Ok(())
2532 }
2533}
2534pub struct StationArgs<'a> {
2535 pub id: u64,
2536 pub stop: u64,
2537 pub transform: Option<flatbuffers::WIPOffset<Transform<'a>>>,
2538 pub block: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u64>>>,
2539 pub inputs: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u64>>>,
2540}
2541impl<'a> Default for StationArgs<'a> {
2542 #[inline]
2543 fn default() -> Self {
2544 StationArgs {
2545 id: 0,
2546 stop: 0,
2547 transform: None,
2548 block: None,
2549 inputs: None,
2550 }
2551 }
2552}
2553
2554pub struct StationBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2555 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2556 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2557}
2558impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> StationBuilder<'a, 'b, A> {
2559 #[inline]
2560 pub fn add_id(&mut self, id: u64) {
2561 self.fbb_.push_slot::<u64>(Station::VT_ID, id, 0);
2562 }
2563 #[inline]
2564 pub fn add_stop(&mut self, stop: u64) {
2565 self.fbb_.push_slot::<u64>(Station::VT_STOP, stop, 0);
2566 }
2567 #[inline]
2568 pub fn add_transform(&mut self, transform: flatbuffers::WIPOffset<Transform<'b >>) {
2569 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Transform>>(Station::VT_TRANSFORM, transform);
2570 }
2571 #[inline]
2572 pub fn add_block(&mut self, block: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u64>>) {
2573 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Station::VT_BLOCK, block);
2574 }
2575 #[inline]
2576 pub fn add_inputs(&mut self, inputs: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u64>>) {
2577 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Station::VT_INPUTS, inputs);
2578 }
2579 #[inline]
2580 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> StationBuilder<'a, 'b, A> {
2581 let start = _fbb.start_table();
2582 StationBuilder {
2583 fbb_: _fbb,
2584 start_: start,
2585 }
2586 }
2587 #[inline]
2588 pub fn finish(self) -> flatbuffers::WIPOffset<Station<'a>> {
2589 let o = self.fbb_.end_table(self.start_);
2590 flatbuffers::WIPOffset::new(o.value())
2591 }
2592}
2593
2594impl core::fmt::Debug for Station<'_> {
2595 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2596 let mut ds = f.debug_struct("Station");
2597 ds.field("id", &self.id());
2598 ds.field("stop", &self.stop());
2599 ds.field("transform", &self.transform());
2600 ds.field("block", &self.block());
2601 ds.field("inputs", &self.inputs());
2602 ds.finish()
2603 }
2604}
2605pub enum LanguageTransformOffset {}
2606#[derive(Copy, Clone, PartialEq)]
2607
2608pub struct LanguageTransform<'a> {
2609 pub _tab: flatbuffers::Table<'a>,
2610}
2611
2612impl<'a> flatbuffers::Follow<'a> for LanguageTransform<'a> {
2613 type Inner = LanguageTransform<'a>;
2614 #[inline]
2615 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2616 Self { _tab: flatbuffers::Table::new(buf, loc) }
2617 }
2618}
2619
2620impl<'a> LanguageTransform<'a> {
2621 pub const VT_LANGUAGE: flatbuffers::VOffsetT = 4;
2622 pub const VT_QUERY: flatbuffers::VOffsetT = 6;
2623
2624 #[inline]
2625 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2626 LanguageTransform { _tab: table }
2627 }
2628 #[allow(unused_mut)]
2629 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2630 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2631 args: &'args LanguageTransformArgs<'args>
2632 ) -> flatbuffers::WIPOffset<LanguageTransform<'bldr>> {
2633 let mut builder = LanguageTransformBuilder::new(_fbb);
2634 if let Some(x) = args.query { builder.add_query(x); }
2635 if let Some(x) = args.language { builder.add_language(x); }
2636 builder.finish()
2637 }
2638
2639
2640 #[inline]
2641 pub fn language(&self) -> Option<&'a str> {
2642 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(LanguageTransform::VT_LANGUAGE, None)}
2646 }
2647 #[inline]
2648 pub fn query(&self) -> Option<&'a str> {
2649 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(LanguageTransform::VT_QUERY, None)}
2653 }
2654}
2655
2656impl flatbuffers::Verifiable for LanguageTransform<'_> {
2657 #[inline]
2658 fn run_verifier(
2659 v: &mut flatbuffers::Verifier, pos: usize
2660 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2661 use self::flatbuffers::Verifiable;
2662 v.visit_table(pos)?
2663 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("language", Self::VT_LANGUAGE, false)?
2664 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("query", Self::VT_QUERY, false)?
2665 .finish();
2666 Ok(())
2667 }
2668}
2669pub struct LanguageTransformArgs<'a> {
2670 pub language: Option<flatbuffers::WIPOffset<&'a str>>,
2671 pub query: Option<flatbuffers::WIPOffset<&'a str>>,
2672}
2673impl<'a> Default for LanguageTransformArgs<'a> {
2674 #[inline]
2675 fn default() -> Self {
2676 LanguageTransformArgs {
2677 language: None,
2678 query: None,
2679 }
2680 }
2681}
2682
2683pub struct LanguageTransformBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2684 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2685 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2686}
2687impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> LanguageTransformBuilder<'a, 'b, A> {
2688 #[inline]
2689 pub fn add_language(&mut self, language: flatbuffers::WIPOffset<&'b str>) {
2690 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(LanguageTransform::VT_LANGUAGE, language);
2691 }
2692 #[inline]
2693 pub fn add_query(&mut self, query: flatbuffers::WIPOffset<&'b str>) {
2694 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(LanguageTransform::VT_QUERY, query);
2695 }
2696 #[inline]
2697 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> LanguageTransformBuilder<'a, 'b, A> {
2698 let start = _fbb.start_table();
2699 LanguageTransformBuilder {
2700 fbb_: _fbb,
2701 start_: start,
2702 }
2703 }
2704 #[inline]
2705 pub fn finish(self) -> flatbuffers::WIPOffset<LanguageTransform<'a>> {
2706 let o = self.fbb_.end_table(self.start_);
2707 flatbuffers::WIPOffset::new(o.value())
2708 }
2709}
2710
2711impl core::fmt::Debug for LanguageTransform<'_> {
2712 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2713 let mut ds = f.debug_struct("LanguageTransform");
2714 ds.field("language", &self.language());
2715 ds.field("query", &self.query());
2716 ds.finish()
2717 }
2718}
2719pub enum TransformOffset {}
2720#[derive(Copy, Clone, PartialEq)]
2721
2722pub struct Transform<'a> {
2723 pub _tab: flatbuffers::Table<'a>,
2724}
2725
2726impl<'a> flatbuffers::Follow<'a> for Transform<'a> {
2727 type Inner = Transform<'a>;
2728 #[inline]
2729 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2730 Self { _tab: flatbuffers::Table::new(buf, loc) }
2731 }
2732}
2733
2734impl<'a> Transform<'a> {
2735 pub const VT_NAME: flatbuffers::VOffsetT = 4;
2736 pub const VT_TYPE_TYPE: flatbuffers::VOffsetT = 6;
2737 pub const VT_TYPE_: flatbuffers::VOffsetT = 8;
2738
2739 #[inline]
2740 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2741 Transform { _tab: table }
2742 }
2743 #[allow(unused_mut)]
2744 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2745 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2746 args: &'args TransformArgs<'args>
2747 ) -> flatbuffers::WIPOffset<Transform<'bldr>> {
2748 let mut builder = TransformBuilder::new(_fbb);
2749 if let Some(x) = args.type_ { builder.add_type_(x); }
2750 if let Some(x) = args.name { builder.add_name(x); }
2751 builder.add_type_type(args.type_type);
2752 builder.finish()
2753 }
2754
2755
2756 #[inline]
2757 pub fn name(&self) -> Option<&'a str> {
2758 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Transform::VT_NAME, None)}
2762 }
2763 #[inline]
2764 pub fn type_type(&self) -> TransformType {
2765 unsafe { self._tab.get::<TransformType>(Transform::VT_TYPE_TYPE, Some(TransformType::NONE)).unwrap()}
2769 }
2770 #[inline]
2771 pub fn type_(&self) -> Option<flatbuffers::Table<'a>> {
2772 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(Transform::VT_TYPE_, None)}
2776 }
2777 #[inline]
2778 #[allow(non_snake_case)]
2779 pub fn type__as_language_transform(&self) -> Option<LanguageTransform<'a>> {
2780 if self.type_type() == TransformType::LanguageTransform {
2781 self.type_().map(|t| {
2782 unsafe { LanguageTransform::init_from_table(t) }
2786 })
2787 } else {
2788 None
2789 }
2790 }
2791
2792}
2793
2794impl flatbuffers::Verifiable for Transform<'_> {
2795 #[inline]
2796 fn run_verifier(
2797 v: &mut flatbuffers::Verifier, pos: usize
2798 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2799 use self::flatbuffers::Verifiable;
2800 v.visit_table(pos)?
2801 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
2802 .visit_union::<TransformType, _>("type_type", Self::VT_TYPE_TYPE, "type_", Self::VT_TYPE_, false, |key, v, pos| {
2803 match key {
2804 TransformType::LanguageTransform => v.verify_union_variant::<flatbuffers::ForwardsUOffset<LanguageTransform>>("TransformType::LanguageTransform", pos),
2805 _ => Ok(()),
2806 }
2807 })?
2808 .finish();
2809 Ok(())
2810 }
2811}
2812pub struct TransformArgs<'a> {
2813 pub name: Option<flatbuffers::WIPOffset<&'a str>>,
2814 pub type_type: TransformType,
2815 pub type_: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
2816}
2817impl<'a> Default for TransformArgs<'a> {
2818 #[inline]
2819 fn default() -> Self {
2820 TransformArgs {
2821 name: None,
2822 type_type: TransformType::NONE,
2823 type_: None,
2824 }
2825 }
2826}
2827
2828pub struct TransformBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2829 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2830 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2831}
2832impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TransformBuilder<'a, 'b, A> {
2833 #[inline]
2834 pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
2835 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Transform::VT_NAME, name);
2836 }
2837 #[inline]
2838 pub fn add_type_type(&mut self, type_type: TransformType) {
2839 self.fbb_.push_slot::<TransformType>(Transform::VT_TYPE_TYPE, type_type, TransformType::NONE);
2840 }
2841 #[inline]
2842 pub fn add_type_(&mut self, type_: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
2843 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Transform::VT_TYPE_, type_);
2844 }
2845 #[inline]
2846 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TransformBuilder<'a, 'b, A> {
2847 let start = _fbb.start_table();
2848 TransformBuilder {
2849 fbb_: _fbb,
2850 start_: start,
2851 }
2852 }
2853 #[inline]
2854 pub fn finish(self) -> flatbuffers::WIPOffset<Transform<'a>> {
2855 let o = self.fbb_.end_table(self.start_);
2856 flatbuffers::WIPOffset::new(o.value())
2857 }
2858}
2859
2860impl core::fmt::Debug for Transform<'_> {
2861 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2862 let mut ds = f.debug_struct("Transform");
2863 ds.field("name", &self.name());
2864 ds.field("type_type", &self.type_type());
2865 match self.type_type() {
2866 TransformType::LanguageTransform => {
2867 if let Some(x) = self.type__as_language_transform() {
2868 ds.field("type_", &x)
2869 } else {
2870 ds.field("type_", &"InvalidFlatbuffer: Union discriminant does not match value.")
2871 }
2872 },
2873 _ => {
2874 let x: Option<()> = None;
2875 ds.field("type_", &x)
2876 },
2877 };
2878 ds.finish()
2879 }
2880}
2881pub enum KeyValueU64VecU64Offset {}
2882#[derive(Copy, Clone, PartialEq)]
2883
2884pub struct KeyValueU64VecU64<'a> {
2885 pub _tab: flatbuffers::Table<'a>,
2886}
2887
2888impl<'a> flatbuffers::Follow<'a> for KeyValueU64VecU64<'a> {
2889 type Inner = KeyValueU64VecU64<'a>;
2890 #[inline]
2891 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2892 Self { _tab: flatbuffers::Table::new(buf, loc) }
2893 }
2894}
2895
2896impl<'a> KeyValueU64VecU64<'a> {
2897 pub const VT_KEY: flatbuffers::VOffsetT = 4;
2898 pub const VT_VALUE: flatbuffers::VOffsetT = 6;
2899
2900 #[inline]
2901 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2902 KeyValueU64VecU64 { _tab: table }
2903 }
2904 #[allow(unused_mut)]
2905 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2906 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2907 args: &'args KeyValueU64VecU64Args<'args>
2908 ) -> flatbuffers::WIPOffset<KeyValueU64VecU64<'bldr>> {
2909 let mut builder = KeyValueU64VecU64Builder::new(_fbb);
2910 builder.add_key(args.key);
2911 if let Some(x) = args.value { builder.add_value(x); }
2912 builder.finish()
2913 }
2914
2915
2916 #[inline]
2917 pub fn key(&self) -> u64 {
2918 unsafe { self._tab.get::<u64>(KeyValueU64VecU64::VT_KEY, Some(0)).unwrap()}
2922 }
2923 #[inline]
2924 pub fn value(&self) -> Option<flatbuffers::Vector<'a, u64>> {
2925 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u64>>>(KeyValueU64VecU64::VT_VALUE, None)}
2929 }
2930}
2931
2932impl flatbuffers::Verifiable for KeyValueU64VecU64<'_> {
2933 #[inline]
2934 fn run_verifier(
2935 v: &mut flatbuffers::Verifier, pos: usize
2936 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2937 use self::flatbuffers::Verifiable;
2938 v.visit_table(pos)?
2939 .visit_field::<u64>("key", Self::VT_KEY, false)?
2940 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u64>>>("value", Self::VT_VALUE, false)?
2941 .finish();
2942 Ok(())
2943 }
2944}
2945pub struct KeyValueU64VecU64Args<'a> {
2946 pub key: u64,
2947 pub value: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u64>>>,
2948}
2949impl<'a> Default for KeyValueU64VecU64Args<'a> {
2950 #[inline]
2951 fn default() -> Self {
2952 KeyValueU64VecU64Args {
2953 key: 0,
2954 value: None,
2955 }
2956 }
2957}
2958
2959pub struct KeyValueU64VecU64Builder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2960 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2961 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2962}
2963impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueU64VecU64Builder<'a, 'b, A> {
2964 #[inline]
2965 pub fn add_key(&mut self, key: u64) {
2966 self.fbb_.push_slot::<u64>(KeyValueU64VecU64::VT_KEY, key, 0);
2967 }
2968 #[inline]
2969 pub fn add_value(&mut self, value: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u64>>) {
2970 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValueU64VecU64::VT_VALUE, value);
2971 }
2972 #[inline]
2973 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> KeyValueU64VecU64Builder<'a, 'b, A> {
2974 let start = _fbb.start_table();
2975 KeyValueU64VecU64Builder {
2976 fbb_: _fbb,
2977 start_: start,
2978 }
2979 }
2980 #[inline]
2981 pub fn finish(self) -> flatbuffers::WIPOffset<KeyValueU64VecU64<'a>> {
2982 let o = self.fbb_.end_table(self.start_);
2983 flatbuffers::WIPOffset::new(o.value())
2984 }
2985}
2986
2987impl core::fmt::Debug for KeyValueU64VecU64<'_> {
2988 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2989 let mut ds = f.debug_struct("KeyValueU64VecU64");
2990 ds.field("key", &self.key());
2991 ds.field("value", &self.value());
2992 ds.finish()
2993 }
2994}
2995pub enum KeyValueU64StationOffset {}
2996#[derive(Copy, Clone, PartialEq)]
2997
2998pub struct KeyValueU64Station<'a> {
2999 pub _tab: flatbuffers::Table<'a>,
3000}
3001
3002impl<'a> flatbuffers::Follow<'a> for KeyValueU64Station<'a> {
3003 type Inner = KeyValueU64Station<'a>;
3004 #[inline]
3005 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3006 Self { _tab: flatbuffers::Table::new(buf, loc) }
3007 }
3008}
3009
3010impl<'a> KeyValueU64Station<'a> {
3011 pub const VT_KEY: flatbuffers::VOffsetT = 4;
3012 pub const VT_VALUE: flatbuffers::VOffsetT = 6;
3013
3014 #[inline]
3015 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3016 KeyValueU64Station { _tab: table }
3017 }
3018 #[allow(unused_mut)]
3019 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3020 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3021 args: &'args KeyValueU64StationArgs<'args>
3022 ) -> flatbuffers::WIPOffset<KeyValueU64Station<'bldr>> {
3023 let mut builder = KeyValueU64StationBuilder::new(_fbb);
3024 builder.add_key(args.key);
3025 if let Some(x) = args.value { builder.add_value(x); }
3026 builder.finish()
3027 }
3028
3029
3030 #[inline]
3031 pub fn key(&self) -> u64 {
3032 unsafe { self._tab.get::<u64>(KeyValueU64Station::VT_KEY, Some(0)).unwrap()}
3036 }
3037 #[inline]
3038 pub fn value(&self) -> Option<Station<'a>> {
3039 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Station>>(KeyValueU64Station::VT_VALUE, None)}
3043 }
3044}
3045
3046impl flatbuffers::Verifiable for KeyValueU64Station<'_> {
3047 #[inline]
3048 fn run_verifier(
3049 v: &mut flatbuffers::Verifier, pos: usize
3050 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3051 use self::flatbuffers::Verifiable;
3052 v.visit_table(pos)?
3053 .visit_field::<u64>("key", Self::VT_KEY, false)?
3054 .visit_field::<flatbuffers::ForwardsUOffset<Station>>("value", Self::VT_VALUE, false)?
3055 .finish();
3056 Ok(())
3057 }
3058}
3059pub struct KeyValueU64StationArgs<'a> {
3060 pub key: u64,
3061 pub value: Option<flatbuffers::WIPOffset<Station<'a>>>,
3062}
3063impl<'a> Default for KeyValueU64StationArgs<'a> {
3064 #[inline]
3065 fn default() -> Self {
3066 KeyValueU64StationArgs {
3067 key: 0,
3068 value: None,
3069 }
3070 }
3071}
3072
3073pub struct KeyValueU64StationBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3074 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3075 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3076}
3077impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueU64StationBuilder<'a, 'b, A> {
3078 #[inline]
3079 pub fn add_key(&mut self, key: u64) {
3080 self.fbb_.push_slot::<u64>(KeyValueU64Station::VT_KEY, key, 0);
3081 }
3082 #[inline]
3083 pub fn add_value(&mut self, value: flatbuffers::WIPOffset<Station<'b >>) {
3084 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Station>>(KeyValueU64Station::VT_VALUE, value);
3085 }
3086 #[inline]
3087 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> KeyValueU64StationBuilder<'a, 'b, A> {
3088 let start = _fbb.start_table();
3089 KeyValueU64StationBuilder {
3090 fbb_: _fbb,
3091 start_: start,
3092 }
3093 }
3094 #[inline]
3095 pub fn finish(self) -> flatbuffers::WIPOffset<KeyValueU64Station<'a>> {
3096 let o = self.fbb_.end_table(self.start_);
3097 flatbuffers::WIPOffset::new(o.value())
3098 }
3099}
3100
3101impl core::fmt::Debug for KeyValueU64Station<'_> {
3102 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3103 let mut ds = f.debug_struct("KeyValueU64Station");
3104 ds.field("key", &self.key());
3105 ds.field("value", &self.value());
3106 ds.finish()
3107 }
3108}
3109pub enum KeyValueStringTransformOffset {}
3110#[derive(Copy, Clone, PartialEq)]
3111
3112pub struct KeyValueStringTransform<'a> {
3113 pub _tab: flatbuffers::Table<'a>,
3114}
3115
3116impl<'a> flatbuffers::Follow<'a> for KeyValueStringTransform<'a> {
3117 type Inner = KeyValueStringTransform<'a>;
3118 #[inline]
3119 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3120 Self { _tab: flatbuffers::Table::new(buf, loc) }
3121 }
3122}
3123
3124impl<'a> KeyValueStringTransform<'a> {
3125 pub const VT_KEY: flatbuffers::VOffsetT = 4;
3126 pub const VT_VALUE: flatbuffers::VOffsetT = 6;
3127
3128 #[inline]
3129 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3130 KeyValueStringTransform { _tab: table }
3131 }
3132 #[allow(unused_mut)]
3133 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3134 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3135 args: &'args KeyValueStringTransformArgs<'args>
3136 ) -> flatbuffers::WIPOffset<KeyValueStringTransform<'bldr>> {
3137 let mut builder = KeyValueStringTransformBuilder::new(_fbb);
3138 if let Some(x) = args.value { builder.add_value(x); }
3139 if let Some(x) = args.key { builder.add_key(x); }
3140 builder.finish()
3141 }
3142
3143
3144 #[inline]
3145 pub fn key(&self) -> &'a str {
3146 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(KeyValueStringTransform::VT_KEY, None).unwrap()}
3150 }
3151 #[inline]
3152 pub fn value(&self) -> Transform<'a> {
3153 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Transform>>(KeyValueStringTransform::VT_VALUE, None).unwrap()}
3157 }
3158}
3159
3160impl flatbuffers::Verifiable for KeyValueStringTransform<'_> {
3161 #[inline]
3162 fn run_verifier(
3163 v: &mut flatbuffers::Verifier, pos: usize
3164 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3165 use self::flatbuffers::Verifiable;
3166 v.visit_table(pos)?
3167 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("key", Self::VT_KEY, true)?
3168 .visit_field::<flatbuffers::ForwardsUOffset<Transform>>("value", Self::VT_VALUE, true)?
3169 .finish();
3170 Ok(())
3171 }
3172}
3173pub struct KeyValueStringTransformArgs<'a> {
3174 pub key: Option<flatbuffers::WIPOffset<&'a str>>,
3175 pub value: Option<flatbuffers::WIPOffset<Transform<'a>>>,
3176}
3177impl<'a> Default for KeyValueStringTransformArgs<'a> {
3178 #[inline]
3179 fn default() -> Self {
3180 KeyValueStringTransformArgs {
3181 key: None, value: None, }
3184 }
3185}
3186
3187pub struct KeyValueStringTransformBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3188 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3189 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3190}
3191impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueStringTransformBuilder<'a, 'b, A> {
3192 #[inline]
3193 pub fn add_key(&mut self, key: flatbuffers::WIPOffset<&'b str>) {
3194 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValueStringTransform::VT_KEY, key);
3195 }
3196 #[inline]
3197 pub fn add_value(&mut self, value: flatbuffers::WIPOffset<Transform<'b >>) {
3198 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Transform>>(KeyValueStringTransform::VT_VALUE, value);
3199 }
3200 #[inline]
3201 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> KeyValueStringTransformBuilder<'a, 'b, A> {
3202 let start = _fbb.start_table();
3203 KeyValueStringTransformBuilder {
3204 fbb_: _fbb,
3205 start_: start,
3206 }
3207 }
3208 #[inline]
3209 pub fn finish(self) -> flatbuffers::WIPOffset<KeyValueStringTransform<'a>> {
3210 let o = self.fbb_.end_table(self.start_);
3211 self.fbb_.required(o, KeyValueStringTransform::VT_KEY,"key");
3212 self.fbb_.required(o, KeyValueStringTransform::VT_VALUE,"value");
3213 flatbuffers::WIPOffset::new(o.value())
3214 }
3215}
3216
3217impl core::fmt::Debug for KeyValueStringTransform<'_> {
3218 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3219 let mut ds = f.debug_struct("KeyValueStringTransform");
3220 ds.field("key", &self.key());
3221 ds.field("value", &self.value());
3222 ds.finish()
3223 }
3224}
3225pub enum SourceOffset {}
3226#[derive(Copy, Clone, PartialEq)]
3227
3228pub struct Source<'a> {
3229 pub _tab: flatbuffers::Table<'a>,
3230}
3231
3232impl<'a> flatbuffers::Follow<'a> for Source<'a> {
3233 type Inner = Source<'a>;
3234 #[inline]
3235 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3236 Self { _tab: flatbuffers::Table::new(buf, loc) }
3237 }
3238}
3239
3240impl<'a> Source<'a> {
3241 pub const VT_ID: flatbuffers::VOffsetT = 4;
3242 pub const VT_NAME: flatbuffers::VOffsetT = 6;
3243 pub const VT_TYPE_: flatbuffers::VOffsetT = 8;
3244
3245 #[inline]
3246 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3247 Source { _tab: table }
3248 }
3249 #[allow(unused_mut)]
3250 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3251 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3252 args: &'args SourceArgs<'args>
3253 ) -> flatbuffers::WIPOffset<Source<'bldr>> {
3254 let mut builder = SourceBuilder::new(_fbb);
3255 builder.add_id(args.id);
3256 if let Some(x) = args.type_ { builder.add_type_(x); }
3257 if let Some(x) = args.name { builder.add_name(x); }
3258 builder.finish()
3259 }
3260
3261
3262 #[inline]
3263 pub fn id(&self) -> u64 {
3264 unsafe { self._tab.get::<u64>(Source::VT_ID, Some(0)).unwrap()}
3268 }
3269 #[inline]
3270 pub fn name(&self) -> &'a str {
3271 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Source::VT_NAME, None).unwrap()}
3275 }
3276 #[inline]
3277 pub fn type_(&self) -> &'a str {
3278 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Source::VT_TYPE_, None).unwrap()}
3282 }
3283}
3284
3285impl flatbuffers::Verifiable for Source<'_> {
3286 #[inline]
3287 fn run_verifier(
3288 v: &mut flatbuffers::Verifier, pos: usize
3289 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3290 use self::flatbuffers::Verifiable;
3291 v.visit_table(pos)?
3292 .visit_field::<u64>("id", Self::VT_ID, false)?
3293 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
3294 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("type_", Self::VT_TYPE_, true)?
3295 .finish();
3296 Ok(())
3297 }
3298}
3299pub struct SourceArgs<'a> {
3300 pub id: u64,
3301 pub name: Option<flatbuffers::WIPOffset<&'a str>>,
3302 pub type_: Option<flatbuffers::WIPOffset<&'a str>>,
3303}
3304impl<'a> Default for SourceArgs<'a> {
3305 #[inline]
3306 fn default() -> Self {
3307 SourceArgs {
3308 id: 0,
3309 name: None, type_: None, }
3312 }
3313}
3314
3315pub struct SourceBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3316 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3317 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3318}
3319impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SourceBuilder<'a, 'b, A> {
3320 #[inline]
3321 pub fn add_id(&mut self, id: u64) {
3322 self.fbb_.push_slot::<u64>(Source::VT_ID, id, 0);
3323 }
3324 #[inline]
3325 pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
3326 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Source::VT_NAME, name);
3327 }
3328 #[inline]
3329 pub fn add_type_(&mut self, type_: flatbuffers::WIPOffset<&'b str>) {
3330 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Source::VT_TYPE_, type_);
3331 }
3332 #[inline]
3333 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SourceBuilder<'a, 'b, A> {
3334 let start = _fbb.start_table();
3335 SourceBuilder {
3336 fbb_: _fbb,
3337 start_: start,
3338 }
3339 }
3340 #[inline]
3341 pub fn finish(self) -> flatbuffers::WIPOffset<Source<'a>> {
3342 let o = self.fbb_.end_table(self.start_);
3343 self.fbb_.required(o, Source::VT_NAME,"name");
3344 self.fbb_.required(o, Source::VT_TYPE_,"type_");
3345 flatbuffers::WIPOffset::new(o.value())
3346 }
3347}
3348
3349impl core::fmt::Debug for Source<'_> {
3350 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3351 let mut ds = f.debug_struct("Source");
3352 ds.field("id", &self.id());
3353 ds.field("name", &self.name());
3354 ds.field("type_", &self.type_());
3355 ds.finish()
3356 }
3357}
3358pub enum DestinationOffset {}
3359#[derive(Copy, Clone, PartialEq)]
3360
3361pub struct Destination<'a> {
3362 pub _tab: flatbuffers::Table<'a>,
3363}
3364
3365impl<'a> flatbuffers::Follow<'a> for Destination<'a> {
3366 type Inner = Destination<'a>;
3367 #[inline]
3368 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3369 Self { _tab: flatbuffers::Table::new(buf, loc) }
3370 }
3371}
3372
3373impl<'a> Destination<'a> {
3374 pub const VT_ID: flatbuffers::VOffsetT = 4;
3375 pub const VT_NAME: flatbuffers::VOffsetT = 6;
3376 pub const VT_TYPE_: flatbuffers::VOffsetT = 8;
3377
3378 #[inline]
3379 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3380 Destination { _tab: table }
3381 }
3382 #[allow(unused_mut)]
3383 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3384 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3385 args: &'args DestinationArgs<'args>
3386 ) -> flatbuffers::WIPOffset<Destination<'bldr>> {
3387 let mut builder = DestinationBuilder::new(_fbb);
3388 builder.add_id(args.id);
3389 if let Some(x) = args.type_ { builder.add_type_(x); }
3390 if let Some(x) = args.name { builder.add_name(x); }
3391 builder.finish()
3392 }
3393
3394
3395 #[inline]
3396 pub fn id(&self) -> u64 {
3397 unsafe { self._tab.get::<u64>(Destination::VT_ID, Some(0)).unwrap()}
3401 }
3402 #[inline]
3403 pub fn name(&self) -> &'a str {
3404 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Destination::VT_NAME, None).unwrap()}
3408 }
3409 #[inline]
3410 pub fn type_(&self) -> &'a str {
3411 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Destination::VT_TYPE_, None).unwrap()}
3415 }
3416}
3417
3418impl flatbuffers::Verifiable for Destination<'_> {
3419 #[inline]
3420 fn run_verifier(
3421 v: &mut flatbuffers::Verifier, pos: usize
3422 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3423 use self::flatbuffers::Verifiable;
3424 v.visit_table(pos)?
3425 .visit_field::<u64>("id", Self::VT_ID, false)?
3426 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
3427 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("type_", Self::VT_TYPE_, true)?
3428 .finish();
3429 Ok(())
3430 }
3431}
3432pub struct DestinationArgs<'a> {
3433 pub id: u64,
3434 pub name: Option<flatbuffers::WIPOffset<&'a str>>,
3435 pub type_: Option<flatbuffers::WIPOffset<&'a str>>,
3436}
3437impl<'a> Default for DestinationArgs<'a> {
3438 #[inline]
3439 fn default() -> Self {
3440 DestinationArgs {
3441 id: 0,
3442 name: None, type_: None, }
3445 }
3446}
3447
3448pub struct DestinationBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3449 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3450 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3451}
3452impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DestinationBuilder<'a, 'b, A> {
3453 #[inline]
3454 pub fn add_id(&mut self, id: u64) {
3455 self.fbb_.push_slot::<u64>(Destination::VT_ID, id, 0);
3456 }
3457 #[inline]
3458 pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
3459 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Destination::VT_NAME, name);
3460 }
3461 #[inline]
3462 pub fn add_type_(&mut self, type_: flatbuffers::WIPOffset<&'b str>) {
3463 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Destination::VT_TYPE_, type_);
3464 }
3465 #[inline]
3466 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> DestinationBuilder<'a, 'b, A> {
3467 let start = _fbb.start_table();
3468 DestinationBuilder {
3469 fbb_: _fbb,
3470 start_: start,
3471 }
3472 }
3473 #[inline]
3474 pub fn finish(self) -> flatbuffers::WIPOffset<Destination<'a>> {
3475 let o = self.fbb_.end_table(self.start_);
3476 self.fbb_.required(o, Destination::VT_NAME,"name");
3477 self.fbb_.required(o, Destination::VT_TYPE_,"type_");
3478 flatbuffers::WIPOffset::new(o.value())
3479 }
3480}
3481
3482impl core::fmt::Debug for Destination<'_> {
3483 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3484 let mut ds = f.debug_struct("Destination");
3485 ds.field("id", &self.id());
3486 ds.field("name", &self.name());
3487 ds.field("type_", &self.type_());
3488 ds.finish()
3489 }
3490}
3491pub enum KeyValueU64SourceOffset {}
3492#[derive(Copy, Clone, PartialEq)]
3493
3494pub struct KeyValueU64Source<'a> {
3495 pub _tab: flatbuffers::Table<'a>,
3496}
3497
3498impl<'a> flatbuffers::Follow<'a> for KeyValueU64Source<'a> {
3499 type Inner = KeyValueU64Source<'a>;
3500 #[inline]
3501 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3502 Self { _tab: flatbuffers::Table::new(buf, loc) }
3503 }
3504}
3505
3506impl<'a> KeyValueU64Source<'a> {
3507 pub const VT_KEY: flatbuffers::VOffsetT = 4;
3508 pub const VT_VALUE: flatbuffers::VOffsetT = 6;
3509
3510 #[inline]
3511 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3512 KeyValueU64Source { _tab: table }
3513 }
3514 #[allow(unused_mut)]
3515 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3516 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3517 args: &'args KeyValueU64SourceArgs<'args>
3518 ) -> flatbuffers::WIPOffset<KeyValueU64Source<'bldr>> {
3519 let mut builder = KeyValueU64SourceBuilder::new(_fbb);
3520 builder.add_key(args.key);
3521 if let Some(x) = args.value { builder.add_value(x); }
3522 builder.finish()
3523 }
3524
3525
3526 #[inline]
3527 pub fn key(&self) -> u64 {
3528 unsafe { self._tab.get::<u64>(KeyValueU64Source::VT_KEY, Some(0)).unwrap()}
3532 }
3533 #[inline]
3534 pub fn value(&self) -> Source<'a> {
3535 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Source>>(KeyValueU64Source::VT_VALUE, None).unwrap()}
3539 }
3540}
3541
3542impl flatbuffers::Verifiable for KeyValueU64Source<'_> {
3543 #[inline]
3544 fn run_verifier(
3545 v: &mut flatbuffers::Verifier, pos: usize
3546 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3547 use self::flatbuffers::Verifiable;
3548 v.visit_table(pos)?
3549 .visit_field::<u64>("key", Self::VT_KEY, false)?
3550 .visit_field::<flatbuffers::ForwardsUOffset<Source>>("value", Self::VT_VALUE, true)?
3551 .finish();
3552 Ok(())
3553 }
3554}
3555pub struct KeyValueU64SourceArgs<'a> {
3556 pub key: u64,
3557 pub value: Option<flatbuffers::WIPOffset<Source<'a>>>,
3558}
3559impl<'a> Default for KeyValueU64SourceArgs<'a> {
3560 #[inline]
3561 fn default() -> Self {
3562 KeyValueU64SourceArgs {
3563 key: 0,
3564 value: None, }
3566 }
3567}
3568
3569pub struct KeyValueU64SourceBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3570 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3571 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3572}
3573impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueU64SourceBuilder<'a, 'b, A> {
3574 #[inline]
3575 pub fn add_key(&mut self, key: u64) {
3576 self.fbb_.push_slot::<u64>(KeyValueU64Source::VT_KEY, key, 0);
3577 }
3578 #[inline]
3579 pub fn add_value(&mut self, value: flatbuffers::WIPOffset<Source<'b >>) {
3580 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Source>>(KeyValueU64Source::VT_VALUE, value);
3581 }
3582 #[inline]
3583 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> KeyValueU64SourceBuilder<'a, 'b, A> {
3584 let start = _fbb.start_table();
3585 KeyValueU64SourceBuilder {
3586 fbb_: _fbb,
3587 start_: start,
3588 }
3589 }
3590 #[inline]
3591 pub fn finish(self) -> flatbuffers::WIPOffset<KeyValueU64Source<'a>> {
3592 let o = self.fbb_.end_table(self.start_);
3593 self.fbb_.required(o, KeyValueU64Source::VT_VALUE,"value");
3594 flatbuffers::WIPOffset::new(o.value())
3595 }
3596}
3597
3598impl core::fmt::Debug for KeyValueU64Source<'_> {
3599 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3600 let mut ds = f.debug_struct("KeyValueU64Source");
3601 ds.field("key", &self.key());
3602 ds.field("value", &self.value());
3603 ds.finish()
3604 }
3605}
3606pub enum KeyValueU64DestinationOffset {}
3607#[derive(Copy, Clone, PartialEq)]
3608
3609pub struct KeyValueU64Destination<'a> {
3610 pub _tab: flatbuffers::Table<'a>,
3611}
3612
3613impl<'a> flatbuffers::Follow<'a> for KeyValueU64Destination<'a> {
3614 type Inner = KeyValueU64Destination<'a>;
3615 #[inline]
3616 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3617 Self { _tab: flatbuffers::Table::new(buf, loc) }
3618 }
3619}
3620
3621impl<'a> KeyValueU64Destination<'a> {
3622 pub const VT_KEY: flatbuffers::VOffsetT = 4;
3623 pub const VT_VALUE: flatbuffers::VOffsetT = 6;
3624
3625 #[inline]
3626 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3627 KeyValueU64Destination { _tab: table }
3628 }
3629 #[allow(unused_mut)]
3630 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3631 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3632 args: &'args KeyValueU64DestinationArgs<'args>
3633 ) -> flatbuffers::WIPOffset<KeyValueU64Destination<'bldr>> {
3634 let mut builder = KeyValueU64DestinationBuilder::new(_fbb);
3635 builder.add_key(args.key);
3636 if let Some(x) = args.value { builder.add_value(x); }
3637 builder.finish()
3638 }
3639
3640
3641 #[inline]
3642 pub fn key(&self) -> u64 {
3643 unsafe { self._tab.get::<u64>(KeyValueU64Destination::VT_KEY, Some(0)).unwrap()}
3647 }
3648 #[inline]
3649 pub fn value(&self) -> Destination<'a> {
3650 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Destination>>(KeyValueU64Destination::VT_VALUE, None).unwrap()}
3654 }
3655}
3656
3657impl flatbuffers::Verifiable for KeyValueU64Destination<'_> {
3658 #[inline]
3659 fn run_verifier(
3660 v: &mut flatbuffers::Verifier, pos: usize
3661 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3662 use self::flatbuffers::Verifiable;
3663 v.visit_table(pos)?
3664 .visit_field::<u64>("key", Self::VT_KEY, false)?
3665 .visit_field::<flatbuffers::ForwardsUOffset<Destination>>("value", Self::VT_VALUE, true)?
3666 .finish();
3667 Ok(())
3668 }
3669}
3670pub struct KeyValueU64DestinationArgs<'a> {
3671 pub key: u64,
3672 pub value: Option<flatbuffers::WIPOffset<Destination<'a>>>,
3673}
3674impl<'a> Default for KeyValueU64DestinationArgs<'a> {
3675 #[inline]
3676 fn default() -> Self {
3677 KeyValueU64DestinationArgs {
3678 key: 0,
3679 value: None, }
3681 }
3682}
3683
3684pub struct KeyValueU64DestinationBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3685 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3686 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3687}
3688impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueU64DestinationBuilder<'a, 'b, A> {
3689 #[inline]
3690 pub fn add_key(&mut self, key: u64) {
3691 self.fbb_.push_slot::<u64>(KeyValueU64Destination::VT_KEY, key, 0);
3692 }
3693 #[inline]
3694 pub fn add_value(&mut self, value: flatbuffers::WIPOffset<Destination<'b >>) {
3695 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Destination>>(KeyValueU64Destination::VT_VALUE, value);
3696 }
3697 #[inline]
3698 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> KeyValueU64DestinationBuilder<'a, 'b, A> {
3699 let start = _fbb.start_table();
3700 KeyValueU64DestinationBuilder {
3701 fbb_: _fbb,
3702 start_: start,
3703 }
3704 }
3705 #[inline]
3706 pub fn finish(self) -> flatbuffers::WIPOffset<KeyValueU64Destination<'a>> {
3707 let o = self.fbb_.end_table(self.start_);
3708 self.fbb_.required(o, KeyValueU64Destination::VT_VALUE,"value");
3709 flatbuffers::WIPOffset::new(o.value())
3710 }
3711}
3712
3713impl core::fmt::Debug for KeyValueU64Destination<'_> {
3714 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3715 let mut ds = f.debug_struct("KeyValueU64Destination");
3716 ds.field("key", &self.key());
3717 ds.field("value", &self.value());
3718 ds.finish()
3719 }
3720}
3721pub enum PlanOffset {}
3722#[derive(Copy, Clone, PartialEq)]
3723
3724pub struct Plan<'a> {
3725 pub _tab: flatbuffers::Table<'a>,
3726}
3727
3728impl<'a> flatbuffers::Follow<'a> for Plan<'a> {
3729 type Inner = Plan<'a>;
3730 #[inline]
3731 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3732 Self { _tab: flatbuffers::Table::new(buf, loc) }
3733 }
3734}
3735
3736impl<'a> Plan<'a> {
3737 pub const VT_ID: flatbuffers::VOffsetT = 4;
3738 pub const VT_NAME: flatbuffers::VOffsetT = 6;
3739 pub const VT_TEMPLATE: flatbuffers::VOffsetT = 8;
3740 pub const VT_LINES: flatbuffers::VOffsetT = 10;
3741 pub const VT_STATIONS: flatbuffers::VOffsetT = 12;
3742 pub const VT_STATIONS_TO_IN_OUTS: flatbuffers::VOffsetT = 14;
3743 pub const VT_SOURCES: flatbuffers::VOffsetT = 16;
3744 pub const VT_DESTINATIONS: flatbuffers::VOffsetT = 18;
3745 pub const VT_STATUS: flatbuffers::VOffsetT = 20;
3746 pub const VT_TRANSFORMS: flatbuffers::VOffsetT = 22;
3747
3748 #[inline]
3749 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3750 Plan { _tab: table }
3751 }
3752 #[allow(unused_mut)]
3753 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3754 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3755 args: &'args PlanArgs<'args>
3756 ) -> flatbuffers::WIPOffset<Plan<'bldr>> {
3757 let mut builder = PlanBuilder::new(_fbb);
3758 builder.add_id(args.id);
3759 if let Some(x) = args.transforms { builder.add_transforms(x); }
3760 if let Some(x) = args.destinations { builder.add_destinations(x); }
3761 if let Some(x) = args.sources { builder.add_sources(x); }
3762 if let Some(x) = args.stations_to_in_outs { builder.add_stations_to_in_outs(x); }
3763 if let Some(x) = args.stations { builder.add_stations(x); }
3764 if let Some(x) = args.lines { builder.add_lines(x); }
3765 if let Some(x) = args.template { builder.add_template(x); }
3766 if let Some(x) = args.name { builder.add_name(x); }
3767 builder.add_status(args.status);
3768 builder.finish()
3769 }
3770
3771
3772 #[inline]
3773 pub fn id(&self) -> u64 {
3774 unsafe { self._tab.get::<u64>(Plan::VT_ID, Some(0)).unwrap()}
3778 }
3779 #[inline]
3780 pub fn name(&self) -> Option<&'a str> {
3781 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Plan::VT_NAME, None)}
3785 }
3786 #[inline]
3787 pub fn template(&self) -> Option<&'a str> {
3788 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Plan::VT_TEMPLATE, None)}
3792 }
3793 #[inline]
3794 pub fn lines(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64VecU64<'a>>>> {
3795 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64VecU64>>>>(Plan::VT_LINES, None)}
3799 }
3800 #[inline]
3801 pub fn stations(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Station<'a>>>> {
3802 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Station>>>>(Plan::VT_STATIONS, None)}
3806 }
3807 #[inline]
3808 pub fn stations_to_in_outs(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64VecU64<'a>>>> {
3809 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64VecU64>>>>(Plan::VT_STATIONS_TO_IN_OUTS, None)}
3813 }
3814 #[inline]
3815 pub fn sources(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Source<'a>>>> {
3816 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Source>>>>(Plan::VT_SOURCES, None)}
3820 }
3821 #[inline]
3822 pub fn destinations(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Destination<'a>>>> {
3823 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Destination>>>>(Plan::VT_DESTINATIONS, None)}
3827 }
3828 #[inline]
3829 pub fn status(&self) -> PlanStatus {
3830 unsafe { self._tab.get::<PlanStatus>(Plan::VT_STATUS, Some(PlanStatus::Running)).unwrap()}
3834 }
3835 #[inline]
3836 pub fn transforms(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueStringTransform<'a>>>> {
3837 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueStringTransform>>>>(Plan::VT_TRANSFORMS, None)}
3841 }
3842}
3843
3844impl flatbuffers::Verifiable for Plan<'_> {
3845 #[inline]
3846 fn run_verifier(
3847 v: &mut flatbuffers::Verifier, pos: usize
3848 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3849 use self::flatbuffers::Verifiable;
3850 v.visit_table(pos)?
3851 .visit_field::<u64>("id", Self::VT_ID, false)?
3852 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
3853 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("template", Self::VT_TEMPLATE, false)?
3854 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValueU64VecU64>>>>("lines", Self::VT_LINES, false)?
3855 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValueU64Station>>>>("stations", Self::VT_STATIONS, false)?
3856 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValueU64VecU64>>>>("stations_to_in_outs", Self::VT_STATIONS_TO_IN_OUTS, false)?
3857 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValueU64Source>>>>("sources", Self::VT_SOURCES, false)?
3858 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValueU64Destination>>>>("destinations", Self::VT_DESTINATIONS, false)?
3859 .visit_field::<PlanStatus>("status", Self::VT_STATUS, false)?
3860 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValueStringTransform>>>>("transforms", Self::VT_TRANSFORMS, false)?
3861 .finish();
3862 Ok(())
3863 }
3864}
3865pub struct PlanArgs<'a> {
3866 pub id: u64,
3867 pub name: Option<flatbuffers::WIPOffset<&'a str>>,
3868 pub template: Option<flatbuffers::WIPOffset<&'a str>>,
3869 pub lines: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64VecU64<'a>>>>>,
3870 pub stations: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Station<'a>>>>>,
3871 pub stations_to_in_outs: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64VecU64<'a>>>>>,
3872 pub sources: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Source<'a>>>>>,
3873 pub destinations: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Destination<'a>>>>>,
3874 pub status: PlanStatus,
3875 pub transforms: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueStringTransform<'a>>>>>,
3876}
3877impl<'a> Default for PlanArgs<'a> {
3878 #[inline]
3879 fn default() -> Self {
3880 PlanArgs {
3881 id: 0,
3882 name: None,
3883 template: None,
3884 lines: None,
3885 stations: None,
3886 stations_to_in_outs: None,
3887 sources: None,
3888 destinations: None,
3889 status: PlanStatus::Running,
3890 transforms: None,
3891 }
3892 }
3893}
3894
3895pub struct PlanBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3896 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3897 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3898}
3899impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PlanBuilder<'a, 'b, A> {
3900 #[inline]
3901 pub fn add_id(&mut self, id: u64) {
3902 self.fbb_.push_slot::<u64>(Plan::VT_ID, id, 0);
3903 }
3904 #[inline]
3905 pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
3906 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_NAME, name);
3907 }
3908 #[inline]
3909 pub fn add_template(&mut self, template: flatbuffers::WIPOffset<&'b str>) {
3910 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_TEMPLATE, template);
3911 }
3912 #[inline]
3913 pub fn add_lines(&mut self, lines: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValueU64VecU64<'b >>>>) {
3914 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_LINES, lines);
3915 }
3916 #[inline]
3917 pub fn add_stations(&mut self, stations: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValueU64Station<'b >>>>) {
3918 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_STATIONS, stations);
3919 }
3920 #[inline]
3921 pub fn add_stations_to_in_outs(&mut self, stations_to_in_outs: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValueU64VecU64<'b >>>>) {
3922 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_STATIONS_TO_IN_OUTS, stations_to_in_outs);
3923 }
3924 #[inline]
3925 pub fn add_sources(&mut self, sources: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValueU64Source<'b >>>>) {
3926 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_SOURCES, sources);
3927 }
3928 #[inline]
3929 pub fn add_destinations(&mut self, destinations: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValueU64Destination<'b >>>>) {
3930 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_DESTINATIONS, destinations);
3931 }
3932 #[inline]
3933 pub fn add_status(&mut self, status: PlanStatus) {
3934 self.fbb_.push_slot::<PlanStatus>(Plan::VT_STATUS, status, PlanStatus::Running);
3935 }
3936 #[inline]
3937 pub fn add_transforms(&mut self, transforms: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValueStringTransform<'b >>>>) {
3938 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_TRANSFORMS, transforms);
3939 }
3940 #[inline]
3941 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PlanBuilder<'a, 'b, A> {
3942 let start = _fbb.start_table();
3943 PlanBuilder {
3944 fbb_: _fbb,
3945 start_: start,
3946 }
3947 }
3948 #[inline]
3949 pub fn finish(self) -> flatbuffers::WIPOffset<Plan<'a>> {
3950 let o = self.fbb_.end_table(self.start_);
3951 flatbuffers::WIPOffset::new(o.value())
3952 }
3953}
3954
3955impl core::fmt::Debug for Plan<'_> {
3956 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3957 let mut ds = f.debug_struct("Plan");
3958 ds.field("id", &self.id());
3959 ds.field("name", &self.name());
3960 ds.field("template", &self.template());
3961 ds.field("lines", &self.lines());
3962 ds.field("stations", &self.stations());
3963 ds.field("stations_to_in_outs", &self.stations_to_in_outs());
3964 ds.field("sources", &self.sources());
3965 ds.field("destinations", &self.destinations());
3966 ds.field("status", &self.status());
3967 ds.field("transforms", &self.transforms());
3968 ds.finish()
3969 }
3970}
3971pub enum PlansOffset {}
3972#[derive(Copy, Clone, PartialEq)]
3973
3974pub struct Plans<'a> {
3975 pub _tab: flatbuffers::Table<'a>,
3976}
3977
3978impl<'a> flatbuffers::Follow<'a> for Plans<'a> {
3979 type Inner = Plans<'a>;
3980 #[inline]
3981 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3982 Self { _tab: flatbuffers::Table::new(buf, loc) }
3983 }
3984}
3985
3986impl<'a> Plans<'a> {
3987 pub const VT_PLANS: flatbuffers::VOffsetT = 4;
3988
3989 #[inline]
3990 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3991 Plans { _tab: table }
3992 }
3993 #[allow(unused_mut)]
3994 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3995 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3996 args: &'args PlansArgs<'args>
3997 ) -> flatbuffers::WIPOffset<Plans<'bldr>> {
3998 let mut builder = PlansBuilder::new(_fbb);
3999 if let Some(x) = args.plans { builder.add_plans(x); }
4000 builder.finish()
4001 }
4002
4003
4004 #[inline]
4005 pub fn plans(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Plan<'a>>> {
4006 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Plan>>>>(Plans::VT_PLANS, None).unwrap()}
4010 }
4011}
4012
4013impl flatbuffers::Verifiable for Plans<'_> {
4014 #[inline]
4015 fn run_verifier(
4016 v: &mut flatbuffers::Verifier, pos: usize
4017 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4018 use self::flatbuffers::Verifiable;
4019 v.visit_table(pos)?
4020 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Plan>>>>("plans", Self::VT_PLANS, true)?
4021 .finish();
4022 Ok(())
4023 }
4024}
4025pub struct PlansArgs<'a> {
4026 pub plans: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Plan<'a>>>>>,
4027}
4028impl<'a> Default for PlansArgs<'a> {
4029 #[inline]
4030 fn default() -> Self {
4031 PlansArgs {
4032 plans: None, }
4034 }
4035}
4036
4037pub struct PlansBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4038 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4039 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4040}
4041impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PlansBuilder<'a, 'b, A> {
4042 #[inline]
4043 pub fn add_plans(&mut self, plans: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Plan<'b >>>>) {
4044 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plans::VT_PLANS, plans);
4045 }
4046 #[inline]
4047 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PlansBuilder<'a, 'b, A> {
4048 let start = _fbb.start_table();
4049 PlansBuilder {
4050 fbb_: _fbb,
4051 start_: start,
4052 }
4053 }
4054 #[inline]
4055 pub fn finish(self) -> flatbuffers::WIPOffset<Plans<'a>> {
4056 let o = self.fbb_.end_table(self.start_);
4057 self.fbb_.required(o, Plans::VT_PLANS,"plans");
4058 flatbuffers::WIPOffset::new(o.value())
4059 }
4060}
4061
4062impl core::fmt::Debug for Plans<'_> {
4063 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4064 let mut ds = f.debug_struct("Plans");
4065 ds.field("plans", &self.plans());
4066 ds.finish()
4067 }
4068}
4069pub enum DisconnectOffset {}
4070#[derive(Copy, Clone, PartialEq)]
4071
4072pub struct Disconnect<'a> {
4073 pub _tab: flatbuffers::Table<'a>,
4074}
4075
4076impl<'a> flatbuffers::Follow<'a> for Disconnect<'a> {
4077 type Inner = Disconnect<'a>;
4078 #[inline]
4079 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4080 Self { _tab: flatbuffers::Table::new(buf, loc) }
4081 }
4082}
4083
4084impl<'a> Disconnect<'a> {
4085 pub const VT_ID: flatbuffers::VOffsetT = 4;
4086
4087 #[inline]
4088 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4089 Disconnect { _tab: table }
4090 }
4091 #[allow(unused_mut)]
4092 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4093 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4094 args: &'args DisconnectArgs
4095 ) -> flatbuffers::WIPOffset<Disconnect<'bldr>> {
4096 let mut builder = DisconnectBuilder::new(_fbb);
4097 builder.add_id(args.id);
4098 builder.finish()
4099 }
4100
4101
4102 #[inline]
4103 pub fn id(&self) -> u64 {
4104 unsafe { self._tab.get::<u64>(Disconnect::VT_ID, Some(0)).unwrap()}
4108 }
4109}
4110
4111impl flatbuffers::Verifiable for Disconnect<'_> {
4112 #[inline]
4113 fn run_verifier(
4114 v: &mut flatbuffers::Verifier, pos: usize
4115 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4116 use self::flatbuffers::Verifiable;
4117 v.visit_table(pos)?
4118 .visit_field::<u64>("id", Self::VT_ID, false)?
4119 .finish();
4120 Ok(())
4121 }
4122}
4123pub struct DisconnectArgs {
4124 pub id: u64,
4125}
4126impl<'a> Default for DisconnectArgs {
4127 #[inline]
4128 fn default() -> Self {
4129 DisconnectArgs {
4130 id: 0,
4131 }
4132 }
4133}
4134
4135pub struct DisconnectBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4136 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4137 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4138}
4139impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DisconnectBuilder<'a, 'b, A> {
4140 #[inline]
4141 pub fn add_id(&mut self, id: u64) {
4142 self.fbb_.push_slot::<u64>(Disconnect::VT_ID, id, 0);
4143 }
4144 #[inline]
4145 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> DisconnectBuilder<'a, 'b, A> {
4146 let start = _fbb.start_table();
4147 DisconnectBuilder {
4148 fbb_: _fbb,
4149 start_: start,
4150 }
4151 }
4152 #[inline]
4153 pub fn finish(self) -> flatbuffers::WIPOffset<Disconnect<'a>> {
4154 let o = self.fbb_.end_table(self.start_);
4155 flatbuffers::WIPOffset::new(o.value())
4156 }
4157}
4158
4159impl core::fmt::Debug for Disconnect<'_> {
4160 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4161 let mut ds = f.debug_struct("Disconnect");
4162 ds.field("id", &self.id());
4163 ds.finish()
4164 }
4165}
4166pub enum RegisterResponseOffset {}
4167#[derive(Copy, Clone, PartialEq)]
4168
4169pub struct RegisterResponse<'a> {
4170 pub _tab: flatbuffers::Table<'a>,
4171}
4172
4173impl<'a> flatbuffers::Follow<'a> for RegisterResponse<'a> {
4174 type Inner = RegisterResponse<'a>;
4175 #[inline]
4176 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4177 Self { _tab: flatbuffers::Table::new(buf, loc) }
4178 }
4179}
4180
4181impl<'a> RegisterResponse<'a> {
4182 pub const VT_ID: flatbuffers::VOffsetT = 4;
4183 pub const VT_PERMISSIONS: flatbuffers::VOffsetT = 6;
4184 pub const VT_CATALOG: flatbuffers::VOffsetT = 8;
4185
4186 #[inline]
4187 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4188 RegisterResponse { _tab: table }
4189 }
4190 #[allow(unused_mut)]
4191 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4192 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4193 args: &'args RegisterResponseArgs<'args>
4194 ) -> flatbuffers::WIPOffset<RegisterResponse<'bldr>> {
4195 let mut builder = RegisterResponseBuilder::new(_fbb);
4196 if let Some(x) = args.id { builder.add_id(x); }
4197 if let Some(x) = args.catalog { builder.add_catalog(x); }
4198 if let Some(x) = args.permissions { builder.add_permissions(x); }
4199 builder.finish()
4200 }
4201
4202
4203 #[inline]
4204 pub fn id(&self) -> Option<u64> {
4205 unsafe { self._tab.get::<u64>(RegisterResponse::VT_ID, None)}
4209 }
4210 #[inline]
4211 pub fn permissions(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
4212 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(RegisterResponse::VT_PERMISSIONS, None)}
4216 }
4217 #[inline]
4218 pub fn catalog(&self) -> Option<Catalog<'a>> {
4219 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Catalog>>(RegisterResponse::VT_CATALOG, None)}
4223 }
4224}
4225
4226impl flatbuffers::Verifiable for RegisterResponse<'_> {
4227 #[inline]
4228 fn run_verifier(
4229 v: &mut flatbuffers::Verifier, pos: usize
4230 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4231 use self::flatbuffers::Verifiable;
4232 v.visit_table(pos)?
4233 .visit_field::<u64>("id", Self::VT_ID, false)?
4234 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("permissions", Self::VT_PERMISSIONS, false)?
4235 .visit_field::<flatbuffers::ForwardsUOffset<Catalog>>("catalog", Self::VT_CATALOG, false)?
4236 .finish();
4237 Ok(())
4238 }
4239}
4240pub struct RegisterResponseArgs<'a> {
4241 pub id: Option<u64>,
4242 pub permissions: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
4243 pub catalog: Option<flatbuffers::WIPOffset<Catalog<'a>>>,
4244}
4245impl<'a> Default for RegisterResponseArgs<'a> {
4246 #[inline]
4247 fn default() -> Self {
4248 RegisterResponseArgs {
4249 id: None,
4250 permissions: None,
4251 catalog: None,
4252 }
4253 }
4254}
4255
4256pub struct RegisterResponseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4257 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4258 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4259}
4260impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RegisterResponseBuilder<'a, 'b, A> {
4261 #[inline]
4262 pub fn add_id(&mut self, id: u64) {
4263 self.fbb_.push_slot_always::<u64>(RegisterResponse::VT_ID, id);
4264 }
4265 #[inline]
4266 pub fn add_permissions(&mut self, permissions: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b str>>>) {
4267 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RegisterResponse::VT_PERMISSIONS, permissions);
4268 }
4269 #[inline]
4270 pub fn add_catalog(&mut self, catalog: flatbuffers::WIPOffset<Catalog<'b >>) {
4271 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Catalog>>(RegisterResponse::VT_CATALOG, catalog);
4272 }
4273 #[inline]
4274 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RegisterResponseBuilder<'a, 'b, A> {
4275 let start = _fbb.start_table();
4276 RegisterResponseBuilder {
4277 fbb_: _fbb,
4278 start_: start,
4279 }
4280 }
4281 #[inline]
4282 pub fn finish(self) -> flatbuffers::WIPOffset<RegisterResponse<'a>> {
4283 let o = self.fbb_.end_table(self.start_);
4284 flatbuffers::WIPOffset::new(o.value())
4285 }
4286}
4287
4288impl core::fmt::Debug for RegisterResponse<'_> {
4289 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4290 let mut ds = f.debug_struct("RegisterResponse");
4291 ds.field("id", &self.id());
4292 ds.field("permissions", &self.permissions());
4293 ds.field("catalog", &self.catalog());
4294 ds.finish()
4295 }
4296}
4297pub enum RegisterRequestOffset {}
4298#[derive(Copy, Clone, PartialEq)]
4299
4300pub struct RegisterRequest<'a> {
4301 pub _tab: flatbuffers::Table<'a>,
4302}
4303
4304impl<'a> flatbuffers::Follow<'a> for RegisterRequest<'a> {
4305 type Inner = RegisterRequest<'a>;
4306 #[inline]
4307 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4308 Self { _tab: flatbuffers::Table::new(buf, loc) }
4309 }
4310}
4311
4312impl<'a> RegisterRequest<'a> {
4313 pub const VT_ID: flatbuffers::VOffsetT = 4;
4314 pub const VT_CATALOG: flatbuffers::VOffsetT = 6;
4315
4316 #[inline]
4317 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4318 RegisterRequest { _tab: table }
4319 }
4320 #[allow(unused_mut)]
4321 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4322 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4323 args: &'args RegisterRequestArgs<'args>
4324 ) -> flatbuffers::WIPOffset<RegisterRequest<'bldr>> {
4325 let mut builder = RegisterRequestBuilder::new(_fbb);
4326 if let Some(x) = args.id { builder.add_id(x); }
4327 if let Some(x) = args.catalog { builder.add_catalog(x); }
4328 builder.finish()
4329 }
4330
4331
4332 #[inline]
4333 pub fn id(&self) -> Option<u64> {
4334 unsafe { self._tab.get::<u64>(RegisterRequest::VT_ID, None)}
4338 }
4339 #[inline]
4340 pub fn catalog(&self) -> Option<Catalog<'a>> {
4341 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Catalog>>(RegisterRequest::VT_CATALOG, None)}
4345 }
4346}
4347
4348impl flatbuffers::Verifiable for RegisterRequest<'_> {
4349 #[inline]
4350 fn run_verifier(
4351 v: &mut flatbuffers::Verifier, pos: usize
4352 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4353 use self::flatbuffers::Verifiable;
4354 v.visit_table(pos)?
4355 .visit_field::<u64>("id", Self::VT_ID, false)?
4356 .visit_field::<flatbuffers::ForwardsUOffset<Catalog>>("catalog", Self::VT_CATALOG, false)?
4357 .finish();
4358 Ok(())
4359 }
4360}
4361pub struct RegisterRequestArgs<'a> {
4362 pub id: Option<u64>,
4363 pub catalog: Option<flatbuffers::WIPOffset<Catalog<'a>>>,
4364}
4365impl<'a> Default for RegisterRequestArgs<'a> {
4366 #[inline]
4367 fn default() -> Self {
4368 RegisterRequestArgs {
4369 id: None,
4370 catalog: None,
4371 }
4372 }
4373}
4374
4375pub struct RegisterRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4376 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4377 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4378}
4379impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RegisterRequestBuilder<'a, 'b, A> {
4380 #[inline]
4381 pub fn add_id(&mut self, id: u64) {
4382 self.fbb_.push_slot_always::<u64>(RegisterRequest::VT_ID, id);
4383 }
4384 #[inline]
4385 pub fn add_catalog(&mut self, catalog: flatbuffers::WIPOffset<Catalog<'b >>) {
4386 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Catalog>>(RegisterRequest::VT_CATALOG, catalog);
4387 }
4388 #[inline]
4389 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RegisterRequestBuilder<'a, 'b, A> {
4390 let start = _fbb.start_table();
4391 RegisterRequestBuilder {
4392 fbb_: _fbb,
4393 start_: start,
4394 }
4395 }
4396 #[inline]
4397 pub fn finish(self) -> flatbuffers::WIPOffset<RegisterRequest<'a>> {
4398 let o = self.fbb_.end_table(self.start_);
4399 flatbuffers::WIPOffset::new(o.value())
4400 }
4401}
4402
4403impl core::fmt::Debug for RegisterRequest<'_> {
4404 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4405 let mut ds = f.debug_struct("RegisterRequest");
4406 ds.field("id", &self.id());
4407 ds.field("catalog", &self.catalog());
4408 ds.finish()
4409 }
4410}
4411pub enum CreatePlanRequestOffset {}
4412#[derive(Copy, Clone, PartialEq)]
4413
4414pub struct CreatePlanRequest<'a> {
4415 pub _tab: flatbuffers::Table<'a>,
4416}
4417
4418impl<'a> flatbuffers::Follow<'a> for CreatePlanRequest<'a> {
4419 type Inner = CreatePlanRequest<'a>;
4420 #[inline]
4421 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4422 Self { _tab: flatbuffers::Table::new(buf, loc) }
4423 }
4424}
4425
4426impl<'a> CreatePlanRequest<'a> {
4427 pub const VT_NAME: flatbuffers::VOffsetT = 4;
4428 pub const VT_PLAN: flatbuffers::VOffsetT = 6;
4429
4430 #[inline]
4431 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4432 CreatePlanRequest { _tab: table }
4433 }
4434 #[allow(unused_mut)]
4435 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4436 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4437 args: &'args CreatePlanRequestArgs<'args>
4438 ) -> flatbuffers::WIPOffset<CreatePlanRequest<'bldr>> {
4439 let mut builder = CreatePlanRequestBuilder::new(_fbb);
4440 if let Some(x) = args.plan { builder.add_plan(x); }
4441 if let Some(x) = args.name { builder.add_name(x); }
4442 builder.finish()
4443 }
4444
4445
4446 #[inline]
4447 pub fn name(&self) -> Option<&'a str> {
4448 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(CreatePlanRequest::VT_NAME, None)}
4452 }
4453 #[inline]
4454 pub fn plan(&self) -> Option<&'a str> {
4455 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(CreatePlanRequest::VT_PLAN, None)}
4459 }
4460}
4461
4462impl flatbuffers::Verifiable for CreatePlanRequest<'_> {
4463 #[inline]
4464 fn run_verifier(
4465 v: &mut flatbuffers::Verifier, pos: usize
4466 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4467 use self::flatbuffers::Verifiable;
4468 v.visit_table(pos)?
4469 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
4470 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("plan", Self::VT_PLAN, false)?
4471 .finish();
4472 Ok(())
4473 }
4474}
4475pub struct CreatePlanRequestArgs<'a> {
4476 pub name: Option<flatbuffers::WIPOffset<&'a str>>,
4477 pub plan: Option<flatbuffers::WIPOffset<&'a str>>,
4478}
4479impl<'a> Default for CreatePlanRequestArgs<'a> {
4480 #[inline]
4481 fn default() -> Self {
4482 CreatePlanRequestArgs {
4483 name: None,
4484 plan: None,
4485 }
4486 }
4487}
4488
4489pub struct CreatePlanRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4490 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4491 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4492}
4493impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> CreatePlanRequestBuilder<'a, 'b, A> {
4494 #[inline]
4495 pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
4496 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(CreatePlanRequest::VT_NAME, name);
4497 }
4498 #[inline]
4499 pub fn add_plan(&mut self, plan: flatbuffers::WIPOffset<&'b str>) {
4500 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(CreatePlanRequest::VT_PLAN, plan);
4501 }
4502 #[inline]
4503 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> CreatePlanRequestBuilder<'a, 'b, A> {
4504 let start = _fbb.start_table();
4505 CreatePlanRequestBuilder {
4506 fbb_: _fbb,
4507 start_: start,
4508 }
4509 }
4510 #[inline]
4511 pub fn finish(self) -> flatbuffers::WIPOffset<CreatePlanRequest<'a>> {
4512 let o = self.fbb_.end_table(self.start_);
4513 flatbuffers::WIPOffset::new(o.value())
4514 }
4515}
4516
4517impl core::fmt::Debug for CreatePlanRequest<'_> {
4518 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4519 let mut ds = f.debug_struct("CreatePlanRequest");
4520 ds.field("name", &self.name());
4521 ds.field("plan", &self.plan());
4522 ds.finish()
4523 }
4524}
4525pub enum CreatePlanResponseOffset {}
4526#[derive(Copy, Clone, PartialEq)]
4527
4528pub struct CreatePlanResponse<'a> {
4529 pub _tab: flatbuffers::Table<'a>,
4530}
4531
4532impl<'a> flatbuffers::Follow<'a> for CreatePlanResponse<'a> {
4533 type Inner = CreatePlanResponse<'a>;
4534 #[inline]
4535 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4536 Self { _tab: flatbuffers::Table::new(buf, loc) }
4537 }
4538}
4539
4540impl<'a> CreatePlanResponse<'a> {
4541 pub const VT_ID: flatbuffers::VOffsetT = 4;
4542
4543 #[inline]
4544 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4545 CreatePlanResponse { _tab: table }
4546 }
4547 #[allow(unused_mut)]
4548 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4549 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4550 args: &'args CreatePlanResponseArgs
4551 ) -> flatbuffers::WIPOffset<CreatePlanResponse<'bldr>> {
4552 let mut builder = CreatePlanResponseBuilder::new(_fbb);
4553 builder.add_id(args.id);
4554 builder.finish()
4555 }
4556
4557
4558 #[inline]
4559 pub fn id(&self) -> u64 {
4560 unsafe { self._tab.get::<u64>(CreatePlanResponse::VT_ID, Some(0)).unwrap()}
4564 }
4565}
4566
4567impl flatbuffers::Verifiable for CreatePlanResponse<'_> {
4568 #[inline]
4569 fn run_verifier(
4570 v: &mut flatbuffers::Verifier, pos: usize
4571 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4572 use self::flatbuffers::Verifiable;
4573 v.visit_table(pos)?
4574 .visit_field::<u64>("id", Self::VT_ID, false)?
4575 .finish();
4576 Ok(())
4577 }
4578}
4579pub struct CreatePlanResponseArgs {
4580 pub id: u64,
4581}
4582impl<'a> Default for CreatePlanResponseArgs {
4583 #[inline]
4584 fn default() -> Self {
4585 CreatePlanResponseArgs {
4586 id: 0,
4587 }
4588 }
4589}
4590
4591pub struct CreatePlanResponseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4592 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4593 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4594}
4595impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> CreatePlanResponseBuilder<'a, 'b, A> {
4596 #[inline]
4597 pub fn add_id(&mut self, id: u64) {
4598 self.fbb_.push_slot::<u64>(CreatePlanResponse::VT_ID, id, 0);
4599 }
4600 #[inline]
4601 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> CreatePlanResponseBuilder<'a, 'b, A> {
4602 let start = _fbb.start_table();
4603 CreatePlanResponseBuilder {
4604 fbb_: _fbb,
4605 start_: start,
4606 }
4607 }
4608 #[inline]
4609 pub fn finish(self) -> flatbuffers::WIPOffset<CreatePlanResponse<'a>> {
4610 let o = self.fbb_.end_table(self.start_);
4611 flatbuffers::WIPOffset::new(o.value())
4612 }
4613}
4614
4615impl core::fmt::Debug for CreatePlanResponse<'_> {
4616 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4617 let mut ds = f.debug_struct("CreatePlanResponse");
4618 ds.field("id", &self.id());
4619 ds.finish()
4620 }
4621}
4622pub enum DeletePlanRequestOffset {}
4623#[derive(Copy, Clone, PartialEq)]
4624
4625pub struct DeletePlanRequest<'a> {
4626 pub _tab: flatbuffers::Table<'a>,
4627}
4628
4629impl<'a> flatbuffers::Follow<'a> for DeletePlanRequest<'a> {
4630 type Inner = DeletePlanRequest<'a>;
4631 #[inline]
4632 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4633 Self { _tab: flatbuffers::Table::new(buf, loc) }
4634 }
4635}
4636
4637impl<'a> DeletePlanRequest<'a> {
4638 pub const VT_ID: flatbuffers::VOffsetT = 4;
4639
4640 #[inline]
4641 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4642 DeletePlanRequest { _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 DeletePlanRequestArgs
4648 ) -> flatbuffers::WIPOffset<DeletePlanRequest<'bldr>> {
4649 let mut builder = DeletePlanRequestBuilder::new(_fbb);
4650 builder.add_id(args.id);
4651 builder.finish()
4652 }
4653
4654
4655 #[inline]
4656 pub fn id(&self) -> u64 {
4657 unsafe { self._tab.get::<u64>(DeletePlanRequest::VT_ID, Some(0)).unwrap()}
4661 }
4662}
4663
4664impl flatbuffers::Verifiable for DeletePlanRequest<'_> {
4665 #[inline]
4666 fn run_verifier(
4667 v: &mut flatbuffers::Verifier, pos: usize
4668 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4669 use self::flatbuffers::Verifiable;
4670 v.visit_table(pos)?
4671 .visit_field::<u64>("id", Self::VT_ID, false)?
4672 .finish();
4673 Ok(())
4674 }
4675}
4676pub struct DeletePlanRequestArgs {
4677 pub id: u64,
4678}
4679impl<'a> Default for DeletePlanRequestArgs {
4680 #[inline]
4681 fn default() -> Self {
4682 DeletePlanRequestArgs {
4683 id: 0,
4684 }
4685 }
4686}
4687
4688pub struct DeletePlanRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4689 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4690 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4691}
4692impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DeletePlanRequestBuilder<'a, 'b, A> {
4693 #[inline]
4694 pub fn add_id(&mut self, id: u64) {
4695 self.fbb_.push_slot::<u64>(DeletePlanRequest::VT_ID, id, 0);
4696 }
4697 #[inline]
4698 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> DeletePlanRequestBuilder<'a, 'b, A> {
4699 let start = _fbb.start_table();
4700 DeletePlanRequestBuilder {
4701 fbb_: _fbb,
4702 start_: start,
4703 }
4704 }
4705 #[inline]
4706 pub fn finish(self) -> flatbuffers::WIPOffset<DeletePlanRequest<'a>> {
4707 let o = self.fbb_.end_table(self.start_);
4708 flatbuffers::WIPOffset::new(o.value())
4709 }
4710}
4711
4712impl core::fmt::Debug for DeletePlanRequest<'_> {
4713 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4714 let mut ds = f.debug_struct("DeletePlanRequest");
4715 ds.field("id", &self.id());
4716 ds.finish()
4717 }
4718}
4719pub enum DeletePlanResponseOffset {}
4720#[derive(Copy, Clone, PartialEq)]
4721
4722pub struct DeletePlanResponse<'a> {
4723 pub _tab: flatbuffers::Table<'a>,
4724}
4725
4726impl<'a> flatbuffers::Follow<'a> for DeletePlanResponse<'a> {
4727 type Inner = DeletePlanResponse<'a>;
4728 #[inline]
4729 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4730 Self { _tab: flatbuffers::Table::new(buf, loc) }
4731 }
4732}
4733
4734impl<'a> DeletePlanResponse<'a> {
4735
4736 #[inline]
4737 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4738 DeletePlanResponse { _tab: table }
4739 }
4740 #[allow(unused_mut)]
4741 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4742 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4743 _args: &'args DeletePlanResponseArgs
4744 ) -> flatbuffers::WIPOffset<DeletePlanResponse<'bldr>> {
4745 let mut builder = DeletePlanResponseBuilder::new(_fbb);
4746 builder.finish()
4747 }
4748
4749}
4750
4751impl flatbuffers::Verifiable for DeletePlanResponse<'_> {
4752 #[inline]
4753 fn run_verifier(
4754 v: &mut flatbuffers::Verifier, pos: usize
4755 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4756 use self::flatbuffers::Verifiable;
4757 v.visit_table(pos)?
4758 .finish();
4759 Ok(())
4760 }
4761}
4762pub struct DeletePlanResponseArgs {
4763}
4764impl<'a> Default for DeletePlanResponseArgs {
4765 #[inline]
4766 fn default() -> Self {
4767 DeletePlanResponseArgs {
4768 }
4769 }
4770}
4771
4772pub struct DeletePlanResponseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4773 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4774 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4775}
4776impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DeletePlanResponseBuilder<'a, 'b, A> {
4777 #[inline]
4778 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> DeletePlanResponseBuilder<'a, 'b, A> {
4779 let start = _fbb.start_table();
4780 DeletePlanResponseBuilder {
4781 fbb_: _fbb,
4782 start_: start,
4783 }
4784 }
4785 #[inline]
4786 pub fn finish(self) -> flatbuffers::WIPOffset<DeletePlanResponse<'a>> {
4787 let o = self.fbb_.end_table(self.start_);
4788 flatbuffers::WIPOffset::new(o.value())
4789 }
4790}
4791
4792impl core::fmt::Debug for DeletePlanResponse<'_> {
4793 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4794 let mut ds = f.debug_struct("DeletePlanResponse");
4795 ds.finish()
4796 }
4797}
4798pub enum ByNameOffset {}
4799#[derive(Copy, Clone, PartialEq)]
4800
4801pub struct ByName<'a> {
4802 pub _tab: flatbuffers::Table<'a>,
4803}
4804
4805impl<'a> flatbuffers::Follow<'a> for ByName<'a> {
4806 type Inner = ByName<'a>;
4807 #[inline]
4808 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4809 Self { _tab: flatbuffers::Table::new(buf, loc) }
4810 }
4811}
4812
4813impl<'a> ByName<'a> {
4814 pub const VT_NAME: flatbuffers::VOffsetT = 4;
4815
4816 #[inline]
4817 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4818 ByName { _tab: table }
4819 }
4820 #[allow(unused_mut)]
4821 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4822 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4823 args: &'args ByNameArgs<'args>
4824 ) -> flatbuffers::WIPOffset<ByName<'bldr>> {
4825 let mut builder = ByNameBuilder::new(_fbb);
4826 if let Some(x) = args.name { builder.add_name(x); }
4827 builder.finish()
4828 }
4829
4830
4831 #[inline]
4832 pub fn name(&self) -> Option<&'a str> {
4833 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ByName::VT_NAME, None)}
4837 }
4838}
4839
4840impl flatbuffers::Verifiable for ByName<'_> {
4841 #[inline]
4842 fn run_verifier(
4843 v: &mut flatbuffers::Verifier, pos: usize
4844 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4845 use self::flatbuffers::Verifiable;
4846 v.visit_table(pos)?
4847 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
4848 .finish();
4849 Ok(())
4850 }
4851}
4852pub struct ByNameArgs<'a> {
4853 pub name: Option<flatbuffers::WIPOffset<&'a str>>,
4854}
4855impl<'a> Default for ByNameArgs<'a> {
4856 #[inline]
4857 fn default() -> Self {
4858 ByNameArgs {
4859 name: None,
4860 }
4861 }
4862}
4863
4864pub struct ByNameBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4865 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4866 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4867}
4868impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ByNameBuilder<'a, 'b, A> {
4869 #[inline]
4870 pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
4871 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ByName::VT_NAME, name);
4872 }
4873 #[inline]
4874 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ByNameBuilder<'a, 'b, A> {
4875 let start = _fbb.start_table();
4876 ByNameBuilder {
4877 fbb_: _fbb,
4878 start_: start,
4879 }
4880 }
4881 #[inline]
4882 pub fn finish(self) -> flatbuffers::WIPOffset<ByName<'a>> {
4883 let o = self.fbb_.end_table(self.start_);
4884 flatbuffers::WIPOffset::new(o.value())
4885 }
4886}
4887
4888impl core::fmt::Debug for ByName<'_> {
4889 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4890 let mut ds = f.debug_struct("ByName");
4891 ds.field("name", &self.name());
4892 ds.finish()
4893 }
4894}
4895pub enum FilterOffset {}
4896#[derive(Copy, Clone, PartialEq)]
4897
4898pub struct Filter<'a> {
4899 pub _tab: flatbuffers::Table<'a>,
4900}
4901
4902impl<'a> flatbuffers::Follow<'a> for Filter<'a> {
4903 type Inner = Filter<'a>;
4904 #[inline]
4905 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4906 Self { _tab: flatbuffers::Table::new(buf, loc) }
4907 }
4908}
4909
4910impl<'a> Filter<'a> {
4911 pub const VT_FILTER_TYPE_TYPE: flatbuffers::VOffsetT = 4;
4912 pub const VT_FILTER_TYPE: flatbuffers::VOffsetT = 6;
4913
4914 #[inline]
4915 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4916 Filter { _tab: table }
4917 }
4918 #[allow(unused_mut)]
4919 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4920 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4921 args: &'args FilterArgs
4922 ) -> flatbuffers::WIPOffset<Filter<'bldr>> {
4923 let mut builder = FilterBuilder::new(_fbb);
4924 if let Some(x) = args.filter_type { builder.add_filter_type(x); }
4925 builder.add_filter_type_type(args.filter_type_type);
4926 builder.finish()
4927 }
4928
4929
4930 #[inline]
4931 pub fn filter_type_type(&self) -> FilterType {
4932 unsafe { self._tab.get::<FilterType>(Filter::VT_FILTER_TYPE_TYPE, Some(FilterType::NONE)).unwrap()}
4936 }
4937 #[inline]
4938 pub fn filter_type(&self) -> Option<flatbuffers::Table<'a>> {
4939 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(Filter::VT_FILTER_TYPE, None)}
4943 }
4944 #[inline]
4945 #[allow(non_snake_case)]
4946 pub fn filter_type_as_by_name(&self) -> Option<ByName<'a>> {
4947 if self.filter_type_type() == FilterType::ByName {
4948 self.filter_type().map(|t| {
4949 unsafe { ByName::init_from_table(t) }
4953 })
4954 } else {
4955 None
4956 }
4957 }
4958
4959}
4960
4961impl flatbuffers::Verifiable for Filter<'_> {
4962 #[inline]
4963 fn run_verifier(
4964 v: &mut flatbuffers::Verifier, pos: usize
4965 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4966 use self::flatbuffers::Verifiable;
4967 v.visit_table(pos)?
4968 .visit_union::<FilterType, _>("filter_type_type", Self::VT_FILTER_TYPE_TYPE, "filter_type", Self::VT_FILTER_TYPE, false, |key, v, pos| {
4969 match key {
4970 FilterType::ByName => v.verify_union_variant::<flatbuffers::ForwardsUOffset<ByName>>("FilterType::ByName", pos),
4971 _ => Ok(()),
4972 }
4973 })?
4974 .finish();
4975 Ok(())
4976 }
4977}
4978pub struct FilterArgs {
4979 pub filter_type_type: FilterType,
4980 pub filter_type: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
4981}
4982impl<'a> Default for FilterArgs {
4983 #[inline]
4984 fn default() -> Self {
4985 FilterArgs {
4986 filter_type_type: FilterType::NONE,
4987 filter_type: None,
4988 }
4989 }
4990}
4991
4992pub struct FilterBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4993 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4994 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4995}
4996impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FilterBuilder<'a, 'b, A> {
4997 #[inline]
4998 pub fn add_filter_type_type(&mut self, filter_type_type: FilterType) {
4999 self.fbb_.push_slot::<FilterType>(Filter::VT_FILTER_TYPE_TYPE, filter_type_type, FilterType::NONE);
5000 }
5001 #[inline]
5002 pub fn add_filter_type(&mut self, filter_type: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
5003 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Filter::VT_FILTER_TYPE, filter_type);
5004 }
5005 #[inline]
5006 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> FilterBuilder<'a, 'b, A> {
5007 let start = _fbb.start_table();
5008 FilterBuilder {
5009 fbb_: _fbb,
5010 start_: start,
5011 }
5012 }
5013 #[inline]
5014 pub fn finish(self) -> flatbuffers::WIPOffset<Filter<'a>> {
5015 let o = self.fbb_.end_table(self.start_);
5016 flatbuffers::WIPOffset::new(o.value())
5017 }
5018}
5019
5020impl core::fmt::Debug for Filter<'_> {
5021 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5022 let mut ds = f.debug_struct("Filter");
5023 ds.field("filter_type_type", &self.filter_type_type());
5024 match self.filter_type_type() {
5025 FilterType::ByName => {
5026 if let Some(x) = self.filter_type_as_by_name() {
5027 ds.field("filter_type", &x)
5028 } else {
5029 ds.field("filter_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
5030 }
5031 },
5032 _ => {
5033 let x: Option<()> = None;
5034 ds.field("filter_type", &x)
5035 },
5036 };
5037 ds.finish()
5038 }
5039}
5040pub enum GetPlansRequestOffset {}
5041#[derive(Copy, Clone, PartialEq)]
5042
5043pub struct GetPlansRequest<'a> {
5044 pub _tab: flatbuffers::Table<'a>,
5045}
5046
5047impl<'a> flatbuffers::Follow<'a> for GetPlansRequest<'a> {
5048 type Inner = GetPlansRequest<'a>;
5049 #[inline]
5050 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5051 Self { _tab: flatbuffers::Table::new(buf, loc) }
5052 }
5053}
5054
5055impl<'a> GetPlansRequest<'a> {
5056 pub const VT_NAME: flatbuffers::VOffsetT = 4;
5057
5058 #[inline]
5059 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5060 GetPlansRequest { _tab: table }
5061 }
5062 #[allow(unused_mut)]
5063 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5064 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5065 args: &'args GetPlansRequestArgs<'args>
5066 ) -> flatbuffers::WIPOffset<GetPlansRequest<'bldr>> {
5067 let mut builder = GetPlansRequestBuilder::new(_fbb);
5068 if let Some(x) = args.name { builder.add_name(x); }
5069 builder.finish()
5070 }
5071
5072
5073 #[inline]
5074 pub fn name(&self) -> Option<Filter<'a>> {
5075 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Filter>>(GetPlansRequest::VT_NAME, None)}
5079 }
5080}
5081
5082impl flatbuffers::Verifiable for GetPlansRequest<'_> {
5083 #[inline]
5084 fn run_verifier(
5085 v: &mut flatbuffers::Verifier, pos: usize
5086 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5087 use self::flatbuffers::Verifiable;
5088 v.visit_table(pos)?
5089 .visit_field::<flatbuffers::ForwardsUOffset<Filter>>("name", Self::VT_NAME, false)?
5090 .finish();
5091 Ok(())
5092 }
5093}
5094pub struct GetPlansRequestArgs<'a> {
5095 pub name: Option<flatbuffers::WIPOffset<Filter<'a>>>,
5096}
5097impl<'a> Default for GetPlansRequestArgs<'a> {
5098 #[inline]
5099 fn default() -> Self {
5100 GetPlansRequestArgs {
5101 name: None,
5102 }
5103 }
5104}
5105
5106pub struct GetPlansRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5107 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5108 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5109}
5110impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetPlansRequestBuilder<'a, 'b, A> {
5111 #[inline]
5112 pub fn add_name(&mut self, name: flatbuffers::WIPOffset<Filter<'b >>) {
5113 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Filter>>(GetPlansRequest::VT_NAME, name);
5114 }
5115 #[inline]
5116 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetPlansRequestBuilder<'a, 'b, A> {
5117 let start = _fbb.start_table();
5118 GetPlansRequestBuilder {
5119 fbb_: _fbb,
5120 start_: start,
5121 }
5122 }
5123 #[inline]
5124 pub fn finish(self) -> flatbuffers::WIPOffset<GetPlansRequest<'a>> {
5125 let o = self.fbb_.end_table(self.start_);
5126 flatbuffers::WIPOffset::new(o.value())
5127 }
5128}
5129
5130impl core::fmt::Debug for GetPlansRequest<'_> {
5131 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5132 let mut ds = f.debug_struct("GetPlansRequest");
5133 ds.field("name", &self.name());
5134 ds.finish()
5135 }
5136}
5137pub enum GetPlanRequestOffset {}
5138#[derive(Copy, Clone, PartialEq)]
5139
5140pub struct GetPlanRequest<'a> {
5141 pub _tab: flatbuffers::Table<'a>,
5142}
5143
5144impl<'a> flatbuffers::Follow<'a> for GetPlanRequest<'a> {
5145 type Inner = GetPlanRequest<'a>;
5146 #[inline]
5147 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5148 Self { _tab: flatbuffers::Table::new(buf, loc) }
5149 }
5150}
5151
5152impl<'a> GetPlanRequest<'a> {
5153 pub const VT_ID: flatbuffers::VOffsetT = 4;
5154
5155 #[inline]
5156 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5157 GetPlanRequest { _tab: table }
5158 }
5159 #[allow(unused_mut)]
5160 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5161 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5162 args: &'args GetPlanRequestArgs
5163 ) -> flatbuffers::WIPOffset<GetPlanRequest<'bldr>> {
5164 let mut builder = GetPlanRequestBuilder::new(_fbb);
5165 builder.add_id(args.id);
5166 builder.finish()
5167 }
5168
5169
5170 #[inline]
5171 pub fn id(&self) -> u64 {
5172 unsafe { self._tab.get::<u64>(GetPlanRequest::VT_ID, Some(0)).unwrap()}
5176 }
5177}
5178
5179impl flatbuffers::Verifiable for GetPlanRequest<'_> {
5180 #[inline]
5181 fn run_verifier(
5182 v: &mut flatbuffers::Verifier, pos: usize
5183 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5184 use self::flatbuffers::Verifiable;
5185 v.visit_table(pos)?
5186 .visit_field::<u64>("id", Self::VT_ID, false)?
5187 .finish();
5188 Ok(())
5189 }
5190}
5191pub struct GetPlanRequestArgs {
5192 pub id: u64,
5193}
5194impl<'a> Default for GetPlanRequestArgs {
5195 #[inline]
5196 fn default() -> Self {
5197 GetPlanRequestArgs {
5198 id: 0,
5199 }
5200 }
5201}
5202
5203pub struct GetPlanRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5204 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5205 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5206}
5207impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetPlanRequestBuilder<'a, 'b, A> {
5208 #[inline]
5209 pub fn add_id(&mut self, id: u64) {
5210 self.fbb_.push_slot::<u64>(GetPlanRequest::VT_ID, id, 0);
5211 }
5212 #[inline]
5213 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetPlanRequestBuilder<'a, 'b, A> {
5214 let start = _fbb.start_table();
5215 GetPlanRequestBuilder {
5216 fbb_: _fbb,
5217 start_: start,
5218 }
5219 }
5220 #[inline]
5221 pub fn finish(self) -> flatbuffers::WIPOffset<GetPlanRequest<'a>> {
5222 let o = self.fbb_.end_table(self.start_);
5223 flatbuffers::WIPOffset::new(o.value())
5224 }
5225}
5226
5227impl core::fmt::Debug for GetPlanRequest<'_> {
5228 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5229 let mut ds = f.debug_struct("GetPlanRequest");
5230 ds.field("id", &self.id());
5231 ds.finish()
5232 }
5233}
5234pub enum ErrorStatusOffset {}
5235#[derive(Copy, Clone, PartialEq)]
5236
5237pub struct ErrorStatus<'a> {
5238 pub _tab: flatbuffers::Table<'a>,
5239}
5240
5241impl<'a> flatbuffers::Follow<'a> for ErrorStatus<'a> {
5242 type Inner = ErrorStatus<'a>;
5243 #[inline]
5244 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5245 Self { _tab: flatbuffers::Table::new(buf, loc) }
5246 }
5247}
5248
5249impl<'a> ErrorStatus<'a> {
5250 pub const VT_CODE: flatbuffers::VOffsetT = 4;
5251 pub const VT_MSG: flatbuffers::VOffsetT = 6;
5252
5253 #[inline]
5254 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5255 ErrorStatus { _tab: table }
5256 }
5257 #[allow(unused_mut)]
5258 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5259 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5260 args: &'args ErrorStatusArgs<'args>
5261 ) -> flatbuffers::WIPOffset<ErrorStatus<'bldr>> {
5262 let mut builder = ErrorStatusBuilder::new(_fbb);
5263 if let Some(x) = args.msg { builder.add_msg(x); }
5264 builder.add_code(args.code);
5265 builder.finish()
5266 }
5267
5268
5269 #[inline]
5270 pub fn code(&self) -> u32 {
5271 unsafe { self._tab.get::<u32>(ErrorStatus::VT_CODE, Some(0)).unwrap()}
5275 }
5276 #[inline]
5277 pub fn msg(&self) -> &'a str {
5278 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ErrorStatus::VT_MSG, None).unwrap()}
5282 }
5283}
5284
5285impl flatbuffers::Verifiable for ErrorStatus<'_> {
5286 #[inline]
5287 fn run_verifier(
5288 v: &mut flatbuffers::Verifier, pos: usize
5289 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5290 use self::flatbuffers::Verifiable;
5291 v.visit_table(pos)?
5292 .visit_field::<u32>("code", Self::VT_CODE, false)?
5293 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("msg", Self::VT_MSG, true)?
5294 .finish();
5295 Ok(())
5296 }
5297}
5298pub struct ErrorStatusArgs<'a> {
5299 pub code: u32,
5300 pub msg: Option<flatbuffers::WIPOffset<&'a str>>,
5301}
5302impl<'a> Default for ErrorStatusArgs<'a> {
5303 #[inline]
5304 fn default() -> Self {
5305 ErrorStatusArgs {
5306 code: 0,
5307 msg: None, }
5309 }
5310}
5311
5312pub struct ErrorStatusBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5313 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5314 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5315}
5316impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ErrorStatusBuilder<'a, 'b, A> {
5317 #[inline]
5318 pub fn add_code(&mut self, code: u32) {
5319 self.fbb_.push_slot::<u32>(ErrorStatus::VT_CODE, code, 0);
5320 }
5321 #[inline]
5322 pub fn add_msg(&mut self, msg: flatbuffers::WIPOffset<&'b str>) {
5323 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ErrorStatus::VT_MSG, msg);
5324 }
5325 #[inline]
5326 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ErrorStatusBuilder<'a, 'b, A> {
5327 let start = _fbb.start_table();
5328 ErrorStatusBuilder {
5329 fbb_: _fbb,
5330 start_: start,
5331 }
5332 }
5333 #[inline]
5334 pub fn finish(self) -> flatbuffers::WIPOffset<ErrorStatus<'a>> {
5335 let o = self.fbb_.end_table(self.start_);
5336 self.fbb_.required(o, ErrorStatus::VT_MSG,"msg");
5337 flatbuffers::WIPOffset::new(o.value())
5338 }
5339}
5340
5341impl core::fmt::Debug for ErrorStatus<'_> {
5342 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5343 let mut ds = f.debug_struct("ErrorStatus");
5344 ds.field("code", &self.code());
5345 ds.field("msg", &self.msg());
5346 ds.finish()
5347 }
5348}
5349pub enum OkStatusOffset {}
5350#[derive(Copy, Clone, PartialEq)]
5351
5352pub struct OkStatus<'a> {
5353 pub _tab: flatbuffers::Table<'a>,
5354}
5355
5356impl<'a> flatbuffers::Follow<'a> for OkStatus<'a> {
5357 type Inner = OkStatus<'a>;
5358 #[inline]
5359 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5360 Self { _tab: flatbuffers::Table::new(buf, loc) }
5361 }
5362}
5363
5364impl<'a> OkStatus<'a> {
5365
5366 #[inline]
5367 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5368 OkStatus { _tab: table }
5369 }
5370 #[allow(unused_mut)]
5371 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5372 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5373 _args: &'args OkStatusArgs
5374 ) -> flatbuffers::WIPOffset<OkStatus<'bldr>> {
5375 let mut builder = OkStatusBuilder::new(_fbb);
5376 builder.finish()
5377 }
5378
5379}
5380
5381impl flatbuffers::Verifiable for OkStatus<'_> {
5382 #[inline]
5383 fn run_verifier(
5384 v: &mut flatbuffers::Verifier, pos: usize
5385 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5386 use self::flatbuffers::Verifiable;
5387 v.visit_table(pos)?
5388 .finish();
5389 Ok(())
5390 }
5391}
5392pub struct OkStatusArgs {
5393}
5394impl<'a> Default for OkStatusArgs {
5395 #[inline]
5396 fn default() -> Self {
5397 OkStatusArgs {
5398 }
5399 }
5400}
5401
5402pub struct OkStatusBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5403 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5404 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5405}
5406impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> OkStatusBuilder<'a, 'b, A> {
5407 #[inline]
5408 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> OkStatusBuilder<'a, 'b, A> {
5409 let start = _fbb.start_table();
5410 OkStatusBuilder {
5411 fbb_: _fbb,
5412 start_: start,
5413 }
5414 }
5415 #[inline]
5416 pub fn finish(self) -> flatbuffers::WIPOffset<OkStatus<'a>> {
5417 let o = self.fbb_.end_table(self.start_);
5418 flatbuffers::WIPOffset::new(o.value())
5419 }
5420}
5421
5422impl core::fmt::Debug for OkStatus<'_> {
5423 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5424 let mut ds = f.debug_struct("OkStatus");
5425 ds.finish()
5426 }
5427}
5428pub enum BindRequestOffset {}
5429#[derive(Copy, Clone, PartialEq)]
5430
5431pub struct BindRequest<'a> {
5432 pub _tab: flatbuffers::Table<'a>,
5433}
5434
5435impl<'a> flatbuffers::Follow<'a> for BindRequest<'a> {
5436 type Inner = BindRequest<'a>;
5437 #[inline]
5438 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5439 Self { _tab: flatbuffers::Table::new(buf, loc) }
5440 }
5441}
5442
5443impl<'a> BindRequest<'a> {
5444 pub const VT_PLAN_ID: flatbuffers::VOffsetT = 4;
5445 pub const VT_STOP_ID: flatbuffers::VOffsetT = 6;
5446
5447 #[inline]
5448 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5449 BindRequest { _tab: table }
5450 }
5451 #[allow(unused_mut)]
5452 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5453 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5454 args: &'args BindRequestArgs
5455 ) -> flatbuffers::WIPOffset<BindRequest<'bldr>> {
5456 let mut builder = BindRequestBuilder::new(_fbb);
5457 builder.add_stop_id(args.stop_id);
5458 builder.add_plan_id(args.plan_id);
5459 builder.finish()
5460 }
5461
5462
5463 #[inline]
5464 pub fn plan_id(&self) -> u64 {
5465 unsafe { self._tab.get::<u64>(BindRequest::VT_PLAN_ID, Some(0)).unwrap()}
5469 }
5470 #[inline]
5471 pub fn stop_id(&self) -> u64 {
5472 unsafe { self._tab.get::<u64>(BindRequest::VT_STOP_ID, Some(0)).unwrap()}
5476 }
5477}
5478
5479impl flatbuffers::Verifiable for BindRequest<'_> {
5480 #[inline]
5481 fn run_verifier(
5482 v: &mut flatbuffers::Verifier, pos: usize
5483 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5484 use self::flatbuffers::Verifiable;
5485 v.visit_table(pos)?
5486 .visit_field::<u64>("plan_id", Self::VT_PLAN_ID, false)?
5487 .visit_field::<u64>("stop_id", Self::VT_STOP_ID, false)?
5488 .finish();
5489 Ok(())
5490 }
5491}
5492pub struct BindRequestArgs {
5493 pub plan_id: u64,
5494 pub stop_id: u64,
5495}
5496impl<'a> Default for BindRequestArgs {
5497 #[inline]
5498 fn default() -> Self {
5499 BindRequestArgs {
5500 plan_id: 0,
5501 stop_id: 0,
5502 }
5503 }
5504}
5505
5506pub struct BindRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5507 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5508 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5509}
5510impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BindRequestBuilder<'a, 'b, A> {
5511 #[inline]
5512 pub fn add_plan_id(&mut self, plan_id: u64) {
5513 self.fbb_.push_slot::<u64>(BindRequest::VT_PLAN_ID, plan_id, 0);
5514 }
5515 #[inline]
5516 pub fn add_stop_id(&mut self, stop_id: u64) {
5517 self.fbb_.push_slot::<u64>(BindRequest::VT_STOP_ID, stop_id, 0);
5518 }
5519 #[inline]
5520 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BindRequestBuilder<'a, 'b, A> {
5521 let start = _fbb.start_table();
5522 BindRequestBuilder {
5523 fbb_: _fbb,
5524 start_: start,
5525 }
5526 }
5527 #[inline]
5528 pub fn finish(self) -> flatbuffers::WIPOffset<BindRequest<'a>> {
5529 let o = self.fbb_.end_table(self.start_);
5530 flatbuffers::WIPOffset::new(o.value())
5531 }
5532}
5533
5534impl core::fmt::Debug for BindRequest<'_> {
5535 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5536 let mut ds = f.debug_struct("BindRequest");
5537 ds.field("plan_id", &self.plan_id());
5538 ds.field("stop_id", &self.stop_id());
5539 ds.finish()
5540 }
5541}
5542pub enum BindResponseOffset {}
5543#[derive(Copy, Clone, PartialEq)]
5544
5545pub struct BindResponse<'a> {
5546 pub _tab: flatbuffers::Table<'a>,
5547}
5548
5549impl<'a> flatbuffers::Follow<'a> for BindResponse<'a> {
5550 type Inner = BindResponse<'a>;
5551 #[inline]
5552 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5553 Self { _tab: flatbuffers::Table::new(buf, loc) }
5554 }
5555}
5556
5557impl<'a> BindResponse<'a> {
5558 pub const VT_PLAN_ID: flatbuffers::VOffsetT = 4;
5559 pub const VT_STOP_ID: flatbuffers::VOffsetT = 6;
5560
5561 #[inline]
5562 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5563 BindResponse { _tab: table }
5564 }
5565 #[allow(unused_mut)]
5566 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5567 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5568 args: &'args BindResponseArgs
5569 ) -> flatbuffers::WIPOffset<BindResponse<'bldr>> {
5570 let mut builder = BindResponseBuilder::new(_fbb);
5571 builder.add_stop_id(args.stop_id);
5572 builder.add_plan_id(args.plan_id);
5573 builder.finish()
5574 }
5575
5576
5577 #[inline]
5578 pub fn plan_id(&self) -> u64 {
5579 unsafe { self._tab.get::<u64>(BindResponse::VT_PLAN_ID, Some(0)).unwrap()}
5583 }
5584 #[inline]
5585 pub fn stop_id(&self) -> u64 {
5586 unsafe { self._tab.get::<u64>(BindResponse::VT_STOP_ID, Some(0)).unwrap()}
5590 }
5591}
5592
5593impl flatbuffers::Verifiable for BindResponse<'_> {
5594 #[inline]
5595 fn run_verifier(
5596 v: &mut flatbuffers::Verifier, pos: usize
5597 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5598 use self::flatbuffers::Verifiable;
5599 v.visit_table(pos)?
5600 .visit_field::<u64>("plan_id", Self::VT_PLAN_ID, false)?
5601 .visit_field::<u64>("stop_id", Self::VT_STOP_ID, false)?
5602 .finish();
5603 Ok(())
5604 }
5605}
5606pub struct BindResponseArgs {
5607 pub plan_id: u64,
5608 pub stop_id: u64,
5609}
5610impl<'a> Default for BindResponseArgs {
5611 #[inline]
5612 fn default() -> Self {
5613 BindResponseArgs {
5614 plan_id: 0,
5615 stop_id: 0,
5616 }
5617 }
5618}
5619
5620pub struct BindResponseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5621 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5622 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5623}
5624impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BindResponseBuilder<'a, 'b, A> {
5625 #[inline]
5626 pub fn add_plan_id(&mut self, plan_id: u64) {
5627 self.fbb_.push_slot::<u64>(BindResponse::VT_PLAN_ID, plan_id, 0);
5628 }
5629 #[inline]
5630 pub fn add_stop_id(&mut self, stop_id: u64) {
5631 self.fbb_.push_slot::<u64>(BindResponse::VT_STOP_ID, stop_id, 0);
5632 }
5633 #[inline]
5634 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BindResponseBuilder<'a, 'b, A> {
5635 let start = _fbb.start_table();
5636 BindResponseBuilder {
5637 fbb_: _fbb,
5638 start_: start,
5639 }
5640 }
5641 #[inline]
5642 pub fn finish(self) -> flatbuffers::WIPOffset<BindResponse<'a>> {
5643 let o = self.fbb_.end_table(self.start_);
5644 flatbuffers::WIPOffset::new(o.value())
5645 }
5646}
5647
5648impl core::fmt::Debug for BindResponse<'_> {
5649 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5650 let mut ds = f.debug_struct("BindResponse");
5651 ds.field("plan_id", &self.plan_id());
5652 ds.field("stop_id", &self.stop_id());
5653 ds.finish()
5654 }
5655}
5656pub enum UnbindRequestOffset {}
5657#[derive(Copy, Clone, PartialEq)]
5658
5659pub struct UnbindRequest<'a> {
5660 pub _tab: flatbuffers::Table<'a>,
5661}
5662
5663impl<'a> flatbuffers::Follow<'a> for UnbindRequest<'a> {
5664 type Inner = UnbindRequest<'a>;
5665 #[inline]
5666 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5667 Self { _tab: flatbuffers::Table::new(buf, loc) }
5668 }
5669}
5670
5671impl<'a> UnbindRequest<'a> {
5672 pub const VT_PLAN_ID: flatbuffers::VOffsetT = 4;
5673 pub const VT_STOP_ID: flatbuffers::VOffsetT = 6;
5674
5675 #[inline]
5676 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5677 UnbindRequest { _tab: table }
5678 }
5679 #[allow(unused_mut)]
5680 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5681 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5682 args: &'args UnbindRequestArgs
5683 ) -> flatbuffers::WIPOffset<UnbindRequest<'bldr>> {
5684 let mut builder = UnbindRequestBuilder::new(_fbb);
5685 builder.add_stop_id(args.stop_id);
5686 builder.add_plan_id(args.plan_id);
5687 builder.finish()
5688 }
5689
5690
5691 #[inline]
5692 pub fn plan_id(&self) -> u64 {
5693 unsafe { self._tab.get::<u64>(UnbindRequest::VT_PLAN_ID, Some(0)).unwrap()}
5697 }
5698 #[inline]
5699 pub fn stop_id(&self) -> u64 {
5700 unsafe { self._tab.get::<u64>(UnbindRequest::VT_STOP_ID, Some(0)).unwrap()}
5704 }
5705}
5706
5707impl flatbuffers::Verifiable for UnbindRequest<'_> {
5708 #[inline]
5709 fn run_verifier(
5710 v: &mut flatbuffers::Verifier, pos: usize
5711 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5712 use self::flatbuffers::Verifiable;
5713 v.visit_table(pos)?
5714 .visit_field::<u64>("plan_id", Self::VT_PLAN_ID, false)?
5715 .visit_field::<u64>("stop_id", Self::VT_STOP_ID, false)?
5716 .finish();
5717 Ok(())
5718 }
5719}
5720pub struct UnbindRequestArgs {
5721 pub plan_id: u64,
5722 pub stop_id: u64,
5723}
5724impl<'a> Default for UnbindRequestArgs {
5725 #[inline]
5726 fn default() -> Self {
5727 UnbindRequestArgs {
5728 plan_id: 0,
5729 stop_id: 0,
5730 }
5731 }
5732}
5733
5734pub struct UnbindRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5735 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5736 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5737}
5738impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UnbindRequestBuilder<'a, 'b, A> {
5739 #[inline]
5740 pub fn add_plan_id(&mut self, plan_id: u64) {
5741 self.fbb_.push_slot::<u64>(UnbindRequest::VT_PLAN_ID, plan_id, 0);
5742 }
5743 #[inline]
5744 pub fn add_stop_id(&mut self, stop_id: u64) {
5745 self.fbb_.push_slot::<u64>(UnbindRequest::VT_STOP_ID, stop_id, 0);
5746 }
5747 #[inline]
5748 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> UnbindRequestBuilder<'a, 'b, A> {
5749 let start = _fbb.start_table();
5750 UnbindRequestBuilder {
5751 fbb_: _fbb,
5752 start_: start,
5753 }
5754 }
5755 #[inline]
5756 pub fn finish(self) -> flatbuffers::WIPOffset<UnbindRequest<'a>> {
5757 let o = self.fbb_.end_table(self.start_);
5758 flatbuffers::WIPOffset::new(o.value())
5759 }
5760}
5761
5762impl core::fmt::Debug for UnbindRequest<'_> {
5763 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5764 let mut ds = f.debug_struct("UnbindRequest");
5765 ds.field("plan_id", &self.plan_id());
5766 ds.field("stop_id", &self.stop_id());
5767 ds.finish()
5768 }
5769}
5770pub enum UnbindResponseOffset {}
5771#[derive(Copy, Clone, PartialEq)]
5772
5773pub struct UnbindResponse<'a> {
5774 pub _tab: flatbuffers::Table<'a>,
5775}
5776
5777impl<'a> flatbuffers::Follow<'a> for UnbindResponse<'a> {
5778 type Inner = UnbindResponse<'a>;
5779 #[inline]
5780 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5781 Self { _tab: flatbuffers::Table::new(buf, loc) }
5782 }
5783}
5784
5785impl<'a> UnbindResponse<'a> {
5786 pub const VT_PLAN_ID: flatbuffers::VOffsetT = 4;
5787 pub const VT_STOP_ID: flatbuffers::VOffsetT = 6;
5788
5789 #[inline]
5790 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5791 UnbindResponse { _tab: table }
5792 }
5793 #[allow(unused_mut)]
5794 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5795 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5796 args: &'args UnbindResponseArgs
5797 ) -> flatbuffers::WIPOffset<UnbindResponse<'bldr>> {
5798 let mut builder = UnbindResponseBuilder::new(_fbb);
5799 builder.add_stop_id(args.stop_id);
5800 builder.add_plan_id(args.plan_id);
5801 builder.finish()
5802 }
5803
5804
5805 #[inline]
5806 pub fn plan_id(&self) -> u64 {
5807 unsafe { self._tab.get::<u64>(UnbindResponse::VT_PLAN_ID, Some(0)).unwrap()}
5811 }
5812 #[inline]
5813 pub fn stop_id(&self) -> u64 {
5814 unsafe { self._tab.get::<u64>(UnbindResponse::VT_STOP_ID, Some(0)).unwrap()}
5818 }
5819}
5820
5821impl flatbuffers::Verifiable for UnbindResponse<'_> {
5822 #[inline]
5823 fn run_verifier(
5824 v: &mut flatbuffers::Verifier, pos: usize
5825 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5826 use self::flatbuffers::Verifiable;
5827 v.visit_table(pos)?
5828 .visit_field::<u64>("plan_id", Self::VT_PLAN_ID, false)?
5829 .visit_field::<u64>("stop_id", Self::VT_STOP_ID, false)?
5830 .finish();
5831 Ok(())
5832 }
5833}
5834pub struct UnbindResponseArgs {
5835 pub plan_id: u64,
5836 pub stop_id: u64,
5837}
5838impl<'a> Default for UnbindResponseArgs {
5839 #[inline]
5840 fn default() -> Self {
5841 UnbindResponseArgs {
5842 plan_id: 0,
5843 stop_id: 0,
5844 }
5845 }
5846}
5847
5848pub struct UnbindResponseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5849 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5850 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5851}
5852impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UnbindResponseBuilder<'a, 'b, A> {
5853 #[inline]
5854 pub fn add_plan_id(&mut self, plan_id: u64) {
5855 self.fbb_.push_slot::<u64>(UnbindResponse::VT_PLAN_ID, plan_id, 0);
5856 }
5857 #[inline]
5858 pub fn add_stop_id(&mut self, stop_id: u64) {
5859 self.fbb_.push_slot::<u64>(UnbindResponse::VT_STOP_ID, stop_id, 0);
5860 }
5861 #[inline]
5862 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> UnbindResponseBuilder<'a, 'b, A> {
5863 let start = _fbb.start_table();
5864 UnbindResponseBuilder {
5865 fbb_: _fbb,
5866 start_: start,
5867 }
5868 }
5869 #[inline]
5870 pub fn finish(self) -> flatbuffers::WIPOffset<UnbindResponse<'a>> {
5871 let o = self.fbb_.end_table(self.start_);
5872 flatbuffers::WIPOffset::new(o.value())
5873 }
5874}
5875
5876impl core::fmt::Debug for UnbindResponse<'_> {
5877 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5878 let mut ds = f.debug_struct("UnbindResponse");
5879 ds.field("plan_id", &self.plan_id());
5880 ds.field("stop_id", &self.stop_id());
5881 ds.finish()
5882 }
5883}
5884pub enum MessageOffset {}
5885#[derive(Copy, Clone, PartialEq)]
5886
5887pub struct Message<'a> {
5888 pub _tab: flatbuffers::Table<'a>,
5889}
5890
5891impl<'a> flatbuffers::Follow<'a> for Message<'a> {
5892 type Inner = Message<'a>;
5893 #[inline]
5894 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5895 Self { _tab: flatbuffers::Table::new(buf, loc) }
5896 }
5897}
5898
5899impl<'a> Message<'a> {
5900 pub const VT_DATA_TYPE: flatbuffers::VOffsetT = 4;
5901 pub const VT_DATA: flatbuffers::VOffsetT = 6;
5902 pub const VT_STATUS_TYPE: flatbuffers::VOffsetT = 8;
5903 pub const VT_STATUS: flatbuffers::VOffsetT = 10;
5904
5905 #[inline]
5906 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5907 Message { _tab: table }
5908 }
5909 #[allow(unused_mut)]
5910 pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5911 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5912 args: &'args MessageArgs
5913 ) -> flatbuffers::WIPOffset<Message<'bldr>> {
5914 let mut builder = MessageBuilder::new(_fbb);
5915 if let Some(x) = args.status { builder.add_status(x); }
5916 if let Some(x) = args.data { builder.add_data(x); }
5917 builder.add_status_type(args.status_type);
5918 builder.add_data_type(args.data_type);
5919 builder.finish()
5920 }
5921
5922
5923 #[inline]
5924 pub fn data_type(&self) -> Payload {
5925 unsafe { self._tab.get::<Payload>(Message::VT_DATA_TYPE, Some(Payload::NONE)).unwrap()}
5929 }
5930 #[inline]
5931 pub fn data(&self) -> flatbuffers::Table<'a> {
5932 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(Message::VT_DATA, None).unwrap()}
5936 }
5937 #[inline]
5938 pub fn status_type(&self) -> Status {
5939 unsafe { self._tab.get::<Status>(Message::VT_STATUS_TYPE, Some(Status::NONE)).unwrap()}
5943 }
5944 #[inline]
5945 pub fn status(&self) -> flatbuffers::Table<'a> {
5946 unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(Message::VT_STATUS, None).unwrap()}
5950 }
5951 #[inline]
5952 #[allow(non_snake_case)]
5953 pub fn data_as_create_plan_request(&self) -> Option<CreatePlanRequest<'a>> {
5954 if self.data_type() == Payload::CreatePlanRequest {
5955 let u = self.data();
5956 Some(unsafe { CreatePlanRequest::init_from_table(u) })
5960 } else {
5961 None
5962 }
5963 }
5964
5965 #[inline]
5966 #[allow(non_snake_case)]
5967 pub fn data_as_create_plan_response(&self) -> Option<CreatePlanResponse<'a>> {
5968 if self.data_type() == Payload::CreatePlanResponse {
5969 let u = self.data();
5970 Some(unsafe { CreatePlanResponse::init_from_table(u) })
5974 } else {
5975 None
5976 }
5977 }
5978
5979 #[inline]
5980 #[allow(non_snake_case)]
5981 pub fn data_as_delete_plan_request(&self) -> Option<DeletePlanRequest<'a>> {
5982 if self.data_type() == Payload::DeletePlanRequest {
5983 let u = self.data();
5984 Some(unsafe { DeletePlanRequest::init_from_table(u) })
5988 } else {
5989 None
5990 }
5991 }
5992
5993 #[inline]
5994 #[allow(non_snake_case)]
5995 pub fn data_as_delete_plan_response(&self) -> Option<DeletePlanResponse<'a>> {
5996 if self.data_type() == Payload::DeletePlanResponse {
5997 let u = self.data();
5998 Some(unsafe { DeletePlanResponse::init_from_table(u) })
6002 } else {
6003 None
6004 }
6005 }
6006
6007 #[inline]
6008 #[allow(non_snake_case)]
6009 pub fn data_as_get_plan_request(&self) -> Option<GetPlanRequest<'a>> {
6010 if self.data_type() == Payload::GetPlanRequest {
6011 let u = self.data();
6012 Some(unsafe { GetPlanRequest::init_from_table(u) })
6016 } else {
6017 None
6018 }
6019 }
6020
6021 #[inline]
6022 #[allow(non_snake_case)]
6023 pub fn data_as_get_plans_request(&self) -> Option<GetPlansRequest<'a>> {
6024 if self.data_type() == Payload::GetPlansRequest {
6025 let u = self.data();
6026 Some(unsafe { GetPlansRequest::init_from_table(u) })
6030 } else {
6031 None
6032 }
6033 }
6034
6035 #[inline]
6036 #[allow(non_snake_case)]
6037 pub fn data_as_train(&self) -> Option<Train<'a>> {
6038 if self.data_type() == Payload::Train {
6039 let u = self.data();
6040 Some(unsafe { Train::init_from_table(u) })
6044 } else {
6045 None
6046 }
6047 }
6048
6049 #[inline]
6050 #[allow(non_snake_case)]
6051 pub fn data_as_catalog(&self) -> Option<Catalog<'a>> {
6052 if self.data_type() == Payload::Catalog {
6053 let u = self.data();
6054 Some(unsafe { Catalog::init_from_table(u) })
6058 } else {
6059 None
6060 }
6061 }
6062
6063 #[inline]
6064 #[allow(non_snake_case)]
6065 pub fn data_as_register_request(&self) -> Option<RegisterRequest<'a>> {
6066 if self.data_type() == Payload::RegisterRequest {
6067 let u = self.data();
6068 Some(unsafe { RegisterRequest::init_from_table(u) })
6072 } else {
6073 None
6074 }
6075 }
6076
6077 #[inline]
6078 #[allow(non_snake_case)]
6079 pub fn data_as_register_response(&self) -> Option<RegisterResponse<'a>> {
6080 if self.data_type() == Payload::RegisterResponse {
6081 let u = self.data();
6082 Some(unsafe { RegisterResponse::init_from_table(u) })
6086 } else {
6087 None
6088 }
6089 }
6090
6091 #[inline]
6092 #[allow(non_snake_case)]
6093 pub fn data_as_bind_request(&self) -> Option<BindRequest<'a>> {
6094 if self.data_type() == Payload::BindRequest {
6095 let u = self.data();
6096 Some(unsafe { BindRequest::init_from_table(u) })
6100 } else {
6101 None
6102 }
6103 }
6104
6105 #[inline]
6106 #[allow(non_snake_case)]
6107 pub fn data_as_bind_response(&self) -> Option<BindResponse<'a>> {
6108 if self.data_type() == Payload::BindResponse {
6109 let u = self.data();
6110 Some(unsafe { BindResponse::init_from_table(u) })
6114 } else {
6115 None
6116 }
6117 }
6118
6119 #[inline]
6120 #[allow(non_snake_case)]
6121 pub fn data_as_unbind_request(&self) -> Option<UnbindRequest<'a>> {
6122 if self.data_type() == Payload::UnbindRequest {
6123 let u = self.data();
6124 Some(unsafe { UnbindRequest::init_from_table(u) })
6128 } else {
6129 None
6130 }
6131 }
6132
6133 #[inline]
6134 #[allow(non_snake_case)]
6135 pub fn data_as_unbind_response(&self) -> Option<UnbindResponse<'a>> {
6136 if self.data_type() == Payload::UnbindResponse {
6137 let u = self.data();
6138 Some(unsafe { UnbindResponse::init_from_table(u) })
6142 } else {
6143 None
6144 }
6145 }
6146
6147 #[inline]
6148 #[allow(non_snake_case)]
6149 pub fn data_as_disconnect(&self) -> Option<Disconnect<'a>> {
6150 if self.data_type() == Payload::Disconnect {
6151 let u = self.data();
6152 Some(unsafe { Disconnect::init_from_table(u) })
6156 } else {
6157 None
6158 }
6159 }
6160
6161 #[inline]
6162 #[allow(non_snake_case)]
6163 pub fn status_as_ok_status(&self) -> Option<OkStatus<'a>> {
6164 if self.status_type() == Status::OkStatus {
6165 let u = self.status();
6166 Some(unsafe { OkStatus::init_from_table(u) })
6170 } else {
6171 None
6172 }
6173 }
6174
6175 #[inline]
6176 #[allow(non_snake_case)]
6177 pub fn status_as_error_status(&self) -> Option<ErrorStatus<'a>> {
6178 if self.status_type() == Status::ErrorStatus {
6179 let u = self.status();
6180 Some(unsafe { ErrorStatus::init_from_table(u) })
6184 } else {
6185 None
6186 }
6187 }
6188
6189}
6190
6191impl flatbuffers::Verifiable for Message<'_> {
6192 #[inline]
6193 fn run_verifier(
6194 v: &mut flatbuffers::Verifier, pos: usize
6195 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
6196 use self::flatbuffers::Verifiable;
6197 v.visit_table(pos)?
6198 .visit_union::<Payload, _>("data_type", Self::VT_DATA_TYPE, "data", Self::VT_DATA, true, |key, v, pos| {
6199 match key {
6200 Payload::CreatePlanRequest => v.verify_union_variant::<flatbuffers::ForwardsUOffset<CreatePlanRequest>>("Payload::CreatePlanRequest", pos),
6201 Payload::CreatePlanResponse => v.verify_union_variant::<flatbuffers::ForwardsUOffset<CreatePlanResponse>>("Payload::CreatePlanResponse", pos),
6202 Payload::DeletePlanRequest => v.verify_union_variant::<flatbuffers::ForwardsUOffset<DeletePlanRequest>>("Payload::DeletePlanRequest", pos),
6203 Payload::DeletePlanResponse => v.verify_union_variant::<flatbuffers::ForwardsUOffset<DeletePlanResponse>>("Payload::DeletePlanResponse", pos),
6204 Payload::GetPlanRequest => v.verify_union_variant::<flatbuffers::ForwardsUOffset<GetPlanRequest>>("Payload::GetPlanRequest", pos),
6205 Payload::GetPlansRequest => v.verify_union_variant::<flatbuffers::ForwardsUOffset<GetPlansRequest>>("Payload::GetPlansRequest", pos),
6206 Payload::Train => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Train>>("Payload::Train", pos),
6207 Payload::Catalog => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Catalog>>("Payload::Catalog", pos),
6208 Payload::RegisterRequest => v.verify_union_variant::<flatbuffers::ForwardsUOffset<RegisterRequest>>("Payload::RegisterRequest", pos),
6209 Payload::RegisterResponse => v.verify_union_variant::<flatbuffers::ForwardsUOffset<RegisterResponse>>("Payload::RegisterResponse", pos),
6210 Payload::BindRequest => v.verify_union_variant::<flatbuffers::ForwardsUOffset<BindRequest>>("Payload::BindRequest", pos),
6211 Payload::BindResponse => v.verify_union_variant::<flatbuffers::ForwardsUOffset<BindResponse>>("Payload::BindResponse", pos),
6212 Payload::UnbindRequest => v.verify_union_variant::<flatbuffers::ForwardsUOffset<UnbindRequest>>("Payload::UnbindRequest", pos),
6213 Payload::UnbindResponse => v.verify_union_variant::<flatbuffers::ForwardsUOffset<UnbindResponse>>("Payload::UnbindResponse", pos),
6214 Payload::Disconnect => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Disconnect>>("Payload::Disconnect", pos),
6215 _ => Ok(()),
6216 }
6217 })?
6218 .visit_union::<Status, _>("status_type", Self::VT_STATUS_TYPE, "status", Self::VT_STATUS, true, |key, v, pos| {
6219 match key {
6220 Status::OkStatus => v.verify_union_variant::<flatbuffers::ForwardsUOffset<OkStatus>>("Status::OkStatus", pos),
6221 Status::ErrorStatus => v.verify_union_variant::<flatbuffers::ForwardsUOffset<ErrorStatus>>("Status::ErrorStatus", pos),
6222 _ => Ok(()),
6223 }
6224 })?
6225 .finish();
6226 Ok(())
6227 }
6228}
6229pub struct MessageArgs {
6230 pub data_type: Payload,
6231 pub data: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
6232 pub status_type: Status,
6233 pub status: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
6234}
6235impl<'a> Default for MessageArgs {
6236 #[inline]
6237 fn default() -> Self {
6238 MessageArgs {
6239 data_type: Payload::NONE,
6240 data: None, status_type: Status::NONE,
6242 status: None, }
6244 }
6245}
6246
6247pub struct MessageBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
6248 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6249 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
6250}
6251impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MessageBuilder<'a, 'b, A> {
6252 #[inline]
6253 pub fn add_data_type(&mut self, data_type: Payload) {
6254 self.fbb_.push_slot::<Payload>(Message::VT_DATA_TYPE, data_type, Payload::NONE);
6255 }
6256 #[inline]
6257 pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
6258 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Message::VT_DATA, data);
6259 }
6260 #[inline]
6261 pub fn add_status_type(&mut self, status_type: Status) {
6262 self.fbb_.push_slot::<Status>(Message::VT_STATUS_TYPE, status_type, Status::NONE);
6263 }
6264 #[inline]
6265 pub fn add_status(&mut self, status: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
6266 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Message::VT_STATUS, status);
6267 }
6268 #[inline]
6269 pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MessageBuilder<'a, 'b, A> {
6270 let start = _fbb.start_table();
6271 MessageBuilder {
6272 fbb_: _fbb,
6273 start_: start,
6274 }
6275 }
6276 #[inline]
6277 pub fn finish(self) -> flatbuffers::WIPOffset<Message<'a>> {
6278 let o = self.fbb_.end_table(self.start_);
6279 self.fbb_.required(o, Message::VT_DATA,"data");
6280 self.fbb_.required(o, Message::VT_STATUS,"status");
6281 flatbuffers::WIPOffset::new(o.value())
6282 }
6283}
6284
6285impl core::fmt::Debug for Message<'_> {
6286 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6287 let mut ds = f.debug_struct("Message");
6288 ds.field("data_type", &self.data_type());
6289 match self.data_type() {
6290 Payload::CreatePlanRequest => {
6291 if let Some(x) = self.data_as_create_plan_request() {
6292 ds.field("data", &x)
6293 } else {
6294 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6295 }
6296 },
6297 Payload::CreatePlanResponse => {
6298 if let Some(x) = self.data_as_create_plan_response() {
6299 ds.field("data", &x)
6300 } else {
6301 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6302 }
6303 },
6304 Payload::DeletePlanRequest => {
6305 if let Some(x) = self.data_as_delete_plan_request() {
6306 ds.field("data", &x)
6307 } else {
6308 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6309 }
6310 },
6311 Payload::DeletePlanResponse => {
6312 if let Some(x) = self.data_as_delete_plan_response() {
6313 ds.field("data", &x)
6314 } else {
6315 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6316 }
6317 },
6318 Payload::GetPlanRequest => {
6319 if let Some(x) = self.data_as_get_plan_request() {
6320 ds.field("data", &x)
6321 } else {
6322 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6323 }
6324 },
6325 Payload::GetPlansRequest => {
6326 if let Some(x) = self.data_as_get_plans_request() {
6327 ds.field("data", &x)
6328 } else {
6329 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6330 }
6331 },
6332 Payload::Train => {
6333 if let Some(x) = self.data_as_train() {
6334 ds.field("data", &x)
6335 } else {
6336 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6337 }
6338 },
6339 Payload::Catalog => {
6340 if let Some(x) = self.data_as_catalog() {
6341 ds.field("data", &x)
6342 } else {
6343 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6344 }
6345 },
6346 Payload::RegisterRequest => {
6347 if let Some(x) = self.data_as_register_request() {
6348 ds.field("data", &x)
6349 } else {
6350 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6351 }
6352 },
6353 Payload::RegisterResponse => {
6354 if let Some(x) = self.data_as_register_response() {
6355 ds.field("data", &x)
6356 } else {
6357 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6358 }
6359 },
6360 Payload::BindRequest => {
6361 if let Some(x) = self.data_as_bind_request() {
6362 ds.field("data", &x)
6363 } else {
6364 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6365 }
6366 },
6367 Payload::BindResponse => {
6368 if let Some(x) = self.data_as_bind_response() {
6369 ds.field("data", &x)
6370 } else {
6371 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6372 }
6373 },
6374 Payload::UnbindRequest => {
6375 if let Some(x) = self.data_as_unbind_request() {
6376 ds.field("data", &x)
6377 } else {
6378 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6379 }
6380 },
6381 Payload::UnbindResponse => {
6382 if let Some(x) = self.data_as_unbind_response() {
6383 ds.field("data", &x)
6384 } else {
6385 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6386 }
6387 },
6388 Payload::Disconnect => {
6389 if let Some(x) = self.data_as_disconnect() {
6390 ds.field("data", &x)
6391 } else {
6392 ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6393 }
6394 },
6395 _ => {
6396 let x: Option<()> = None;
6397 ds.field("data", &x)
6398 },
6399 };
6400 ds.field("status_type", &self.status_type());
6401 match self.status_type() {
6402 Status::OkStatus => {
6403 if let Some(x) = self.status_as_ok_status() {
6404 ds.field("status", &x)
6405 } else {
6406 ds.field("status", &"InvalidFlatbuffer: Union discriminant does not match value.")
6407 }
6408 },
6409 Status::ErrorStatus => {
6410 if let Some(x) = self.status_as_error_status() {
6411 ds.field("status", &x)
6412 } else {
6413 ds.field("status", &"InvalidFlatbuffer: Union discriminant does not match value.")
6414 }
6415 },
6416 _ => {
6417 let x: Option<()> = None;
6418 ds.field("status", &x)
6419 },
6420 };
6421 ds.finish()
6422 }
6423}
6424#[inline]
6425pub fn root_as_message(buf: &[u8]) -> Result<Message, flatbuffers::InvalidFlatbuffer> {
6432 flatbuffers::root::<Message>(buf)
6433}
6434#[inline]
6435pub fn size_prefixed_root_as_message(buf: &[u8]) -> Result<Message, flatbuffers::InvalidFlatbuffer> {
6442 flatbuffers::size_prefixed_root::<Message>(buf)
6443}
6444#[inline]
6445pub fn root_as_message_with_opts<'b, 'o>(
6452 opts: &'o flatbuffers::VerifierOptions,
6453 buf: &'b [u8],
6454) -> Result<Message<'b>, flatbuffers::InvalidFlatbuffer> {
6455 flatbuffers::root_with_opts::<Message<'b>>(opts, buf)
6456}
6457#[inline]
6458pub fn size_prefixed_root_as_message_with_opts<'b, 'o>(
6465 opts: &'o flatbuffers::VerifierOptions,
6466 buf: &'b [u8],
6467) -> Result<Message<'b>, flatbuffers::InvalidFlatbuffer> {
6468 flatbuffers::size_prefixed_root_with_opts::<Message<'b>>(opts, buf)
6469}
6470#[inline]
6471pub unsafe fn root_as_message_unchecked(buf: &[u8]) -> Message {
6475 flatbuffers::root_unchecked::<Message>(buf)
6476}
6477#[inline]
6478pub unsafe fn size_prefixed_root_as_message_unchecked(buf: &[u8]) -> Message {
6482 flatbuffers::size_prefixed_root_unchecked::<Message>(buf)
6483}
6484#[inline]
6485pub fn finish_message_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(
6486 fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6487 root: flatbuffers::WIPOffset<Message<'a>>) {
6488 fbb.finish(root, None);
6489}
6490
6491#[inline]
6492pub fn finish_size_prefixed_message_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, root: flatbuffers::WIPOffset<Message<'a>>) {
6493 fbb.finish_size_prefixed(root, None);
6494}
6495}