pub trait Mediator {
    fn send<Req, Res>(&mut self, req: Req) -> Result<Res>
    where
        Res: 'static,
        Req: Request<Res> + 'static
; fn publish<E>(&mut self, event: E) -> Result<()>
    where
        E: Event + 'static
; }
Expand description

A mediator is a central hub for communication between components.

Required Methods

Sends a request to the mediator.

Publish an event to the mediator.

Implementors