pub trait Identifier: Eq { }
Expand description
Identity trait represents data which can be used as identifiers. Given two identifiers we just need to determine if they are equal (represent the same entity) or not.
§Example
use aabel_identifier_rs::*;
fn test_identifier(_id: impl Identifier) {
assert!(true);
}
let id = 10_u8;
test_identifier(id);
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.