Trait idmap::IntegerId [−][src]
pub trait IntegerId: PartialEq + Debug {
fn from_id(id: u64) -> Self;
fn id(&self) -> u64;
fn id32(&self) -> u32;
}
Expand description
A type that can be uniquely identified by a 64 bit integer id
Required methods
Recreate this key based on its associated integer id
This must be consistent with IntegerId::id
This should assume no overflow in release mode (unless that would be unsafe). However in debug mode builds this should check for overflow.
Return the unique id of this value. If two values are equal, they must have the same id, and if two values aren’t equal, they must have different ids.