Skip to main content

NodeEventListener

Trait NodeEventListener 

Source
pub trait NodeEventListener: Send + Sync {
    // Required method
    fn on_event(&self, event: NodeEvent);
}
Expand description

Callback interface for receiving node events.

on_event is invoked from the SDK’s internal event-dispatch task. Implementations should be cheap and non-blocking; to update UI, dispatch to the main thread from inside the handler.

Installed via NodeBuilder::with_event_listener(...) so events emitted during node bring-up are captured. The polling-style Node::stream_node_events() API is still available for callers that prefer to drive events themselves.

Required Methods§

Source

fn on_event(&self, event: NodeEvent)

Trait Implementations§

Source§

impl<UT> LiftRef<UT> for Box<dyn NodeEventListener>

Source§

impl<UT> LiftReturn<UT> for Box<dyn NodeEventListener>

Source§

type ReturnType = <Box<dyn NodeEventListener> as Lift<UT>>::FfiType

FFI return type for trait interfaces
Source§

fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>

Lift a successfully returned value from a trait interface
Source§

fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self

Lift a foreign returned value from a trait interface Read more
Source§

fn lift_error(_buf: RustBuffer) -> Self

Lift a Rust value for a callback interface method error result Read more
Source§

fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self

Lift a Rust value for an unexpected callback interface error Read more

Implementors§