protosol 5.3.0

Protobuf definitions for the SVM fuzzing project.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
// automatically generated by the FlatBuffers compiler, do not modify


// @generated

use crate::context_generated::*;
use crate::metadata_generated::*;
use core::mem;
use core::cmp::Ordering;

extern crate flatbuffers;
use self::flatbuffers::{EndianScalar, Follow};

#[allow(unused_imports, dead_code)]
pub mod org {

  use crate::context_generated::*;
  use crate::metadata_generated::*;
  use core::mem;
  use core::cmp::Ordering;

  extern crate flatbuffers;
  use self::flatbuffers::{EndianScalar, Follow};
#[allow(unused_imports, dead_code)]
pub mod solana {

  use crate::context_generated::*;
  use crate::metadata_generated::*;
  use core::mem;
  use core::cmp::Ordering;

  extern crate flatbuffers;
  use self::flatbuffers::{EndianScalar, Follow};
#[allow(unused_imports, dead_code)]
pub mod sealevel {

  use crate::context_generated::*;
  use crate::metadata_generated::*;
  use core::mem;
  use core::cmp::Ordering;

  extern crate flatbuffers;
  use self::flatbuffers::{EndianScalar, Follow};
#[allow(unused_imports, dead_code)]
pub mod v_2 {

  use crate::context_generated::*;
  use crate::metadata_generated::*;
  use core::mem;
  use core::cmp::Ordering;

  extern crate flatbuffers;
  use self::flatbuffers::{EndianScalar, Follow};

pub enum ELFLoaderCtxOffset {}
#[derive(Copy, Clone, PartialEq)]

pub struct ELFLoaderCtx<'a> {
  pub _tab: flatbuffers::Table<'a>,
}

impl<'a> flatbuffers::Follow<'a> for ELFLoaderCtx<'a> {
  type Inner = ELFLoaderCtx<'a>;
  #[inline]
  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
    Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
  }
}

impl<'a> ELFLoaderCtx<'a> {
  pub const VT_ELF_DATA: flatbuffers::VOffsetT = 4;
  pub const VT_FEATURES: flatbuffers::VOffsetT = 6;
  pub const VT_DEPLOY_CHECKS: flatbuffers::VOffsetT = 8;

  #[inline]
  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
    ELFLoaderCtx { _tab: table }
  }
  #[allow(unused_mut)]
  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
    args: &'args ELFLoaderCtxArgs<'args>
  ) -> flatbuffers::WIPOffset<ELFLoaderCtx<'bldr>> {
    let mut builder = ELFLoaderCtxBuilder::new(_fbb);
    if let Some(x) = args.features { builder.add_features(x); }
    if let Some(x) = args.elf_data { builder.add_elf_data(x); }
    builder.add_deploy_checks(args.deploy_checks);
    builder.finish()
  }

  pub fn unpack(&self) -> ELFLoaderCtxT {
    let elf_data = {
      let x = self.elf_data();
      x.into_iter().collect()
    };
    let features = {
      let x = self.features();
      Box::new(x.unpack())
    };
    let deploy_checks = self.deploy_checks();
    ELFLoaderCtxT {
      elf_data,
      features,
      deploy_checks,
    }
  }

  #[inline]
  pub fn elf_data(&self) -> flatbuffers::Vector<'a, u8> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(ELFLoaderCtx::VT_ELF_DATA, None).unwrap()}
  }
  #[inline]
  pub fn features(&self) -> FeatureSet<'a> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<FeatureSet>>(ELFLoaderCtx::VT_FEATURES, None).unwrap()}
  }
  #[inline]
  pub fn deploy_checks(&self) -> bool {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<bool>(ELFLoaderCtx::VT_DEPLOY_CHECKS, Some(false)).unwrap()}
  }
}

