Flatbuf.Codegen.Struct (flatbuf v0.1.0)

Copy Markdown View Source

Emits an Elixir module for a FlatBuffers struct declaration.

Structs have fixed inline layout — the generated module knows every field's offset, size, and alignment at compile time. The reader uses position arithmetic, the writer constructs a single binary.

Summary

Functions

generate(s, schema, opts)

@spec generate(Flatbuf.Schema.Struct.t(), Flatbuf.Schema.t(), keyword()) ::
  {module(), String.t()}