Struct flatbuffers::Table [] [src]

pub struct Table { /* fields omitted */ }

Table provides functions to read Flatbuffer data.

Methods

impl Table
[src]

Create a table using from a slice using data starting at pos. First UOffsetT should indicate the offset from the root of the table to the begining of the object.

In the following example pos should be 0: 16, 0, 0, 0, // root of table: points to object <--------- 0, 0, // padding 10, 0, // vtable bytes 8, 0, // size of object 7, 0, // start of value 0 6, 0, // start of value 1 5, 0, // start of value 2 10, 0, 0, 0, // start of object..ie. vtable offset 0, // padding 77, // value 2 66, // value 1 55, // value 0

Create a table for an object. pos should be the offset to the first byte of useable data.

In the following example pos should be 16: 16, 0, 0, 0, // root of table: points to object 0, 0, // padding 10, 0, // vtable bytes 8, 0, // size of object 7, 0, // start of value 0 6, 0, // start of value 1 5, 0, // start of value 2 10, 0, 0, 0, // start of object..ie. vtable offset <--------- 0, // padding 77, // value 2 66, // value 1 55, // value 0

Return an object table at offset. See from_offset.

Return an object table at offset specified by offset.

Returns the field offset or 0 if the field was not present.

Returns the bool value of the field at the offset written in the vtable slot.

Returns the u8 value of the field at the offset written in the vtable slot.

Returns the i8 value of the field at the offset written in the vtable slot.

Returns the u16 value of the field at the offset written in the vtable slot.

Returns the i16 value of the field at the offset written in the vtable slot.

Returns the u32 value of the field at the offset written in the vtable slot.

Returns the i32 value of the field at the offset written in the vtable slot.

Returns the u64 value of the field at the offset written in the vtable slot.

Returns the i64 value of the field at the offset written in the vtable slot.

Returns the f32 value of the field at the offset written in the vtable slot.

Returns the f64 value of the field at the offset written in the vtable slot.

Returns the &str value of the field at the offset written in the vtable slot.

Returns the struct T value of the field at the offset written in the vtable slot.

Returns the unsigned byte vector value of the field at the offset written in the vtable slot.

ByteVector gets an unsigned byte slice from data stored inside the flatbuffer.

Returns a value of bool at offset.

Returns a value of u8 at offset.

Returns a value of i8 at offset.

Returns a value of u16 at offset.

Returns a value of i16 at offset.

Returns a value of u32 at offset.

Returns a value of i32 at offset.

Returns a value of u64 at offset.

Returns a value of i64 at offset.

Returns a value of f32 at offset.

Returns a value of f64 at offset.

Returns a value of &str at offset.

Retrieve a struct table from offset. Offset should point to then first usable byte of data i.e. the Vtable offset.

Accesor function for the tables position in the buffer.

Reads an UOffsetT at exact position.

Reads an VOffsetT at exact position.

Retrieves the VOffsetT in the vtable slot. If the vtable value is zero, the default value d will be returned.

Get a reference to the raw buffer

Trait Implementations

impl Debug for Table
[src]

Formats the value using the given formatter.

impl Clone for Table
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Table
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Table
[src]

impl From<Rc<Vec<u8>>> for Table
[src]

Performs the conversion.