Support for ReadOnlyMemory<byte>
I noticed that there is serializer support for byte[], but having support for ROM<byte> would help a few cases, notably on the serialization side, i could rent the buffers, fill them with data and then serialize them and returns the buffers. If i try that with an array, i might get back a oversized array and then serialize extra data.
On the deserialization side, the proxy could just allocate arrays to create the ROMs and that would be fine. A more advanced usecase for way down the road would be the abiliity to specify buffer allocators to the serde infra.
But as for the ROM support, could i raise a PR for it if you think a built in proxy is a good idea?
Yup seems good to me. Feel free to PR it. I think just an additional proxy, plus wiring it up to the generator, should be good enough
I'll give it a shot in the next day or two