impl flatbuffers::Verifiable for ELFLoaderCtx<'_> {
  #[inline]
  fn run_verifier(
    v: &mut flatbuffers::Verifier, pos: usize
  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
    use self::flatbuffers::Verifiable;
    v.visit_table(pos)?
     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>("elf_data", Self::VT_ELF_DATA, true)?
     .visit_field::<flatbuffers::ForwardsUOffset<FeatureSet>>("features", Self::VT_FEATURES, true)?
     .visit_field::<bool>("deploy_checks", Self::VT_DEPLOY_CHECKS, false)?
     .finish();
    Ok(())
  }
}
pub struct ELFLoaderCtxArgs<'a> {
    pub elf_data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
    pub features: Option<flatbuffers::WIPOffset<FeatureSet<'a>>>,
    pub deploy_checks: bool,
}
impl<'a> Default for ELFLoaderCtxArgs<'a> {
  #[inline]
  fn default() -> Self {
    ELFLoaderCtxArgs {
      elf_data: None, // required field
      features: None, // required field
      deploy_checks: false,
    }
  }
}

pub struct ELFLoaderCtxBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ELFLoaderCtxBuilder<'a, 'b, A> {
  #[inline]
  pub fn add_elf_data(&mut self, elf_data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u8>>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ELFLoaderCtx::VT_ELF_DATA, elf_data);
  }
  #[inline]
  pub fn add_features(&mut self, features: flatbuffers::WIPOffset<FeatureSet<'b >>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<FeatureSet>>(ELFLoaderCtx::VT_FEATURES, features);
  }
  #[inline]
  pub fn add_deploy_checks(&mut self, deploy_checks: bool) {
    self.fbb_.push_slot::<bool>(ELFLoaderCtx::VT_DEPLOY_CHECKS, deploy_checks, false);
  }
  #[inline]
  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ELFLoaderCtxBuilder<'a, 'b, A> {
    let start = _fbb.start_table();
    ELFLoaderCtxBuilder {
      fbb_: _fbb,
      start_: start,
    }
  }
  #[inline]
  pub fn finish(self) -> flatbuffers::WIPOffset<ELFLoaderCtx<'a>> {
    let o = self.fbb_.end_table(self.start_);
    self.fbb_.required(o, ELFLoaderCtx::VT_ELF_DATA,"elf_data");
    self.fbb_.required(o, ELFLoaderCtx::VT_FEATURES,"features");
    flatbuffers::WIPOffset::new(o.value())
  }
}

impl core::fmt::Debug for ELFLoaderCtx<'_> {
  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
    let mut ds = f.debug_struct("ELFLoaderCtx");
      ds.field("elf_data", &self.elf_data());
      ds.field("features", &self.features());
      ds.field("deploy_checks", &self.deploy_checks());
      ds.finish()
  }
}
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
pub struct ELFLoaderCtxT {
  pub elf_data: Vec<u8>,
  pub features: Box<FeatureSetT>,
  pub deploy_checks: bool,
}
impl Default for ELFLoaderCtxT {
  fn default() -> Self {
    Self {
      elf_data: Default::default(),
      features: Default::default(),
      deploy_checks: false,
    }
  }
}
impl ELFLoaderCtxT {
  pub fn pack<'b, A: flatbuffers::Allocator + 'b>(
    &self,
    _fbb: &mut flatbuffers::FlatBufferBuilder<'b, A>
  ) -> flatbuffers::WIPOffset<ELFLoaderCtx<'b>> {
    let elf_data = Some({
      let x = &self.elf_data;
      _fbb.create_vector(x)
    });
    let features = Some({
      let x = &self.features;
      x.pack(_fbb)
    });
    let deploy_checks = self.deploy_checks;
    ELFLoaderCtx::create(_fbb, &ELFLoaderCtxArgs{
      elf_data,
      features,
      deploy_checks,
    })
  }
}
pub enum ELFLoaderEffectsOffset {}
#[derive(Copy, Clone, PartialEq)]

