--!strict --!optimize 2 --!native local Types = require("../Types") return function(input: { [unknown]: Types.DataTypeInterface }) return { write = function(self: Types.Writer, structvalue: { [unknown]: unknown }) for key, solver in input do solver.write(self, structvalue[key]) end end, read = function(self: Types.Writer) local value = {} for key, solver in input do value[key] = solver.read(self) end return value end, length = function(value) local len = 0 for key, solver in input do len += solver.length(value[key]) end return len end, } end