nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

ndb_profile.rs (19716B)


      1 // automatically generated by the FlatBuffers compiler, do not modify
      2 
      3 
      4 // @generated
      5 
      6 use core::mem;
      7 use core::cmp::Ordering;
      8 
      9 extern crate flatbuffers;
     10 use self::flatbuffers::{EndianScalar, Follow};
     11 
     12 pub enum NdbProfileOffset {}
     13 #[derive(Copy, Clone, PartialEq)]
     14 
     15 pub struct NdbProfile<'a> {
     16   pub _tab: flatbuffers::Table<'a>,
     17 }
     18 
     19 impl<'a> flatbuffers::Follow<'a> for NdbProfile<'a> {
     20   type Inner = NdbProfile<'a>;
     21   #[inline]
     22   unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
     23     Self { _tab: flatbuffers::Table::new(buf, loc) }
     24   }
     25 }
     26 
     27 impl<'a> NdbProfile<'a> {
     28   pub const VT_NAME: flatbuffers::VOffsetT = 4;
     29   pub const VT_WEBSITE: flatbuffers::VOffsetT = 6;
     30   pub const VT_ABOUT: flatbuffers::VOffsetT = 8;
     31   pub const VT_LUD16: flatbuffers::VOffsetT = 10;
     32   pub const VT_BANNER: flatbuffers::VOffsetT = 12;
     33   pub const VT_DISPLAY_NAME: flatbuffers::VOffsetT = 14;
     34   pub const VT_REACTIONS: flatbuffers::VOffsetT = 16;
     35   pub const VT_PICTURE: flatbuffers::VOffsetT = 18;
     36   pub const VT_NIP05: flatbuffers::VOffsetT = 20;
     37   pub const VT_DAMUS_DONATION: flatbuffers::VOffsetT = 22;
     38   pub const VT_DAMUS_DONATION_V2: flatbuffers::VOffsetT = 24;
     39   pub const VT_LUD06: flatbuffers::VOffsetT = 26;
     40 
     41   #[inline]
     42   pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
     43     NdbProfile { _tab: table }
     44   }
     45   #[allow(unused_mut)]
     46   pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
     47     _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
     48     args: &'args NdbProfileArgs<'args>
     49   ) -> flatbuffers::WIPOffset<NdbProfile<'bldr>> {
     50     let mut builder = NdbProfileBuilder::new(_fbb);
     51     if let Some(x) = args.lud06 { builder.add_lud06(x); }
     52     builder.add_damus_donation_v2(args.damus_donation_v2);
     53     builder.add_damus_donation(args.damus_donation);
     54     if let Some(x) = args.nip05 { builder.add_nip05(x); }
     55     if let Some(x) = args.picture { builder.add_picture(x); }
     56     if let Some(x) = args.display_name { builder.add_display_name(x); }
     57     if let Some(x) = args.banner { builder.add_banner(x); }
     58     if let Some(x) = args.lud16 { builder.add_lud16(x); }
     59     if let Some(x) = args.about { builder.add_about(x); }
     60     if let Some(x) = args.website { builder.add_website(x); }
     61     if let Some(x) = args.name { builder.add_name(x); }
     62     builder.add_reactions(args.reactions);
     63     builder.finish()
     64   }
     65 
     66 
     67   #[inline]
     68   pub fn name(&self) -> Option<&'a str> {
     69     // Safety:
     70     // Created from valid Table for this object
     71     // which contains a valid value in this slot
     72     unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(NdbProfile::VT_NAME, None)}
     73   }
     74   #[inline]
     75   pub fn website(&self) -> Option<&'a str> {
     76     // Safety:
     77     // Created from valid Table for this object
     78     // which contains a valid value in this slot
     79     unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(NdbProfile::VT_WEBSITE, None)}
     80   }
     81   #[inline]
     82   pub fn about(&self) -> Option<&'a str> {
     83     // Safety:
     84     // Created from valid Table for this object
     85     // which contains a valid value in this slot
     86     unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(NdbProfile::VT_ABOUT, None)}
     87   }
     88   #[inline]
     89   pub fn lud16(&self) -> Option<&'a str> {
     90     // Safety:
     91     // Created from valid Table for this object
     92     // which contains a valid value in this slot
     93     unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(NdbProfile::VT_LUD16, None)}
     94   }
     95   #[inline]
     96   pub fn banner(&self) -> Option<&'a str> {
     97     // Safety:
     98     // Created from valid Table for this object
     99     // which contains a valid value in this slot
    100     unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(NdbProfile::VT_BANNER, None)}
    101   }
    102   #[inline]
    103   pub fn display_name(&self) -> Option<&'a str> {
    104     // Safety:
    105     // Created from valid Table for this object
    106     // which contains a valid value in this slot
    107     unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(NdbProfile::VT_DISPLAY_NAME, None)}
    108   }
    109   #[inline]
    110   pub fn reactions(&self) -> bool {
    111     // Safety:
    112     // Created from valid Table for this object
    113     // which contains a valid value in this slot
    114     unsafe { self._tab.get::<bool>(NdbProfile::VT_REACTIONS, Some(true)).unwrap()}
    115   }
    116   #[inline]
    117   pub fn picture(&self) -> Option<&'a str> {
    118     // Safety:
    119     // Created from valid Table for this object
    120     // which contains a valid value in this slot
    121     unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(NdbProfile::VT_PICTURE, None)}
    122   }
    123   #[inline]
    124   pub fn nip05(&self) -> Option<&'a str> {
    125     // Safety:
    126     // Created from valid Table for this object
    127     // which contains a valid value in this slot
    128     unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(NdbProfile::VT_NIP05, None)}
    129   }
    130   #[inline]
    131   pub fn damus_donation(&self) -> i32 {
    132     // Safety:
    133     // Created from valid Table for this object
    134     // which contains a valid value in this slot
    135     unsafe { self._tab.get::<i32>(NdbProfile::VT_DAMUS_DONATION, Some(0)).unwrap()}
    136   }
    137   #[inline]
    138   pub fn damus_donation_v2(&self) -> i32 {
    139     // Safety:
    140     // Created from valid Table for this object
    141     // which contains a valid value in this slot
    142     unsafe { self._tab.get::<i32>(NdbProfile::VT_DAMUS_DONATION_V2, Some(0)).unwrap()}
    143   }
    144   #[inline]
    145   pub fn lud06(&self) -> Option<&'a str> {
    146     // Safety:
    147     // Created from valid Table for this object
    148     // which contains a valid value in this slot
    149     unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(NdbProfile::VT_LUD06, None)}
    150   }
    151 }
    152 
    153 impl flatbuffers::Verifiable for NdbProfile<'_> {
    154   #[inline]
    155   fn run_verifier(
    156     v: &mut flatbuffers::Verifier, pos: usize
    157   ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
    158     use self::flatbuffers::Verifiable;
    159     v.visit_table(pos)?
    160      .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
    161      .visit_field::<flatbuffers::ForwardsUOffset<&str>>("website", Self::VT_WEBSITE, false)?
    162      .visit_field::<flatbuffers::ForwardsUOffset<&str>>("about", Self::VT_ABOUT, false)?
    163      .visit_field::<flatbuffers::ForwardsUOffset<&str>>("lud16", Self::VT_LUD16, false)?
    164      .visit_field::<flatbuffers::ForwardsUOffset<&str>>("banner", Self::VT_BANNER, false)?
    165      .visit_field::<flatbuffers::ForwardsUOffset<&str>>("display_name", Self::VT_DISPLAY_NAME, false)?
    166      .visit_field::<bool>("reactions", Self::VT_REACTIONS, false)?
    167      .visit_field::<flatbuffers::ForwardsUOffset<&str>>("picture", Self::VT_PICTURE, false)?
    168      .visit_field::<flatbuffers::ForwardsUOffset<&str>>("nip05", Self::VT_NIP05, false)?
    169      .visit_field::<i32>("damus_donation", Self::VT_DAMUS_DONATION, false)?
    170      .visit_field::<i32>("damus_donation_v2", Self::VT_DAMUS_DONATION_V2, false)?
    171      .visit_field::<flatbuffers::ForwardsUOffset<&str>>("lud06", Self::VT_LUD06, false)?
    172      .finish();
    173     Ok(())
    174   }
    175 }
    176 pub struct NdbProfileArgs<'a> {
    177     pub name: Option<flatbuffers::WIPOffset<&'a str>>,
    178     pub website: Option<flatbuffers::WIPOffset<&'a str>>,
    179     pub about: Option<flatbuffers::WIPOffset<&'a str>>,
    180     pub lud16: Option<flatbuffers::WIPOffset<&'a str>>,
    181     pub banner: Option<flatbuffers::WIPOffset<&'a str>>,
    182     pub display_name: Option<flatbuffers::WIPOffset<&'a str>>,
    183     pub reactions: bool,
    184     pub picture: Option<flatbuffers::WIPOffset<&'a str>>,
    185     pub nip05: Option<flatbuffers::WIPOffset<&'a str>>,
    186     pub damus_donation: i32,
    187     pub damus_donation_v2: i32,
    188     pub lud06: Option<flatbuffers::WIPOffset<&'a str>>,
    189 }
    190 impl<'a> Default for NdbProfileArgs<'a> {
    191   #[inline]
    192   fn default() -> Self {
    193     NdbProfileArgs {
    194       name: None,
    195       website: None,
    196       about: None,
    197       lud16: None,
    198       banner: None,
    199       display_name: None,
    200       reactions: true,
    201       picture: None,
    202       nip05: None,
    203       damus_donation: 0,
    204       damus_donation_v2: 0,
    205       lud06: None,
    206     }
    207   }
    208 }
    209 
    210 pub struct NdbProfileBuilder<'a: 'b, 'b> {
    211   fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
    212   start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
    213 }
    214 impl<'a: 'b, 'b> NdbProfileBuilder<'a, 'b> {
    215   #[inline]
    216   pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
    217     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(NdbProfile::VT_NAME, name);
    218   }
    219   #[inline]
    220   pub fn add_website(&mut self, website: flatbuffers::WIPOffset<&'b  str>) {
    221     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(NdbProfile::VT_WEBSITE, website);
    222   }
    223   #[inline]
    224   pub fn add_about(&mut self, about: flatbuffers::WIPOffset<&'b  str>) {
    225     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(NdbProfile::VT_ABOUT, about);
    226   }
    227   #[inline]
    228   pub fn add_lud16(&mut self, lud16: flatbuffers::WIPOffset<&'b  str>) {
    229     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(NdbProfile::VT_LUD16, lud16);
    230   }
    231   #[inline]
    232   pub fn add_banner(&mut self, banner: flatbuffers::WIPOffset<&'b  str>) {
    233     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(NdbProfile::VT_BANNER, banner);
    234   }
    235   #[inline]
    236   pub fn add_display_name(&mut self, display_name: flatbuffers::WIPOffset<&'b  str>) {
    237     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(NdbProfile::VT_DISPLAY_NAME, display_name);
    238   }
    239   #[inline]
    240   pub fn add_reactions(&mut self, reactions: bool) {
    241     self.fbb_.push_slot::<bool>(NdbProfile::VT_REACTIONS, reactions, true);
    242   }
    243   #[inline]
    244   pub fn add_picture(&mut self, picture: flatbuffers::WIPOffset<&'b  str>) {
    245     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(NdbProfile::VT_PICTURE, picture);
    246   }
    247   #[inline]
    248   pub fn add_nip05(&mut self, nip05: flatbuffers::WIPOffset<&'b  str>) {
    249     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(NdbProfile::VT_NIP05, nip05);
    250   }
    251   #[inline]
    252   pub fn add_damus_donation(&mut self, damus_donation: i32) {
    253     self.fbb_.push_slot::<i32>(NdbProfile::VT_DAMUS_DONATION, damus_donation, 0);
    254   }
    255   #[inline]
    256   pub fn add_damus_donation_v2(&mut self, damus_donation_v2: i32) {
    257     self.fbb_.push_slot::<i32>(NdbProfile::VT_DAMUS_DONATION_V2, damus_donation_v2, 0);
    258   }
    259   #[inline]
    260   pub fn add_lud06(&mut self, lud06: flatbuffers::WIPOffset<&'b  str>) {
    261     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(NdbProfile::VT_LUD06, lud06);
    262   }
    263   #[inline]
    264   pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> NdbProfileBuilder<'a, 'b> {
    265     let start = _fbb.start_table();
    266     NdbProfileBuilder {
    267       fbb_: _fbb,
    268       start_: start,
    269     }
    270   }
    271   #[inline]
    272   pub fn finish(self) -> flatbuffers::WIPOffset<NdbProfile<'a>> {
    273     let o = self.fbb_.end_table(self.start_);
    274     flatbuffers::WIPOffset::new(o.value())
    275   }
    276 }
    277 
    278 impl core::fmt::Debug for NdbProfile<'_> {
    279   fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
    280     let mut ds = f.debug_struct("NdbProfile");
    281       ds.field("name", &self.name());
    282       ds.field("website", &self.website());
    283       ds.field("about", &self.about());
    284       ds.field("lud16", &self.lud16());
    285       ds.field("banner", &self.banner());
    286       ds.field("display_name", &self.display_name());
    287       ds.field("reactions", &self.reactions());
    288       ds.field("picture", &self.picture());
    289       ds.field("nip05", &self.nip05());
    290       ds.field("damus_donation", &self.damus_donation());
    291       ds.field("damus_donation_v2", &self.damus_donation_v2());
    292       ds.field("lud06", &self.lud06());
    293       ds.finish()
    294   }
    295 }
    296 pub enum NdbProfileRecordOffset {}
    297 #[derive(Copy, Clone, PartialEq)]
    298 
    299 pub struct NdbProfileRecord<'a> {
    300   pub _tab: flatbuffers::Table<'a>,
    301 }
    302 
    303 impl<'a> flatbuffers::Follow<'a> for NdbProfileRecord<'a> {
    304   type Inner = NdbProfileRecord<'a>;
    305   #[inline]
    306   unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
    307     Self { _tab: flatbuffers::Table::new(buf, loc) }
    308   }
    309 }
    310 
    311 impl<'a> NdbProfileRecord<'a> {
    312   pub const VT_PROFILE: flatbuffers::VOffsetT = 4;
    313   pub const VT_RECEIVED_AT: flatbuffers::VOffsetT = 6;
    314   pub const VT_NOTE_KEY: flatbuffers::VOffsetT = 8;
    315   pub const VT_LNURL: flatbuffers::VOffsetT = 10;
    316 
    317   #[inline]
    318   pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
    319     NdbProfileRecord { _tab: table }
    320   }
    321   #[allow(unused_mut)]
    322   pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
    323     _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
    324     args: &'args NdbProfileRecordArgs<'args>
    325   ) -> flatbuffers::WIPOffset<NdbProfileRecord<'bldr>> {
    326     let mut builder = NdbProfileRecordBuilder::new(_fbb);
    327     builder.add_note_key(args.note_key);
    328     builder.add_received_at(args.received_at);
    329     if let Some(x) = args.lnurl { builder.add_lnurl(x); }
    330     if let Some(x) = args.profile { builder.add_profile(x); }
    331     builder.finish()
    332   }
    333 
    334 
    335   #[inline]
    336   pub fn profile(&self) -> Option<NdbProfile<'a>> {
    337     // Safety:
    338     // Created from valid Table for this object
    339     // which contains a valid value in this slot
    340     unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<NdbProfile>>(NdbProfileRecord::VT_PROFILE, None)}
    341   }
    342   #[inline]
    343   pub fn received_at(&self) -> u64 {
    344     // Safety:
    345     // Created from valid Table for this object
    346     // which contains a valid value in this slot
    347     unsafe { self._tab.get::<u64>(NdbProfileRecord::VT_RECEIVED_AT, Some(0)).unwrap()}
    348   }
    349   #[inline]
    350   pub fn note_key(&self) -> u64 {
    351     // Safety:
    352     // Created from valid Table for this object
    353     // which contains a valid value in this slot
    354     unsafe { self._tab.get::<u64>(NdbProfileRecord::VT_NOTE_KEY, Some(0)).unwrap()}
    355   }
    356   #[inline]
    357   pub fn lnurl(&self) -> Option<&'a str> {
    358     // Safety:
    359     // Created from valid Table for this object
    360     // which contains a valid value in this slot
    361     unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(NdbProfileRecord::VT_LNURL, None)}
    362   }
    363 }
    364 
    365 impl flatbuffers::Verifiable for NdbProfileRecord<'_> {
    366   #[inline]
    367   fn run_verifier(
    368     v: &mut flatbuffers::Verifier, pos: usize
    369   ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
    370     use self::flatbuffers::Verifiable;
    371     v.visit_table(pos)?
    372      .visit_field::<flatbuffers::ForwardsUOffset<NdbProfile>>("profile", Self::VT_PROFILE, false)?
    373      .visit_field::<u64>("received_at", Self::VT_RECEIVED_AT, false)?
    374      .visit_field::<u64>("note_key", Self::VT_NOTE_KEY, false)?
    375      .visit_field::<flatbuffers::ForwardsUOffset<&str>>("lnurl", Self::VT_LNURL, false)?
    376      .finish();
    377     Ok(())
    378   }
    379 }
    380 pub struct NdbProfileRecordArgs<'a> {
    381     pub profile: Option<flatbuffers::WIPOffset<NdbProfile<'a>>>,
    382     pub received_at: u64,
    383     pub note_key: u64,
    384     pub lnurl: Option<flatbuffers::WIPOffset<&'a str>>,
    385 }
    386 impl<'a> Default for NdbProfileRecordArgs<'a> {
    387   #[inline]
    388   fn default() -> Self {
    389     NdbProfileRecordArgs {
    390       profile: None,
    391       received_at: 0,
    392       note_key: 0,
    393       lnurl: None,
    394     }
    395   }
    396 }
    397 
    398 pub struct NdbProfileRecordBuilder<'a: 'b, 'b> {
    399   fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
    400   start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
    401 }
    402 impl<'a: 'b, 'b> NdbProfileRecordBuilder<'a, 'b> {
    403   #[inline]
    404   pub fn add_profile(&mut self, profile: flatbuffers::WIPOffset<NdbProfile<'b >>) {
    405     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<NdbProfile>>(NdbProfileRecord::VT_PROFILE, profile);
    406   }
    407   #[inline]
    408   pub fn add_received_at(&mut self, received_at: u64) {
    409     self.fbb_.push_slot::<u64>(NdbProfileRecord::VT_RECEIVED_AT, received_at, 0);
    410   }
    411   #[inline]
    412   pub fn add_note_key(&mut self, note_key: u64) {
    413     self.fbb_.push_slot::<u64>(NdbProfileRecord::VT_NOTE_KEY, note_key, 0);
    414   }
    415   #[inline]
    416   pub fn add_lnurl(&mut self, lnurl: flatbuffers::WIPOffset<&'b  str>) {
    417     self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(NdbProfileRecord::VT_LNURL, lnurl);
    418   }
    419   #[inline]
    420   pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> NdbProfileRecordBuilder<'a, 'b> {
    421     let start = _fbb.start_table();
    422     NdbProfileRecordBuilder {
    423       fbb_: _fbb,
    424       start_: start,
    425     }
    426   }
    427   #[inline]
    428   pub fn finish(self) -> flatbuffers::WIPOffset<NdbProfileRecord<'a>> {
    429     let o = self.fbb_.end_table(self.start_);
    430     flatbuffers::WIPOffset::new(o.value())
    431   }
    432 }
    433 
    434 impl core::fmt::Debug for NdbProfileRecord<'_> {
    435   fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
    436     let mut ds = f.debug_struct("NdbProfileRecord");
    437       ds.field("profile", &self.profile());
    438       ds.field("received_at", &self.received_at());
    439       ds.field("note_key", &self.note_key());
    440       ds.field("lnurl", &self.lnurl());
    441       ds.finish()
    442   }
    443 }
    444 #[inline]
    445 /// Verifies that a buffer of bytes contains a `NdbProfileRecord`
    446 /// and returns it.
    447 /// Note that verification is still experimental and may not
    448 /// catch every error, or be maximally performant. For the
    449 /// previous, unchecked, behavior use
    450 /// `root_as_ndb_profile_record_unchecked`.
    451 pub fn root_as_ndb_profile_record(buf: &[u8]) -> Result<NdbProfileRecord, flatbuffers::InvalidFlatbuffer> {
    452   flatbuffers::root::<NdbProfileRecord>(buf)
    453 }
    454 #[inline]
    455 /// Verifies that a buffer of bytes contains a size prefixed
    456 /// `NdbProfileRecord` and returns it.
    457 /// Note that verification is still experimental and may not
    458 /// catch every error, or be maximally performant. For the
    459 /// previous, unchecked, behavior use
    460 /// `size_prefixed_root_as_ndb_profile_record_unchecked`.
    461 pub fn size_prefixed_root_as_ndb_profile_record(buf: &[u8]) -> Result<NdbProfileRecord, flatbuffers::InvalidFlatbuffer> {
    462   flatbuffers::size_prefixed_root::<NdbProfileRecord>(buf)
    463 }
    464 #[inline]
    465 /// Verifies, with the given options, that a buffer of bytes
    466 /// contains a `NdbProfileRecord` and returns it.
    467 /// Note that verification is still experimental and may not
    468 /// catch every error, or be maximally performant. For the
    469 /// previous, unchecked, behavior use
    470 /// `root_as_ndb_profile_record_unchecked`.
    471 pub fn root_as_ndb_profile_record_with_opts<'b, 'o>(
    472   opts: &'o flatbuffers::VerifierOptions,
    473   buf: &'b [u8],
    474 ) -> Result<NdbProfileRecord<'b>, flatbuffers::InvalidFlatbuffer> {
    475   flatbuffers::root_with_opts::<NdbProfileRecord<'b>>(opts, buf)
    476 }
    477 #[inline]
    478 /// Verifies, with the given verifier options, that a buffer of
    479 /// bytes contains a size prefixed `NdbProfileRecord` and returns
    480 /// it. Note that verification is still experimental and may not
    481 /// catch every error, or be maximally performant. For the
    482 /// previous, unchecked, behavior use
    483 /// `root_as_ndb_profile_record_unchecked`.
    484 pub fn size_prefixed_root_as_ndb_profile_record_with_opts<'b, 'o>(
    485   opts: &'o flatbuffers::VerifierOptions,
    486   buf: &'b [u8],
    487 ) -> Result<NdbProfileRecord<'b>, flatbuffers::InvalidFlatbuffer> {
    488   flatbuffers::size_prefixed_root_with_opts::<NdbProfileRecord<'b>>(opts, buf)
    489 }
    490 #[inline]
    491 /// Assumes, without verification, that a buffer of bytes contains a NdbProfileRecord and returns it.
    492 /// # Safety
    493 /// Callers must trust the given bytes do indeed contain a valid `NdbProfileRecord`.
    494 pub unsafe fn root_as_ndb_profile_record_unchecked(buf: &[u8]) -> NdbProfileRecord {
    495   flatbuffers::root_unchecked::<NdbProfileRecord>(buf)
    496 }
    497 #[inline]
    498 /// Assumes, without verification, that a buffer of bytes contains a size prefixed NdbProfileRecord and returns it.
    499 /// # Safety
    500 /// Callers must trust the given bytes do indeed contain a valid size prefixed `NdbProfileRecord`.
    501 pub unsafe fn size_prefixed_root_as_ndb_profile_record_unchecked(buf: &[u8]) -> NdbProfileRecord {
    502   flatbuffers::size_prefixed_root_unchecked::<NdbProfileRecord>(buf)
    503 }
    504 #[inline]
    505 pub fn finish_ndb_profile_record_buffer<'a, 'b>(
    506     fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
    507     root: flatbuffers::WIPOffset<NdbProfileRecord<'a>>) {
    508   fbb.finish(root, None);
    509 }
    510 
    511 #[inline]
    512 pub fn finish_size_prefixed_ndb_profile_record_buffer<'a, 'b>(fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>, root: flatbuffers::WIPOffset<NdbProfileRecord<'a>>) {
    513   fbb.finish_size_prefixed(root, None);
    514 }