Add a bindings-only version of `Future::register_callback` 2022-09-future-trait
authorMatt Corallo <git@bluematt.me>
Fri, 23 Sep 2022 21:08:26 +0000 (21:08 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 23 Sep 2022 21:12:04 +0000 (21:12 +0000)
commit1beb3bb4217d39df7ac1729eca2a188cae1ca958
tree899c8e34d754eef41175efe0adc390bc0dd12bc1
parent3b7859f496a6da971b4e4690a11f4b4a3b137fe8
Add a bindings-only version of `Future::register_callback`

While we could, in theory, add support to the bindings logic to map
`Box<dyn Trait>`, there isn't a whole lot of use doing so when its
incredibly trivial to do directly.

This adds a trivial wrapper around `Future::register_callback` that
is only built in bindings and which is linked in the
`register_callback` docs for visibility.
lightning/src/util/wakers.rs