Trait flatbuffers::Follow[][src]

pub trait Follow<'a> {
    type Inner;
    fn follow(buf: &'a [u8], loc: usize) -> Self::Inner;
}

Follow is a trait that allows us to access FlatBuffers in a declarative, type safe, and fast way. They compile down to almost no code (after optimizations). Conceptually, Follow lifts the offset-based access patterns of FlatBuffers data into the type system. This trait is used pervasively at read time, to access tables, vtables, vectors, strings, and all other data. At this time, Follow is not utilized much on the write path.

Writing a new Follow implementation primarily involves deciding whether you want to return data (of the type Self::Inner) or do you want to continue traversing the FlatBuffer.

Associated Types

Required Methods

Implementations on Foreign Types

impl<'a> Follow<'a> for bool
[src]

impl<'a> Follow<'a> for u8
[src]

impl<'a> Follow<'a> for u16
[src]

impl<'a> Follow<'a> for u32
[src]

impl<'a> Follow<'a> for u64
[src]

impl<'a> Follow<'a> for i8
[src]

impl<'a> Follow<'a> for i16
[src]

impl<'a> Follow<'a> for i32
[src]

impl<'a> Follow<'a> for i64
[src]

impl<'a> Follow<'a> for f32
[src]

impl<'a> Follow<'a> for f64
[src]

impl<'a> Follow<'a> for &'a str
[src]

impl<'a, T: EndianScalar> Follow<'a> for &'a [T]
[src]

Implement direct slice access if the host is little-endian.

Implementors