#[derive(Serialize, PostcardBindings)]
struct A {}
Error:
const is_A = (v) => (typeof v === "object" && )
^
SyntaxError: Unexpected token ')'
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1176:20)
at Module._compile (node:internal/modules/cjs/loader:1218:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Node.js v18.16.0
Reason:
This rust struct is handled as a normal struct without fields. A struct struct A; works, because it is handled as a UnitStruct.
Error:
Reason:
This rust struct is handled as a normal struct without fields. A struct
struct A;works, because it is handled as aUnitStruct.