Flatbuf.Codegen.Table (flatbuf v0.1.0)

Copy Markdown View Source

Emits an Elixir module for a FlatBuffers table declaration.

The emitted module includes:

  • a defstruct matching the table's fields,
  • decode/1 and decode_at/2 returning the struct,
  • encode/1 returning a complete buffer,
  • build/2 for nested-table assembly inside an existing builder,
  • per-field zero-copy accessors.

Summary

Functions

generate(t, schema, opts)

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