Struct cyfs_lib::RouterEventManager
source · [−]pub struct RouterEventManager { /* private fields */ }
Implementations
sourceimpl RouterEventManager
impl RouterEventManager
pub async fn new(
_service_url: &str,
event_type: CyfsStackEventType
) -> BuckyResult<Self>
pub fn clone_processor(&self) -> RouterEventManagerProcessorRef
pub fn add_event<REQ, RESP>(
&self,
id: &str,
index: i32,
routine: Box<dyn EventListenerAsyncRoutine<RouterEventRequest<REQ>, RouterEventResponse<RESP>>>
) -> BuckyResult<()> where
REQ: Send + Sync + 'static + JsonCodec<REQ> + Display,
RESP: Send + Sync + 'static + JsonCodec<RESP> + Display,
RouterEventRequest<REQ>: RouterEventCategoryInfo,
pub async fn remove_event(
&self,
category: RouterEventCategory,
id: &str
) -> BuckyResult<bool>
Trait Implementations
sourceimpl Clone for RouterEventManager
impl Clone for RouterEventManager
sourcefn clone(&self) -> RouterEventManager
fn clone(&self) -> RouterEventManager
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl RouterEventManagerProcessor for RouterEventManager
impl RouterEventManagerProcessor for RouterEventManager
fn test_event(
&self
) -> &dyn RouterEventProcessor<TestEventRequest, TestEventResponse>
sourceimpl<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,
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,
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
'life0: 'async_trait,
'life1: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl RefUnwindSafe for RouterEventManager
impl Send for RouterEventManager
impl Sync for RouterEventManager
impl Unpin for RouterEventManager
impl UnwindSafe for RouterEventManager
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more