pub trait Entity {
type Id: Debug + Clone + PartialEq + Eq + Hash + Send + Sync;
// Required method
fn id(&self) -> Self::Id;
}Expand description
Marker trait for domain entities managed by a repository.
Implementors must specify an Id type used to uniquely identify each entity
and provide an accessor to retrieve it.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".