pub trait Follow<'buf> {
    type Inner;

    fn follow(buf: &'buf [u8], loc: usize) -> Self::Inner;
}
Expand description

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.

Required Associated Types

Required Methods

Implementations on Foreign Types

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

Implementors

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

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