pub trait UniqueEntity: PrimaryKey {
const KEY: Self::PrimaryKey;
}Expand description
A unique entity can appear either 0 or 1 times in the database.
Required Associated Constants§
Sourceconst KEY: Self::PrimaryKey
const KEY: Self::PrimaryKey
The id used as the key when storing this entity in a KV store.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".