HexEntity

Trait HexEntity 

Source
pub trait HexEntity {
    type Id;
}
Expand description

Trait for domain entities with unique identity.

Entities have an identity that persists over time. Two entities with the same identity are considered the same entity, even if their attributes differ.

§Example

use hexser::domain::HexEntity;

struct User {
    id: String,
    email: String,
}

impl HexEntity for User {
    type Id = String;
}

Required Associated Types§

Source

type Id

The type used to uniquely identify this entity.

Implementors§