Trait breez_sdk_core::lightning::util::wakers::FutureCallback

pub trait FutureCallback: Send {
    // Required method
    fn call(&self);
}
Expand description

A callback which is called when a Future completes.

Note that this MUST NOT call back into LDK directly, it must instead schedule actions to be taken later. Rust users should use the std::future::Future implementation for Future instead.

Note that the std::future::Future implementation may only work for runtimes which schedule futures when they receive a wake, rather than immediately executing them.

Required Methods§

fn call(&self)

The method which is called.

Implementors§

§

impl<F> FutureCallback for F
where F: Fn() + Send,