// automatically generated by the FlatBuffers compiler, do not modify
// @generated
extern crate alloc;
extern crate flatbuffers;
use alloc::boxed::Box;
use alloc::string::{String, ToString};
use alloc::vec::Vec;
use core::mem;
use core::cmp::Ordering;
use self::flatbuffers::{EndianScalar, Follow};
use super::*;
pub enum PlayerSpectateOffset {}
#[derive(Copy, Clone, PartialEq)]

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

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

impl<'a> PlayerSpectate<'a> {

  pub const fn get_fully_qualified_name() -> &'static str {
    "RustNamerTest.PlayerSpectate"
  }

  #[inline]
  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
    PlayerSpectate { _tab: table }
  }
  #[allow(unused_mut)]
  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
    _args: &'args PlayerSpectateArgs
  ) -> flatbuffers::WIPOffset<PlayerSpectate<'bldr>> {
    let mut builder = PlayerSpectateBuilder::new(_fbb);
    builder.finish()
  }

  pub fn unpack(&self) -> PlayerSpectateT {
    PlayerSpectateT {
    }
  }
}

impl flatbuffers::Verifiable for PlayerSpectate<'_> {
  #[inline]
  fn run_verifier(
    v: &mut flatbuffers::Verifier, pos: usize
  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
    use self::flatbuffers::Verifiable;
    v.visit_table(pos)?
     .finish();
    Ok(())
  }
}
pub struct PlayerSpectateArgs {
}
impl<'a> Default for PlayerSpectateArgs {
  #[inline]
  fn default() -> Self {
    PlayerSpectateArgs {
    }
  }
}

pub struct PlayerSpectateBuilder<'a: 'b, 'b> {
  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> PlayerSpectateBuilder<'a, 'b> {
  #[inline]
  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> PlayerSpectateBuilder<'a, 'b> {
    let start = _fbb.start_table();
    PlayerSpectateBuilder {
      fbb_: _fbb,
      start_: start,
    }
  }
  #[inline]
  pub fn finish(self) -> flatbuffers::WIPOffset<PlayerSpectate<'a>> {
    let o = self.fbb_.end_table(self.start_);
    flatbuffers::WIPOffset::new(o.value())
  }
}

impl core::fmt::Debug for PlayerSpectate<'_> {
  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
    let mut ds = f.debug_struct("PlayerSpectate");
      ds.finish()
  }
}
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
pub struct PlayerSpectateT {
}
impl Default for PlayerSpectateT {
  fn default() -> Self {
    Self {
    }
  }
}
impl PlayerSpectateT {
  pub fn pack<'b>(
    &self,
    _fbb: &mut flatbuffers::FlatBufferBuilder<'b>
  ) -> flatbuffers::WIPOffset<PlayerSpectate<'b>> {
    PlayerSpectate::create(_fbb, &PlayerSpectateArgs{
    })
  }
}
