pub trait EventReceiver: Send + Sync {
// Required method
fn receive<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Event>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn receive_timeout<'life0, 'async_trait>(
&'life0 mut self,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Option<Event>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn is_active(&self) -> bool { ... }
}Expand description
Event receiver trait for consuming events