macro_rules! flatbuffers_owned {
    ($struct_name:ident) => { ... };
    ($($struct_name:ident),*) => { ... };
}
Expand description

Use this macro on your FlatBuffers to generate the required code to start using this crate.

After invoking the macro, you have two generated types for each of your passed FlatBuffers:

  1. A generic new-type struct named Relaxed{FLATBUFFER_NAME}, which implements RelaxedFlatBufferTrait and takes the generic TBuffer: AsRef<[u8]>.
  2. A type alias named Owned{FLATBUFFER_NAME}, which aliases the Relaxed{FLATBUFFER_NAME}struct and setsTBuffertoBox<u8>`.

Usage

use flatbuffers_owned::flatbuffers_owned;

flatbuffers_owned!(MyFirstFlatBuffer, MySecondFlatBuffer);