pub trait RouterEventProcessor<REQ, RESP>: Send + Syncwhere
    REQ: Send + Sync + 'static + JsonCodec<REQ> + Display,
    RESP: Send + Sync + 'static + JsonCodec<RESP> + Display,
    RouterEventRequest<REQ>: RouterEventCategoryInfo,{
    // Required methods
    fn add_event<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
        index: i32,
        routine: Box<dyn EventListenerAsyncRoutine<RouterEventRequest<REQ>, RouterEventResponse<RESP>>>
    ) -> Pin<Box<dyn Future<Output = BuckyResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn remove_event<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str
    ) -> Pin<Box<dyn Future<Output = BuckyResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

source

fn add_event<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, index: i32, routine: Box<dyn EventListenerAsyncRoutine<RouterEventRequest<REQ>, RouterEventResponse<RESP>>> ) -> Pin<Box<dyn Future<Output = BuckyResult<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn remove_event<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str ) -> Pin<Box<dyn Future<Output = BuckyResult<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

source§

impl<REQ, RESP> RouterEventProcessor<REQ, RESP> for RouterEventManagerwhere REQ: Send + Sync + 'static + JsonCodec<REQ> + Display, RESP: Send + Sync + 'static + JsonCodec<RESP> + Display, RouterEventRequest<REQ>: RouterEventCategoryInfo,