9 lines
244 B
Rust
9 lines
244 B
Rust
use crate::common::errors::DomainError;
|
|
use crate::common::events::DomainEvent;
|
|
use async_trait::async_trait;
|
|
|
|
#[async_trait]
|
|
pub trait EventPublisher: Send + Sync {
|
|
async fn publish(&self, event: DomainEvent) -> Result<(), DomainError>;
|
|
}
|