Trait flatbuffers::Follow[][src]

pub trait Follow<'buf> {
    type Inner;
    fn follow(buf: &'buf [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

Loading content...

Required methods

fn follow(buf: &'buf [u8], loc: usize) -> Self::Inner[src]

Loading content...

Implementations on Foreign Types

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

type Inner = bool

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

type Inner = u8

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

type Inner = u16

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

type Inner = u32

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

type Inner = u64

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

type Inner = i8

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

type Inner = i16

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

type Inner = i32

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

type Inner = i64

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

type Inner = f32

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

type Inner = f64

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

type Inner = &'a str

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

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

type Inner = &'a [T]

Loading content...

Implementors

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

type Inner = &'a [u8]

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

type Inner = Table<'a>

impl<'a, T: Follow<'a> + 'a> Follow<'a> for SkipFileIdentifier<T>[src]

type Inner = T::Inner

impl<'a, T: Follow<'a> + 'a> Follow<'a> for SkipRootOffset<T>[src]

type Inner = T::Inner

impl<'a, T: Follow<'a> + 'a> Follow<'a> for SkipSizePrefix<T>[src]

type Inner = T::Inner

impl<'a, T: Follow<'a> + 'a> Follow<'a> for Vector<'a, T>[src]

Implement Follow for all possible Vectors that have Follow-able elements.

type Inner = Vector<'a, T>

impl<'a, T: Follow<'a> + 'a, const N: usize> Follow<'a> for Array<'a, T, N>[src]

Implement Follow for all possible Arrays that have Follow-able elements.

type Inner = Array<'a, T, N>

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

type Inner = T::Inner

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

type Inner = T::Inner

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

type Inner = T::Inner

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

type Inner = T::Inner

Loading content...