pub trait Entity: Debug + Clone {
type Id: Debug + Clone + PartialEq;
// Required methods
fn entity_id(&self) -> &Self::Id;
fn entity_type() -> &'static str;
}Expand description
Trait for domain entities
All generated entities implement this trait, providing a common interface for working with domain objects.
Required Associated Types§
Required Methods§
Sourcefn entity_type() -> &'static str
fn entity_type() -> &'static str
Get the entity type name
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".