pub struct ELFLoaderEffects<'a> {
  pub _tab: flatbuffers::Table<'a>,
}

impl<'a> flatbuffers::Follow<'a> for ELFLoaderEffects<'a> {
  type Inner = ELFLoaderEffects<'a>;
  #[inline]
  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
    Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
  }
}

impl<'a> ELFLoaderEffects<'a> {
  pub const VT_ERR_CODE: flatbuffers::VOffsetT = 4;
  pub const VT_RODATA_HASH: flatbuffers::VOffsetT = 6;
  pub const VT_TEXT_CNT: flatbuffers::VOffsetT = 8;
  pub const VT_TEXT_OFF: flatbuffers::VOffsetT = 10;
  pub const VT_ENTRY_PC: flatbuffers::VOffsetT = 12;
  pub const VT_CALLDESTS_HASH: flatbuffers::VOffsetT = 14;

  #[inline]
  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
    ELFLoaderEffects { _tab: table }
  }
  #[allow(unused_mut)]
  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
    args: &'args ELFLoaderEffectsArgs<'args>
  ) -> flatbuffers::WIPOffset<ELFLoaderEffects<'bldr>> {
    let mut builder = ELFLoaderEffectsBuilder::new(_fbb);
    builder.add_entry_pc(args.entry_pc);
    builder.add_text_off(args.text_off);
    builder.add_text_cnt(args.text_cnt);
    if let Some(x) = args.calldests_hash { builder.add_calldests_hash(x); }
    if let Some(x) = args.rodata_hash { builder.add_rodata_hash(x); }
    builder.add_err_code(args.err_code);
    builder.finish()
  }

  pub fn unpack(&self) -> ELFLoaderEffectsT {
    let err_code = self.err_code();
    let rodata_hash = self.rodata_hash().map(|x| {
      x.unpack()
    });
    let text_cnt = self.text_cnt();
    let text_off = self.text_off();
    let entry_pc = self.entry_pc();
    let calldests_hash = self.calldests_hash().map(|x| {
      x.unpack()
    });
    ELFLoaderEffectsT {
      err_code,
      rodata_hash,
      text_cnt,
      text_off,
      entry_pc,
      calldests_hash,
    }
  }

  #[inline]
  pub fn err_code(&self) -> u8 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<u8>(ELFLoaderEffects::VT_ERR_CODE, Some(0)).unwrap()}
  }
  #[inline]
  pub fn rodata_hash(&self) -> Option<&'a XXHash> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<XXHash>(ELFLoaderEffects::VT_RODATA_HASH, None)}
  }
  #[inline]
  pub fn text_cnt(&self) -> u64 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<u64>(ELFLoaderEffects::VT_TEXT_CNT, Some(0)).unwrap()}
  }
  #[inline]
  pub fn text_off(&self) -> u64 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<u64>(ELFLoaderEffects::VT_TEXT_OFF, Some(0)).unwrap()}
  }
  #[inline]
  pub fn entry_pc(&self) -> u64 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<u64>(ELFLoaderEffects::VT_ENTRY_PC, Some(0)).unwrap()}
  }
  #[inline]
  pub fn calldests_hash(&self) -> Option<&'a XXHash> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<XXHash>(ELFLoaderEffects::VT_CALLDESTS_HASH, None)}
  }
}

