]> 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>
Fri, 15 Jan 2021 00:49:14 +0000 (19:49 -0500)
commit805585a423a0f4553fb04845def2ccd64adb3efd
tree3ff878a3f0fecb7747b5c4484f14234c1c69bbbf
parent4fe9aea4b8a07a5a95ebeca448c66ef8b9cc5c94
[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