mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-05 10:57:06 +00:00
Updates Rust codegen to use proper indentation (#8952)
* Fixes identation of generated Rust code * Regenerates generated schemas
This commit is contained in:
@@ -7,92 +7,92 @@ pub enum InParentNamespaceOffset {}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
pub struct InParentNamespace<'a> {
|
||||
pub _tab: ::flatbuffers::Table<'a>,
|
||||
pub _tab: ::flatbuffers::Table<'a>,
|
||||
}
|
||||
|
||||
impl<'a> ::flatbuffers::Follow<'a> for InParentNamespace<'a> {
|
||||
type Inner = InParentNamespace<'a>;
|
||||
type Inner = InParentNamespace<'a>;
|
||||
|
||||
#[inline]
|
||||
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
||||
Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
|
||||
}
|
||||
#[inline]
|
||||
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
||||
Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> InParentNamespace<'a> {
|
||||
pub const fn get_fully_qualified_name() -> &'static str {
|
||||
"MyGame.InParentNamespace"
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
|
||||
InParentNamespace { _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 InParentNamespaceArgs
|
||||
) -> ::flatbuffers::WIPOffset<InParentNamespace<'bldr>> {
|
||||
let mut builder = InParentNamespaceBuilder::new(_fbb);
|
||||
builder.finish()
|
||||
}
|
||||
|
||||
pub fn unpack(&self) -> InParentNamespaceT {
|
||||
InParentNamespaceT {
|
||||
pub const fn get_fully_qualified_name() -> &'static str {
|
||||
"MyGame.InParentNamespace"
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
|
||||
InParentNamespace { _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 InParentNamespaceArgs
|
||||
) -> ::flatbuffers::WIPOffset<InParentNamespace<'bldr>> {
|
||||
let mut builder = InParentNamespaceBuilder::new(_fbb);
|
||||
builder.finish()
|
||||
}
|
||||
|
||||
pub fn unpack(&self) -> InParentNamespaceT {
|
||||
InParentNamespaceT {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::flatbuffers::Verifiable for InParentNamespace<'_> {
|
||||
#[inline]
|
||||
fn run_verifier(
|
||||
v: &mut ::flatbuffers::Verifier, pos: usize
|
||||
) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
|
||||
v.visit_table(pos)?
|
||||
.finish();
|
||||
Ok(())
|
||||
}
|
||||
#[inline]
|
||||
fn run_verifier(
|
||||
v: &mut ::flatbuffers::Verifier, pos: usize
|
||||
) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
|
||||
v.visit_table(pos)?
|
||||
.finish();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InParentNamespaceArgs {
|
||||
}
|
||||
|
||||
impl<'a> Default for InParentNamespaceArgs {
|
||||
#[inline]
|
||||
fn default() -> Self {
|
||||
InParentNamespaceArgs {
|
||||
#[inline]
|
||||
fn default() -> Self {
|
||||
InParentNamespaceArgs {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InParentNamespaceBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
|
||||
fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
|
||||
start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
|
||||
fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
|
||||
start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
|
||||
}
|
||||
|
||||
impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> InParentNamespaceBuilder<'a, 'b, A> {
|
||||
#[inline]
|
||||
pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> InParentNamespaceBuilder<'a, 'b, A> {
|
||||
let start = _fbb.start_table();
|
||||
InParentNamespaceBuilder {
|
||||
fbb_: _fbb,
|
||||
start_: start,
|
||||
#[inline]
|
||||
pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> InParentNamespaceBuilder<'a, 'b, A> {
|
||||
let start = _fbb.start_table();
|
||||
InParentNamespaceBuilder {
|
||||
fbb_: _fbb,
|
||||
start_: start,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn finish(self) -> ::flatbuffers::WIPOffset<InParentNamespace<'a>> {
|
||||
let o = self.fbb_.end_table(self.start_);
|
||||
::flatbuffers::WIPOffset::new(o.value())
|
||||
}
|
||||
#[inline]
|
||||
pub fn finish(self) -> ::flatbuffers::WIPOffset<InParentNamespace<'a>> {
|
||||
let o = self.fbb_.end_table(self.start_);
|
||||
::flatbuffers::WIPOffset::new(o.value())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::core::fmt::Debug for InParentNamespace<'_> {
|
||||
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
|
||||
let mut ds = f.debug_struct("InParentNamespace");
|
||||
ds.finish()
|
||||
}
|
||||
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
|
||||
let mut ds = f.debug_struct("InParentNamespace");
|
||||
ds.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
@@ -101,18 +101,18 @@ pub struct InParentNamespaceT {
|
||||
}
|
||||
|
||||
impl Default for InParentNamespaceT {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl InParentNamespaceT {
|
||||
pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
|
||||
&self,
|
||||
_fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
|
||||
) -> ::flatbuffers::WIPOffset<InParentNamespace<'b>> {
|
||||
InParentNamespace::create(_fbb, &InParentNamespaceArgs{
|
||||
})
|
||||
}
|
||||
pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
|
||||
&self,
|
||||
_fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
|
||||
) -> ::flatbuffers::WIPOffset<InParentNamespace<'b>> {
|
||||
InParentNamespace::create(_fbb, &InParentNamespaceArgs{
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user