Add a macro which implements Readable/Writeable using TLVs only
authorMatt Corallo <git@bluematt.me>
Tue, 25 May 2021 21:18:30 +0000 (21:18 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 27 May 2021 21:41:07 +0000 (21:41 +0000)
This also includes a `VecWriteWrapper` and `VecReadWrapper` which
implements serialization for any `Readable`/`Writeable` type that is
in a Vec. We do this instead of implementing `Readable`/`Writeable`
directly as there isn't always a univerally-defined way to serialize
a Vec and this makes things more explicit.

Finally, this tweaks existing macros (and in the new macros) to
support a trailing `,` after a list, eg
`write_tlv_fields!(stream, {(0, a),}, {});` whereas previously the
trailing `,` after the `(0, a)` would be a compile-error.


No differences found