Trait RouterEventProcessor

Source
pub trait RouterEventProcessor<REQ, RESP>: Send + Sync
where 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 RouterEventManager
where REQ: Send + Sync + 'static + JsonCodec<REQ> + Display, RESP: Send + Sync + 'static + JsonCodec<RESP> + Display, RouterEventRequest<REQ>: RouterEventCategoryInfo,