Use BaseEventHandler to expose async event handling on InvoicePayer
authorWilmer Paulino <wilmer.paulino@gmail.com>
Tue, 8 Nov 2022 02:09:16 +0000 (18:09 -0800)
committerWilmer Paulino <wilmer.paulino@gmail.com>
Thu, 10 Nov 2022 18:57:06 +0000 (10:57 -0800)
commitf0059f5083f900bfab319fd87ca0f4e6779c0a91
treed3affa8ce91e15a88ef1d425d2229469eae7d26b
parentb0d0f3d749485a89ec65b5994cf3df541759d4f3
Use BaseEventHandler to expose async event handling on InvoicePayer

We introduce a new sealed trait BaseEventHandler that has a blanket
implementation for any T. Since the trait cannot be implemented outside
of the crate, this allow us to expose specific implementations of
InvoicePayer that allow for synchronous and asynchronous event handling.
lightning-invoice/src/payment.rs