breez_sdk_liquid::lightning::events

Trait EventHandler

pub trait EventHandler {
    // Required method
    fn handle_event(&self, event: Event);
}
Expand description

A trait implemented for objects handling events from EventsProvider.

An async variation also exists for implementations of EventsProvider that support async event handling. The async event handler should satisfy the generic bounds: F: core::future::Future, H: Fn(Event) -> F.

Required Methods§

fn handle_event(&self, event: Event)

Handles the given Event.

See EventsProvider for details that must be considered when implementing this method.

Implementations on Foreign Types§

§

impl<T> EventHandler for Arc<T>
where T: EventHandler,

§

fn handle_event(&self, event: Event)

Implementors§

§

impl<F> EventHandler for F
where F: Fn(Event),