// automatically generated by the FlatBuffers compiler, do not modify // @generated use core::mem; use core::cmp::Ordering; extern crate flatbuffers; use self::flatbuffers::{EndianScalar, Follow}; pub enum PostGirlConfigTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct PostGirlConfigTemplate<'a> { pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for PostGirlConfigTemplate<'a> { type Inner = PostGirlConfigTemplate<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { _tab: flatbuffers::Table::new(buf, loc) } } } impl<'a> PostGirlConfigTemplate<'a> { pub const VT_ID: flatbuffers::VOffsetT = 4; pub const VT_NAME: flatbuffers::VOffsetT = 6; pub const VT_TAG: flatbuffers::VOffsetT = 8; pub const VT_UNK_1: flatbuffers::VOffsetT = 10; pub const VT_UNK_2: flatbuffers::VOffsetT = 12; pub const VT_UNK_3: flatbuffers::VOffsetT = 14; pub const VT_ROLE_ICON_NAME: flatbuffers::VOffsetT = 16; pub const VT_UNK_4: flatbuffers::VOffsetT = 18; pub const VT_UNK_5: flatbuffers::VOffsetT = 20; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { PostGirlConfigTemplate { _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 PostGirlConfigTemplateArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = PostGirlConfigTemplateBuilder::new(_fbb); if let Some(x) = args.unk_5 { builder.add_unk_5(x); } if let Some(x) = args.unk_4 { builder.add_unk_4(x); } if let Some(x) = args.role_icon_name { builder.add_role_icon_name(x); } builder.add_unk_3(args.unk_3); if let Some(x) = args.unk_2 { builder.add_unk_2(x); } builder.add_unk_1(args.unk_1); if let Some(x) = args.tag { builder.add_tag(x); } if let Some(x) = args.name { builder.add_name(x); } builder.add_id(args.id); builder.finish() } #[inline] pub fn id(&self) -> u32 { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab.get::(PostGirlConfigTemplate::VT_ID, Some(0)).unwrap()} } #[inline] pub fn name(&self) -> Option<&'a str> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab.get::>(PostGirlConfigTemplate::VT_NAME, None)} } #[inline] pub fn tag(&self) -> Option<&'a str> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab.get::>(PostGirlConfigTemplate::VT_TAG, None)} } #[inline] pub fn unk_1(&self) -> i32 { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab.get::(PostGirlConfigTemplate::VT_UNK_1, Some(0)).unwrap()} } #[inline] pub fn unk_2(&self) -> Option<&'a str> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab.get::>(PostGirlConfigTemplate::VT_UNK_2, None)} } #[inline] pub fn unk_3(&self) -> i32 { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab.get::(PostGirlConfigTemplate::VT_UNK_3, Some(0)).unwrap()} } #[inline] pub fn role_icon_name(&self) -> Option<&'a str> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab.get::>(PostGirlConfigTemplate::VT_ROLE_ICON_NAME, None)} } #[inline] pub fn unk_4(&self) -> Option<&'a str> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab.get::>(PostGirlConfigTemplate::VT_UNK_4, None)} } #[inline] pub fn unk_5(&self) -> Option> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab.get::>>(PostGirlConfigTemplate::VT_UNK_5, None)} } } impl flatbuffers::Verifiable for PostGirlConfigTemplate<'_> { #[inline] fn run_verifier( v: &mut flatbuffers::Verifier, pos: usize ) -> Result<(), flatbuffers::InvalidFlatbuffer> { use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_field::("id", Self::VT_ID, false)? .visit_field::>("name", Self::VT_NAME, false)? .visit_field::>("tag", Self::VT_TAG, false)? .visit_field::("unk_1", Self::VT_UNK_1, false)? .visit_field::>("unk_2", Self::VT_UNK_2, false)? .visit_field::("unk_3", Self::VT_UNK_3, false)? .visit_field::>("role_icon_name", Self::VT_ROLE_ICON_NAME, false)? .visit_field::>("unk_4", Self::VT_UNK_4, false)? .visit_field::>>("unk_5", Self::VT_UNK_5, false)? .finish(); Ok(()) } } pub struct PostGirlConfigTemplateArgs<'a> { pub id: u32, pub name: Option>, pub tag: Option>, pub unk_1: i32, pub unk_2: Option>, pub unk_3: i32, pub role_icon_name: Option>, pub unk_4: Option>, pub unk_5: Option>>, } impl<'a> Default for PostGirlConfigTemplateArgs<'a> { #[inline] fn default() -> Self { PostGirlConfigTemplateArgs { id: 0, name: None, tag: None, unk_1: 0, unk_2: None, unk_3: 0, role_icon_name: None, unk_4: None, unk_5: None, } } } pub struct PostGirlConfigTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PostGirlConfigTemplateBuilder<'a, 'b, A> { #[inline] pub fn add_id(&mut self, id: u32) { self.fbb_.push_slot::(PostGirlConfigTemplate::VT_ID, id, 0); } #[inline] pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { self.fbb_.push_slot_always::>(PostGirlConfigTemplate::VT_NAME, name); } #[inline] pub fn add_tag(&mut self, tag: flatbuffers::WIPOffset<&'b str>) { self.fbb_.push_slot_always::>(PostGirlConfigTemplate::VT_TAG, tag); } #[inline] pub fn add_unk_1(&mut self, unk_1: i32) { self.fbb_.push_slot::(PostGirlConfigTemplate::VT_UNK_1, unk_1, 0); } #[inline] pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset<&'b str>) { self.fbb_.push_slot_always::>(PostGirlConfigTemplate::VT_UNK_2, unk_2); } #[inline] pub fn add_unk_3(&mut self, unk_3: i32) { self.fbb_.push_slot::(PostGirlConfigTemplate::VT_UNK_3, unk_3, 0); } #[inline] pub fn add_role_icon_name(&mut self, role_icon_name: flatbuffers::WIPOffset<&'b str>) { self.fbb_.push_slot_always::>(PostGirlConfigTemplate::VT_ROLE_ICON_NAME, role_icon_name); } #[inline] pub fn add_unk_4(&mut self, unk_4: flatbuffers::WIPOffset<&'b str>) { self.fbb_.push_slot_always::>(PostGirlConfigTemplate::VT_UNK_4, unk_4); } #[inline] pub fn add_unk_5(&mut self, unk_5: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(PostGirlConfigTemplate::VT_UNK_5, unk_5); } #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PostGirlConfigTemplateBuilder<'a, 'b, A> { let start = _fbb.start_table(); PostGirlConfigTemplateBuilder { fbb_: _fbb, start_: start, } } #[inline] pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); flatbuffers::WIPOffset::new(o.value()) } } impl core::fmt::Debug for PostGirlConfigTemplate<'_> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("PostGirlConfigTemplate"); ds.field("id", &self.id()); ds.field("name", &self.name()); ds.field("tag", &self.tag()); ds.field("unk_1", &self.unk_1()); ds.field("unk_2", &self.unk_2()); ds.field("unk_3", &self.unk_3()); ds.field("role_icon_name", &self.role_icon_name()); ds.field("unk_4", &self.unk_4()); ds.field("unk_5", &self.unk_5()); ds.finish() } } pub enum PostGirlConfigTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct PostGirlConfigTemplateTb<'a> { pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for PostGirlConfigTemplateTb<'a> { type Inner = PostGirlConfigTemplateTb<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { _tab: flatbuffers::Table::new(buf, loc) } } } impl<'a> PostGirlConfigTemplateTb<'a> { pub const VT_DATA: flatbuffers::VOffsetT = 4; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { PostGirlConfigTemplateTb { _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 PostGirlConfigTemplateTbArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = PostGirlConfigTemplateTbBuilder::new(_fbb); if let Some(x) = args.data { builder.add_data(x); } builder.finish() } #[inline] pub fn data(&self) -> Option>>> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab.get::>>>(PostGirlConfigTemplateTb::VT_DATA, None)} } } impl flatbuffers::Verifiable for PostGirlConfigTemplateTb<'_> { #[inline] fn run_verifier( v: &mut flatbuffers::Verifier, pos: usize ) -> Result<(), flatbuffers::InvalidFlatbuffer> { use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_field::>>>("data", Self::VT_DATA, false)? .finish(); Ok(()) } } pub struct PostGirlConfigTemplateTbArgs<'a> { pub data: Option>>>>, } impl<'a> Default for PostGirlConfigTemplateTbArgs<'a> { #[inline] fn default() -> Self { PostGirlConfigTemplateTbArgs { data: None, } } } pub struct PostGirlConfigTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PostGirlConfigTemplateTbBuilder<'a, 'b, A> { #[inline] pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { self.fbb_.push_slot_always::>(PostGirlConfigTemplateTb::VT_DATA, data); } #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PostGirlConfigTemplateTbBuilder<'a, 'b, A> { let start = _fbb.start_table(); PostGirlConfigTemplateTbBuilder { fbb_: _fbb, start_: start, } } #[inline] pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); flatbuffers::WIPOffset::new(o.value()) } } impl core::fmt::Debug for PostGirlConfigTemplateTb<'_> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("PostGirlConfigTemplateTb"); ds.field("data", &self.data()); ds.finish() } }