Skip to main content

EventProcessor

Trait EventProcessor 

Source
pub trait EventProcessor:
    Send
    + Sync
    + 'static {
    // Required method
    fn process_event<'life0, 'async_trait>(
        &'life0 self,
        event: HubEvent,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn as_any(&self) -> &dyn Any { ... }
}

Required Methods§

Source

fn process_event<'life0, 'async_trait>( &'life0 self, event: HubEvent, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn as_any(&self) -> &dyn Any

Allows downcasting to concrete types for optimization

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§