made_core/ports/subscription_handler.rs
1use async_trait::async_trait;
2
3use crate::error::DomainError;
4use crate::ports::DomainEvent;
5
6/// Handles already-deserialized messages at the domain boundary.
7#[async_trait]
8pub trait SubscriptionHandler<E: DomainEvent>: Send + Sync {
9 async fn handle(&self, event: E) -> Result<(), DomainError>;
10}