]> git.bitcoin.ninja Git - rust-lightning/commit
[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>
Mon, 4 Jan 2021 21:14:26 +0000 (16:14 -0500)
commit07c0bc2224c84cfb56f2405849e34cd266f4ff19
tree9cf065961ad4892de91418698de6fd6e0957b342
parentf116ebbdf9d9c19cfb0e41c622d73cd750fccb44
[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