impl flatbuffers::Verifiable for ELFLoaderEffects<'_> {
  #[inline]
  fn run_verifier(
    v: &mut flatbuffers::Verifier, pos: usize
  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
    use self::flatbuffers::Verifiable;
    v.visit_table(pos)?
     .visit_field::<u8>("err_code", Self::VT_ERR_CODE, false)?
     .visit_field::<XXHash>("rodata_hash", Self::VT_RODATA_HASH, false)?
     .visit_field::<u64>("text_cnt", Self::VT_TEXT_CNT, false)?
     .visit_field::<u64>("text_off", Self::VT_TEXT_OFF, false)?
     .visit_field::<u64>("entry_pc", Self::VT_ENTRY_PC, false)?
     .visit_field::<XXHash>("calldests_hash", Self::VT_CALLDESTS_HASH, false)?
     .finish();
    Ok(())
  }
}
pub struct ELFLoaderEffectsArgs<'a> {
    pub err_code: u8,
    pub rodata_hash: Option<&'a XXHash>,
    pub text_cnt: u64,
    pub text_off: u64,
    pub entry_pc: u64,
    pub calldests_hash: Option<&'a XXHash>,
}
impl<'a> Default for ELFLoaderEffectsArgs<'a> {
  #[inline]
  fn default() -> Self {
    ELFLoaderEffectsArgs {
      err_code: 0,
      rodata_hash: None,
      text_cnt: 0,
      text_off: 0,
      entry_pc: 0,
      calldests_hash: None,
    }
  }
}

pub struct ELFLoaderEffectsBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ELFLoaderEffectsBuilder<'a, 'b, A> {
  #[inline]
  pub fn add_err_code(&mut self, err_code: u8) {
    self.fbb_.push_slot::<u8>(ELFLoaderEffects::VT_ERR_CODE, err_code, 0);
  }
  #[inline]
  pub fn add_rodata_hash(&mut self, rodata_hash: &XXHash) {
    self.fbb_.push_slot_always::<&XXHash>(ELFLoaderEffects::VT_RODATA_HASH, rodata_hash);
  }
  #[inline]
  pub fn add_text_cnt(&mut self, text_cnt: u64) {
    self.fbb_.push_slot::<u64>(ELFLoaderEffects::VT_TEXT_CNT, text_cnt, 0);
  }
  #[inline]
  pub fn add_text_off(&mut self, text_off: u64) {
    self.fbb_.push_slot::<u64>(ELFLoaderEffects::VT_TEXT_OFF, text_off, 0);
  }
  #[inline]
  pub fn add_entry_pc(&mut self, entry_pc: u64) {
    self.fbb_.push_slot::<u64>(ELFLoaderEffects::VT_ENTRY_PC, entry_pc, 0);
  }
  #[inline]
  pub fn add_calldests_hash(&mut self, calldests_hash: &XXHash) {
    self.fbb_.push_slot_always::<&XXHash>(ELFLoaderEffects::VT_CALLDESTS_HASH, calldests_hash);
  }
  #[inline]
  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ELFLoaderEffectsBuilder<'a, 'b, A> {
    let start = _fbb.start_table();
    ELFLoaderEffectsBuilder {
      fbb_: _fbb,
      start_: start,
    }
  }
  #[inline]
  pub fn finish(self) -> flatbuffers::WIPOffset<ELFLoaderEffects<'a>> {
    let o = self.fbb_.end_table(self.start_);
    flatbuffers::WIPOffset::new(o.value())
  }
}

