MCPcopy Create free account
hub / github.com/Migorithm/rustiful-backend / new

Method new

library/src/services/messagebus.rs:26–38  ·  view source on GitHub ↗
(
        command_handler: &'static CommandHandler<AtomicContextManager>,
        event_handler: &'static EventHandler<AtomicContextManager>,
    )

Source from the content-addressed store, hash-verified

24
25impl MessageBus {
26 pub fn new(
27 command_handler: &'static CommandHandler<AtomicContextManager>,
28 event_handler: &'static EventHandler<AtomicContextManager>,
29 ) -> Arc<Self> {
30 Self {
31 #[cfg(test)]
32 book_keeper: AtomicI32::new(0),
33
34 command_handler,
35 event_handler,
36 }
37 .into()
38 }
39
40 pub async fn handle<C>(&self, message: C) -> ApplicationResult<ServiceResponse>
41 where

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected