mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-09 22:56:27 +00:00
Fixes unused imports in Rust code generator (#8828)
* Fixes unused imports in Rust code generator * Regenerates generated schemas
This commit is contained in:
@@ -1,13 +1,6 @@
|
||||
// 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::*;
|
||||
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
|
||||
pub const ENUM_MIN_ABC: i32 = 0;
|
||||
@@ -47,8 +40,8 @@ impl ABC {
|
||||
}
|
||||
}
|
||||
}
|
||||
impl core::fmt::Debug for ABC {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
|
||||
impl ::core::fmt::Debug for ABC {
|
||||
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
||||
if let Some(name) = self.variant_name() {
|
||||
f.write_str(name)
|
||||
} else {
|
||||
@@ -56,24 +49,24 @@ impl core::fmt::Debug for ABC {
|
||||
}
|
||||
}
|
||||
}
|
||||
impl<'a> flatbuffers::Follow<'a> for ABC {
|
||||
impl<'a> ::flatbuffers::Follow<'a> for ABC {
|
||||
type Inner = Self;
|
||||
#[inline]
|
||||
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
||||
let b = unsafe { flatbuffers::read_scalar_at::<i32>(buf, loc) };
|
||||
let b = unsafe { ::flatbuffers::read_scalar_at::<i32>(buf, loc) };
|
||||
Self(b)
|
||||
}
|
||||
}
|
||||
|
||||
impl flatbuffers::Push for ABC {
|
||||
impl ::flatbuffers::Push for ABC {
|
||||
type Output = ABC;
|
||||
#[inline]
|
||||
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
|
||||
unsafe { flatbuffers::emplace_scalar::<i32>(dst, self.0); }
|
||||
unsafe { ::flatbuffers::emplace_scalar::<i32>(dst, self.0) };
|
||||
}
|
||||
}
|
||||
|
||||
impl flatbuffers::EndianScalar for ABC {
|
||||
impl ::flatbuffers::EndianScalar for ABC {
|
||||
type Scalar = i32;
|
||||
#[inline]
|
||||
fn to_little_endian(self) -> i32 {
|
||||
@@ -87,14 +80,13 @@ impl flatbuffers::EndianScalar for ABC {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> flatbuffers::Verifiable for ABC {
|
||||
impl<'a> ::flatbuffers::Verifiable for ABC {
|
||||
#[inline]
|
||||
fn run_verifier(
|
||||
v: &mut flatbuffers::Verifier, pos: usize
|
||||
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
|
||||
use self::flatbuffers::Verifiable;
|
||||
v: &mut ::flatbuffers::Verifier, pos: usize
|
||||
) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
|
||||
i32::run_verifier(v, pos)
|
||||
}
|
||||
}
|
||||
|
||||
impl flatbuffers::SimpleToVerifyInSlice for ABC {}
|
||||
impl ::flatbuffers::SimpleToVerifyInSlice for ABC {}
|
||||
|
||||
@@ -1,50 +1,43 @@
|
||||
// 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 MoreDefaultsOffset {}
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
|
||||
pub struct MoreDefaults<'a> {
|
||||
pub _tab: flatbuffers::Table<'a>,
|
||||
pub _tab: ::flatbuffers::Table<'a>,
|
||||
}
|
||||
|
||||
impl<'a> flatbuffers::Follow<'a> for MoreDefaults<'a> {
|
||||
impl<'a> ::flatbuffers::Follow<'a> for MoreDefaults<'a> {
|
||||
type Inner = MoreDefaults<'a>;
|
||||
#[inline]
|
||||
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
||||
Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
|
||||
Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> MoreDefaults<'a> {
|
||||
pub const VT_INTS: flatbuffers::VOffsetT = 4;
|
||||
pub const VT_FLOATS: flatbuffers::VOffsetT = 6;
|
||||
pub const VT_EMPTY_STRING: flatbuffers::VOffsetT = 8;
|
||||
pub const VT_SOME_STRING: flatbuffers::VOffsetT = 10;
|
||||
pub const VT_ABCS: flatbuffers::VOffsetT = 12;
|
||||
pub const VT_BOOLS: flatbuffers::VOffsetT = 14;
|
||||
pub const VT_INTS: ::flatbuffers::VOffsetT = 4;
|
||||
pub const VT_FLOATS: ::flatbuffers::VOffsetT = 6;
|
||||
pub const VT_EMPTY_STRING: ::flatbuffers::VOffsetT = 8;
|
||||
pub const VT_SOME_STRING: ::flatbuffers::VOffsetT = 10;
|
||||
pub const VT_ABCS: ::flatbuffers::VOffsetT = 12;
|
||||
pub const VT_BOOLS: ::flatbuffers::VOffsetT = 14;
|
||||
|
||||
pub const fn get_fully_qualified_name() -> &'static str {
|
||||
"MoreDefaults"
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
|
||||
pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
|
||||
MoreDefaults { _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>,
|
||||
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
|
||||
_fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
|
||||
args: &'args MoreDefaultsArgs<'args>
|
||||
) -> flatbuffers::WIPOffset<MoreDefaults<'bldr>> {
|
||||
) -> ::flatbuffers::WIPOffset<MoreDefaults<'bldr>> {
|
||||
let mut builder = MoreDefaultsBuilder::new(_fbb);
|
||||
if let Some(x) = args.bools { builder.add_bools(x); }
|
||||
if let Some(x) = args.abcs { builder.add_abcs(x); }
|
||||
@@ -66,11 +59,11 @@ impl<'a> MoreDefaults<'a> {
|
||||
};
|
||||
let empty_string = {
|
||||
let x = self.empty_string();
|
||||
x.to_string()
|
||||
alloc::string::ToString::to_string(x)
|
||||
};
|
||||
let some_string = {
|
||||
let x = self.some_string();
|
||||
x.to_string()
|
||||
alloc::string::ToString::to_string(x)
|
||||
};
|
||||
let abcs = {
|
||||
let x = self.abcs();
|
||||
@@ -91,73 +84,72 @@ impl<'a> MoreDefaults<'a> {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn ints(&self) -> flatbuffers::Vector<'a, i32> {
|
||||
pub fn ints(&self) -> ::flatbuffers::Vector<'a, i32> {
|
||||
// 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, i32>>>(MoreDefaults::VT_INTS, Some(Default::default())).unwrap()}
|
||||
unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, i32>>>(MoreDefaults::VT_INTS, Some(Default::default())).unwrap()}
|
||||
}
|
||||
#[inline]
|
||||
pub fn floats(&self) -> flatbuffers::Vector<'a, f32> {
|
||||
pub fn floats(&self) -> ::flatbuffers::Vector<'a, f32> {
|
||||
// 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, f32>>>(MoreDefaults::VT_FLOATS, Some(Default::default())).unwrap()}
|
||||
unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, f32>>>(MoreDefaults::VT_FLOATS, Some(Default::default())).unwrap()}
|
||||
}
|
||||
#[inline]
|
||||
pub fn empty_string(&self) -> &'a str {
|
||||
// Safety:
|
||||
// Created from valid Table for this object
|
||||
// which contains a valid value in this slot
|
||||
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(MoreDefaults::VT_EMPTY_STRING, Some(&"")).unwrap()}
|
||||
unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MoreDefaults::VT_EMPTY_STRING, Some(&"")).unwrap()}
|
||||
}
|
||||
#[inline]
|
||||
pub fn some_string(&self) -> &'a str {
|
||||
// Safety:
|
||||
// Created from valid Table for this object
|
||||
// which contains a valid value in this slot
|
||||
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(MoreDefaults::VT_SOME_STRING, Some(&"some")).unwrap()}
|
||||
unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MoreDefaults::VT_SOME_STRING, Some(&"some")).unwrap()}
|
||||
}
|
||||
#[inline]
|
||||
pub fn abcs(&self) -> flatbuffers::Vector<'a, ABC> {
|
||||
pub fn abcs(&self) -> ::flatbuffers::Vector<'a, ABC> {
|
||||
// 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, ABC>>>(MoreDefaults::VT_ABCS, Some(Default::default())).unwrap()}
|
||||
unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ABC>>>(MoreDefaults::VT_ABCS, Some(Default::default())).unwrap()}
|
||||
}
|
||||
#[inline]
|
||||
pub fn bools(&self) -> flatbuffers::Vector<'a, bool> {
|
||||
pub fn bools(&self) -> ::flatbuffers::Vector<'a, bool> {
|
||||
// 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, bool>>>(MoreDefaults::VT_BOOLS, Some(Default::default())).unwrap()}
|
||||
unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, bool>>>(MoreDefaults::VT_BOOLS, Some(Default::default())).unwrap()}
|
||||
}
|
||||
}
|
||||
|
||||
impl flatbuffers::Verifiable for MoreDefaults<'_> {
|
||||
impl ::flatbuffers::Verifiable for MoreDefaults<'_> {
|
||||
#[inline]
|
||||
fn run_verifier(
|
||||
v: &mut flatbuffers::Verifier, pos: usize
|
||||
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
|
||||
use self::flatbuffers::Verifiable;
|
||||
v: &mut ::flatbuffers::Verifier, pos: usize
|
||||
) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
|
||||
v.visit_table(pos)?
|
||||
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("ints", Self::VT_INTS, false)?
|
||||
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f32>>>("floats", Self::VT_FLOATS, false)?
|
||||
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("empty_string", Self::VT_EMPTY_STRING, false)?
|
||||
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("some_string", Self::VT_SOME_STRING, false)?
|
||||
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, ABC>>>("abcs", Self::VT_ABCS, false)?
|
||||
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, bool>>>("bools", Self::VT_BOOLS, false)?
|
||||
.visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, i32>>>("ints", Self::VT_INTS, false)?
|
||||
.visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, f32>>>("floats", Self::VT_FLOATS, false)?
|
||||
.visit_field::<::flatbuffers::ForwardsUOffset<&str>>("empty_string", Self::VT_EMPTY_STRING, false)?
|
||||
.visit_field::<::flatbuffers::ForwardsUOffset<&str>>("some_string", Self::VT_SOME_STRING, false)?
|
||||
.visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ABC>>>("abcs", Self::VT_ABCS, false)?
|
||||
.visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, bool>>>("bools", Self::VT_BOOLS, false)?
|
||||
.finish();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
pub struct MoreDefaultsArgs<'a> {
|
||||
pub ints: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
|
||||
pub floats: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f32>>>,
|
||||
pub empty_string: Option<flatbuffers::WIPOffset<&'a str>>,
|
||||
pub some_string: Option<flatbuffers::WIPOffset<&'a str>>,
|
||||
pub abcs: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, ABC>>>,
|
||||
pub bools: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, bool>>>,
|
||||
pub ints: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, i32>>>,
|
||||
pub floats: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, f32>>>,
|
||||
pub empty_string: Option<::flatbuffers::WIPOffset<&'a str>>,
|
||||
pub some_string: Option<::flatbuffers::WIPOffset<&'a str>>,
|
||||
pub abcs: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ABC>>>,
|
||||
pub bools: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, bool>>>,
|
||||
}
|
||||
impl<'a> Default for MoreDefaultsArgs<'a> {
|
||||
#[inline]
|
||||
@@ -173,37 +165,37 @@ impl<'a> Default for MoreDefaultsArgs<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct MoreDefaultsBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
|
||||
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
|
||||
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
|
||||
pub struct MoreDefaultsBuilder<'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> MoreDefaultsBuilder<'a, 'b, A> {
|
||||
impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> MoreDefaultsBuilder<'a, 'b, A> {
|
||||
#[inline]
|
||||
pub fn add_ints(&mut self, ints: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
|
||||
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MoreDefaults::VT_INTS, ints);
|
||||
pub fn add_ints(&mut self, ints: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , i32>>) {
|
||||
self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MoreDefaults::VT_INTS, ints);
|
||||
}
|
||||
#[inline]
|
||||
pub fn add_floats(&mut self, floats: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f32>>) {
|
||||
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MoreDefaults::VT_FLOATS, floats);
|
||||
pub fn add_floats(&mut self, floats: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , f32>>) {
|
||||
self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MoreDefaults::VT_FLOATS, floats);
|
||||
}
|
||||
#[inline]
|
||||
pub fn add_empty_string(&mut self, empty_string: flatbuffers::WIPOffset<&'b str>) {
|
||||
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MoreDefaults::VT_EMPTY_STRING, empty_string);
|
||||
pub fn add_empty_string(&mut self, empty_string: ::flatbuffers::WIPOffset<&'b str>) {
|
||||
self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MoreDefaults::VT_EMPTY_STRING, empty_string);
|
||||
}
|
||||
#[inline]
|
||||
pub fn add_some_string(&mut self, some_string: flatbuffers::WIPOffset<&'b str>) {
|
||||
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MoreDefaults::VT_SOME_STRING, some_string);
|
||||
pub fn add_some_string(&mut self, some_string: ::flatbuffers::WIPOffset<&'b str>) {
|
||||
self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MoreDefaults::VT_SOME_STRING, some_string);
|
||||
}
|
||||
#[inline]
|
||||
pub fn add_abcs(&mut self, abcs: flatbuffers::WIPOffset<flatbuffers::Vector<'b , ABC>>) {
|
||||
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MoreDefaults::VT_ABCS, abcs);
|
||||
pub fn add_abcs(&mut self, abcs: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ABC>>) {
|
||||
self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MoreDefaults::VT_ABCS, abcs);
|
||||
}
|
||||
#[inline]
|
||||
pub fn add_bools(&mut self, bools: flatbuffers::WIPOffset<flatbuffers::Vector<'b , bool>>) {
|
||||
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MoreDefaults::VT_BOOLS, bools);
|
||||
pub fn add_bools(&mut self, bools: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , bool>>) {
|
||||
self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MoreDefaults::VT_BOOLS, bools);
|
||||
}
|
||||
#[inline]
|
||||
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MoreDefaultsBuilder<'a, 'b, A> {
|
||||
pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> MoreDefaultsBuilder<'a, 'b, A> {
|
||||
let start = _fbb.start_table();
|
||||
MoreDefaultsBuilder {
|
||||
fbb_: _fbb,
|
||||
@@ -211,14 +203,14 @@ impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MoreDefaultsBuilder<'a, 'b, A>
|
||||
}
|
||||
}
|
||||
#[inline]
|
||||
pub fn finish(self) -> flatbuffers::WIPOffset<MoreDefaults<'a>> {
|
||||
pub fn finish(self) -> ::flatbuffers::WIPOffset<MoreDefaults<'a>> {
|
||||
let o = self.fbb_.end_table(self.start_);
|
||||
flatbuffers::WIPOffset::new(o.value())
|
||||
::flatbuffers::WIPOffset::new(o.value())
|
||||
}
|
||||
}
|
||||
|
||||
impl core::fmt::Debug for MoreDefaults<'_> {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
impl ::core::fmt::Debug for MoreDefaults<'_> {
|
||||
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
|
||||
let mut ds = f.debug_struct("MoreDefaults");
|
||||
ds.field("ints", &self.ints());
|
||||
ds.field("floats", &self.floats());
|
||||
@@ -232,30 +224,30 @@ impl core::fmt::Debug for MoreDefaults<'_> {
|
||||
#[non_exhaustive]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct MoreDefaultsT {
|
||||
pub ints: Vec<i32>,
|
||||
pub floats: Vec<f32>,
|
||||
pub empty_string: String,
|
||||
pub some_string: String,
|
||||
pub abcs: Vec<ABC>,
|
||||
pub bools: Vec<bool>,
|
||||
pub ints: alloc::vec::Vec<i32>,
|
||||
pub floats: alloc::vec::Vec<f32>,
|
||||
pub empty_string: alloc::string::String,
|
||||
pub some_string: alloc::string::String,
|
||||
pub abcs: alloc::vec::Vec<ABC>,
|
||||
pub bools: alloc::vec::Vec<bool>,
|
||||
}
|
||||
impl Default for MoreDefaultsT {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
ints: Default::default(),
|
||||
floats: Default::default(),
|
||||
empty_string: "".to_string(),
|
||||
some_string: "some".to_string(),
|
||||
empty_string: alloc::string::ToString::to_string(""),
|
||||
some_string: alloc::string::ToString::to_string("some"),
|
||||
abcs: Default::default(),
|
||||
bools: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
impl MoreDefaultsT {
|
||||
pub fn pack<'b, A: flatbuffers::Allocator + 'b>(
|
||||
pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
|
||||
&self,
|
||||
_fbb: &mut flatbuffers::FlatBufferBuilder<'b, A>
|
||||
) -> flatbuffers::WIPOffset<MoreDefaults<'b>> {
|
||||
_fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>
|
||||
) -> ::flatbuffers::WIPOffset<MoreDefaults<'b>> {
|
||||
let ints = Some({
|
||||
let x = &self.ints;
|
||||
_fbb.create_vector(x)
|
||||
|
||||
Reference in New Issue
Block a user