impl core::fmt::Debug for ELFLoaderEffects<'_> {
  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
    let mut ds = f.debug_struct("ELFLoaderEffects");
      ds.field("err_code", &self.err_code());
      ds.field("rodata_hash", &self.rodata_hash());
      ds.field("text_cnt", &self.text_cnt());
      ds.field("text_off", &self.text_off());
      ds.field("entry_pc", &self.entry_pc());
      ds.field("calldests_hash", &self.calldests_hash());
      ds.finish()
  }
}
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
pub struct ELFLoaderEffectsT {
  pub err_code: u8,
  pub rodata_hash: Option<XXHashT>,
  pub text_cnt: u64,
  pub text_off: u64,
  pub entry_pc: u64,
  pub calldests_hash: Option<XXHashT>,
}
impl Default for ELFLoaderEffectsT {
  fn default() -> Self {
    Self {
      err_code: 0,
      rodata_hash: None,
      text_cnt: 0,
      text_off: 0,
      entry_pc: 0,
      calldests_hash: None,
    }
  }
}
impl ELFLoaderEffectsT {
  pub fn pack<'b, A: flatbuffers::Allocator + 'b>(
    &self,
    _fbb: &mut flatbuffers::FlatBufferBuilder<'b, A>
  ) -> flatbuffers::WIPOffset<ELFLoaderEffects<'b>> {
    let err_code = self.err_code;
    let rodata_hash_tmp = self.rodata_hash.as_ref().map(|x| x.pack());
    let rodata_hash = rodata_hash_tmp.as_ref();
    let text_cnt = self.text_cnt;
    let text_off = self.text_off;
    let entry_pc = self.entry_pc;
    let calldests_hash_tmp = self.calldests_hash.as_ref().map(|x| x.pack());
    let calldests_hash = calldests_hash_tmp.as_ref();
    ELFLoaderEffects::create(_fbb, &ELFLoaderEffectsArgs{
      err_code,
      rodata_hash,
      text_cnt,
      text_off,
      entry_pc,
      calldests_hash,
    })
  }
}
pub enum ELFLoaderFixtureOffset {}
#[derive(Copy, Clone, PartialEq)]

pub struct ELFLoaderFixture<'a> {
  pub _tab: flatbuffers::Table<'a>,
}

impl<'a> flatbuffers::Follow<'a> for ELFLoaderFixture<'a> {
  type Inner = ELFLoaderFixture<'a>;
  #[inline]
  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
    Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
  }
}

impl<'a> ELFLoaderFixture<'a> {
  pub const VT_METADATA: flatbuffers::VOffsetT = 4;
  pub const VT_INPUT: flatbuffers::VOffsetT = 6;
  pub const VT_OUTPUT: flatbuffers::VOffsetT = 8;

  #[inline]
  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
    ELFLoaderFixture { _tab: table }
  }
  #[allow(unused_mut)]
  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
    args: &'args ELFLoaderFixtureArgs<'args>
  ) -> flatbuffers::WIPOffset<ELFLoaderFixture<'bldr>> {
    let mut builder = ELFLoaderFixtureBuilder::new(_fbb);
    if let Some(x) = args.output { builder.add_output(x); }
    if let Some(x) = args.input { builder.add_input(x); }
    if let Some(x) = args.metadata { builder.add_metadata(x); }
    builder.finish()
  }

  pub fn unpack(&self) -> ELFLoaderFixtureT {
    let metadata = {
      let x = self.metadata();
      Box::new(x.unpack())
    };
    let input = {
      let x = self.input();
      Box::new(x.unpack())
    };
    let output = {
      let x = self.output();
      Box::new(x.unpack())
    };
    ELFLoaderFixtureT {
      metadata,
      input,
      output,
    }
  }

  #[inline]
  pub fn metadata(&self) -> FixtureMetadata<'a> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<FixtureMetadata>>(ELFLoaderFixture::VT_METADATA, None).unwrap()}
  }
  #[inline]
  pub fn input(&self) -> ELFLoaderCtx<'a> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<ELFLoaderCtx>>(ELFLoaderFixture::VT_INPUT, None).unwrap()}
  }
  #[inline]
  pub fn output(&self) -> ELFLoaderEffects<'a> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<ELFLoaderEffects>>(ELFLoaderFixture::VT_OUTPUT, None).unwrap()}
  }
}

