use crate::{
broker::MessageBroker,
handler::{Command, CommandHandler},
message::{DriverMessage, DriverSideEffect},
policy::{Policy, PolicyContext},
projector::Projector,
uow::UnitOfWork,
};
pub trait Projection: Send {}
impl<T: Send> Projection for T {}
pub trait Event: Send {}
impl<T: Send> Event for T {}
pub trait MessageBusDriver: Clone + Sized + Send + Sync + 'static {
type Identifier: Send;
type Command: Command;
type Event: Event;
type Projection: Projection;
type Broker: MessageBroker<Message = DriverMessage<Self>>;
type UnitOfWork: UnitOfWork<Event = Self::Event>;
type PolicyContext: PolicyContext;
type Projector: Projector<Self::Projection>;
type Handler: CommandHandler<Self::Command, Self>;
type Policy: Policy<Self::Event, Self, Output = DriverSideEffect<Self>>;
type Viewer: Clone + Send + Sync;
}