pub trait Mediator {
// Required methods
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§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.