pub trait HasId {
// Required method
fn id(&self) -> Uuid;
}Expand description
Trait for candidates with stable UUID identifiers.
Implementing this trait enables deterministic tie-breaking when candidates have equal scores.
§Contract
id()MUST return the same value for the same logical entity- The UUID SHOULD be globally unique (use
Uuid::new_v4()or similar) - The UUID MUST NOT change between calls for the same instance