Skip to main content

soaprs_core/
entity.rs

1//! Domain entity contract.
2
3/// A domain object with a stable identity.
4pub trait Entity: Send + Sync {
5    /// Identifier type used by the entity.
6    type Id: Clone + Eq + Send + Sync;
7
8    /// Returns the stable identifier of this entity.
9    fn id(&self) -> &Self::Id;
10}