pub trait EventListener:
Send
+ Sync
+ 'static {
// Required method
fn on_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
event: &'life2 Event,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Receives every player event of every session, including Wavyzon-specific events a Lavalink v4 client did not opt into. Runs on a dedicated task; slow listeners only delay themselves.
Required Methods§
fn on_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
event: &'life2 Event,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".