Move Table to AdvancedTable(comptime mutable: bool) type with flatbuffer: if (mutable) []u8 else []const u8. Make pub const Table = AdvancedTable(false); and pub const MutableTable = AdvancedTable(true); (with mixed in setter methods).
Then codegen setters for the following types:
- Scalars
- Strings (with len checking against previous string?)
- Vector + array elements
- Is there a way to do unions?
Move Table to
AdvancedTable(comptime mutable: bool) typewithflatbuffer: if (mutable) []u8 else []const u8. Makepub const Table = AdvancedTable(false);andpub const MutableTable = AdvancedTable(true);(with mixed in setter methods).Then codegen setters for the following types: