mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-22 07:32:16 -04:00
3b73b1c8d7
Structural read implementation can be only directly implemented on types with default constructors, but writing should not have such limitations. In this PR I'm splitting out writing into its own interface, so that it can be implemented even on types like tagged enums, which simplifies their own `BSATN.Write` implementation and allows to use them with helpers like `ToBytes`. I'm also making the generated tagged enum record `abstract` - which it, arguably, should've been from the beginning - but it should be a non-functional change because its constructor has always been `private` anyway.