Struct FlatBufferBuilder

Source
pub struct FlatBufferBuilder { /* private fields */ }

Implementations§

Source§

impl FlatBufferBuilder

Source

pub fn new() -> FlatBufferBuilder

Source

pub fn add_bool( &mut self, flatbuffer: &mut FlatBuffer, position: usize, data: bool, )

Source

pub fn add_string( &mut self, flatbuffer: &mut FlatBuffer, position: usize, data: String, )

Source

pub fn add_f32()

Source

pub fn add_f64()

Source

pub fn add_u8()

Source

pub fn add_u16()

Source

pub fn add_u32()

Source

pub fn add_u64()

Source

pub fn add_u128()

Source

pub fn add_usize()

Source

pub fn add_i8()

Source

pub fn add_i16()

Source

pub fn add_i32()

Source

pub fn add_i64()

Source

pub fn add_i128()

Source

pub fn add_isize()

Source

pub fn add_list<T>( &mut self, flatbuffer: &mut FlatBuffer, position: usize, data: Vec<T>, )
where T: 'static + Clone,

Source

pub fn add_object<T>( &mut self, flatbuffer: &mut FlatBuffer, position: usize, data: &T, )
where T: Any,

Source

pub fn add_flatbuffer_bytes( &mut self, flatbuffer: &mut FlatBuffer, position: usize, value: Vec<u8>, pivot: u32, )

Source

pub fn build( &mut self, message: &mut Vec<Option<FlatBufferVar>>, len: Option<u8>, ) -> Result<FlatBuffer, &'static str>

Source

pub fn find_instance(&self, name: &str) -> Result<&InstanceInfo, String>

Source

pub fn from_list_bool( &mut self, mem_value: &mut Vec<bool>, ) -> Result<Vec<Vec<u8>>, String>

Source

pub fn from_list_string( &mut self, mem_value: &mut Vec<String>, ) -> Result<Vec<Vec<u8>>, String>

Source

pub fn register_instance_info( &mut self, ins_name: String, ins_type: String, mem_info_list: &mut Vec<Option<(String, Vec<Vec<u8>>)>>, ) -> Result<(), String>

Trait Implementations§

Source§

impl Debug for FlatBufferBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.