[bindings] Implement ReadableArgs mapping, try impl mapping for ()s
authorMatt Corallo <git@bluematt.me>
Thu, 31 Dec 2020 00:47:32 +0000 (19:47 -0500)
committerMatt Corallo <git@bluematt.me>
Wed, 3 Feb 2021 15:11:28 +0000 (10:11 -0500)
commit56134a2bd123b75448536de5e945374e8b011f92
treec3cc0d5382841af21f4c9dc707ec89e738945dc6
parentef2b321fdb577245b662b575232d4c40f14ad7b2
[bindings] Implement ReadableArgs mapping, try impl mapping for ()s

This is most of the code to expose `ChannelManager`/`ChannelMonitor`
deserialization in our C bindings, using the new infrastructure to
map types in `maybe_convert_trait_impl` and passing generics in
from the callsites.

We also call `maybe_convert_trait_impl` for tuple types, as the
`ChannelManager`/`ChannelMonitor` deserialization returns a
`(BlockHash, T)` to indicate the block hash at which users need to
start resyncing the chain.

The final step to expose them is in the next commit.
c-bindings-gen/src/main.rs
lightning-c-bindings/src/c_types/mod.rs