soaprs-core 0.2.0

Core contracts for soaprs
Documentation
1
2
3
4
5
6
7
8
9
10
//! Domain entity contract.

/// A domain object with a stable identity.
pub trait Entity: Send + Sync {
    /// Identifier type used by the entity.
    type Id: Clone + Eq + Send + Sync;

    /// Returns the stable identifier of this entity.
    fn id(&self) -> &Self::Id;
}