impl flatbuffers::Verifiable for ELFLoaderFixture<'_> {
  #[inline]
  fn run_verifier(
    v: &mut flatbuffers::Verifier, pos: usize
  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
    use self::flatbuffers::Verifiable;
    v.visit_table(pos)?
     .visit_field::<flatbuffers::ForwardsUOffset<FixtureMetadata>>("metadata", Self::VT_METADATA, true)?
     .visit_field::<flatbuffers::ForwardsUOffset<ELFLoaderCtx>>("input", Self::VT_INPUT, true)?
     .visit_field::<flatbuffers::ForwardsUOffset<ELFLoaderEffects>>("output", Self::VT_OUTPUT, true)?
     .finish();
    Ok(())
  }
}
pub struct ELFLoaderFixtureArgs<'a> {
    pub metadata: Option<flatbuffers::WIPOffset<FixtureMetadata<'a>>>,
    pub input: Option<flatbuffers::WIPOffset<ELFLoaderCtx<'a>>>,
    pub output: Option<flatbuffers::WIPOffset<ELFLoaderEffects<'a>>>,
}
impl<'a> Default for ELFLoaderFixtureArgs<'a> {
  #[inline]
  fn default() -> Self {
    ELFLoaderFixtureArgs {
      metadata: None, // required field
      input: None, // required field
      output: None, // required field
    }
  }
}

pub struct ELFLoaderFixtureBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ELFLoaderFixtureBuilder<'a, 'b, A> {
  #[inline]
  pub fn add_metadata(&mut self, metadata: flatbuffers::WIPOffset<FixtureMetadata<'b >>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<FixtureMetadata>>(ELFLoaderFixture::VT_METADATA, metadata);
  }
  #[inline]
  pub fn add_input(&mut self, input: flatbuffers::WIPOffset<ELFLoaderCtx<'b >>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<ELFLoaderCtx>>(ELFLoaderFixture::VT_INPUT, input);
  }
  #[inline]
  pub fn add_output(&mut self, output: flatbuffers::WIPOffset<ELFLoaderEffects<'b >>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<ELFLoaderEffects>>(ELFLoaderFixture::VT_OUTPUT, output);
  }
  #[inline]
  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ELFLoaderFixtureBuilder<'a, 'b, A> {
    let start = _fbb.start_table();
    ELFLoaderFixtureBuilder {
      fbb_: _fbb,
      start_: start,
    }
  }
  #[inline]
  pub fn finish(self) -> flatbuffers::WIPOffset<ELFLoaderFixture<'a>> {
    let o = self.fbb_.end_table(self.start_);
    self.fbb_.required(o, ELFLoaderFixture::VT_METADATA,"metadata");
    self.fbb_.required(o, ELFLoaderFixture::VT_INPUT,"input");
    self.fbb_.required(o, ELFLoaderFixture::VT_OUTPUT,"output");
    flatbuffers::WIPOffset::new(o.value())
  }
}

impl core::fmt::Debug for ELFLoaderFixture<'_> {
  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
    let mut ds = f.debug_struct("ELFLoaderFixture");
      ds.field("metadata", &self.metadata());
      ds.field("input", &self.input());
      ds.field("output", &self.output());
      ds.finish()
  }
}
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
pub struct ELFLoaderFixtureT {
  pub metadata: Box<FixtureMetadataT>,
  pub input: Box<ELFLoaderCtxT>,
  pub output: Box<ELFLoaderEffectsT>,
}
impl Default for ELFLoaderFixtureT {
  fn default() -> Self {
    Self {
      metadata: Default::default(),
      input: Default::default(),
      output: Default::default(),
    }
  }
}
impl ELFLoaderFixtureT {
  pub fn pack<'b, A: flatbuffers::Allocator + 'b>(
    &self,
    _fbb: &mut flatbuffers::FlatBufferBuilder<'b, A>
  ) -> flatbuffers::WIPOffset<ELFLoaderFixture<'b>> {
    let metadata = Some({
      let x = &self.metadata;
      x.pack(_fbb)
    });
    let input = Some({
      let x = &self.input;
      x.pack(_fbb)
    });
    let output = Some({
      let x = &self.output;
      x.pack(_fbb)
    });
    ELFLoaderFixture::create(_fbb, &ELFLoaderFixtureArgs{
      metadata,
      input,
      output,
    })
  }
}
}  // pub mod v2
}  // pub mod sealevel
}  // pub mod solana
}  // pub mod org