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: \
- A generic new-type struct named
Relaxed{FLATBUFFER_NAME}, which implements RelaxedFlatBufferTrait and takes the genericTBuffer: AsRef<[u8]>. \ - A type alias named
Owned{FLATBUFFER_NAME}, which aliases theRelaxed{FLATBUFFER_NAME}struct and setsTBuffertoBox<u8>`.
ยงUsage
use flatbuffers_owned::flatbuffers_owned;
flatbuffers_owned!(MyFirstFlatBuffer, MySecondFlatBuffer);