pub trait Listener:
Sized
+ 'static
+ Send {
type Event: Event;
// Required method
fn handle(
&mut self,
cancel: &CancellationToken,
event: Self::Event,
) -> impl Future<Output = ()> + Send;
}Required Associated Types§
Required Methods§
fn handle( &mut self, cancel: &CancellationToken, event: Self::Event, ) -> impl Future<Output = ()> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.