made-core 0.7.1

Domain core of MADE: entities, value objects, events, ports. No IO.
Documentation
1
2
3
4
5
6
7
8
9
10
use async_trait::async_trait;

use crate::error::DomainError;
use crate::ports::DomainEvent;

/// Handles already-deserialized messages at the domain boundary.
#[async_trait]
pub trait SubscriptionHandler<E: DomainEvent>: Send + Sync {
    async fn handle(&self, event: E) -> Result<(), DomainError>;
}