Trait idmap::IntegerId
[−]
[src]
pub trait IntegerId: PartialEq + Debug { type Storage; fn from_storage(storage: Self::Storage, id: u64) -> Self; fn into_storage(self) -> Self::Storage; fn id(&self) -> u64; fn id32(&self) -> u32; }
A type that can be uniquely identified by a 64 bit integer id
Associated Types
type Storage
Required Methods
fn from_storage(storage: Self::Storage, id: u64) -> Self
fn into_storage(self) -> Self::Storage
fn id(&self) -> u64
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.
fn id32(&self) -> u32
Return the 32-bit unique id of this value, panicking on overflow
Implementations on Foreign Types
impl IntegerId for u64
[src]
impl IntegerId for i64
[src]
impl IntegerId for usize
[src]
impl IntegerId for isize
[src]
impl IntegerId for u32
[src]
impl IntegerId for i32
[src]
impl IntegerId for u16
[src]
impl IntegerId for i16
[src]
impl<T: IntegerId> IntegerId for Rc<T>
[src]
impl<T: IntegerId> IntegerId for Box<T>
[src]
impl<T: IntegerId> IntegerId for Arc<T>
[src]
impl<T> IntegerId for NodeIndex<T> where
T: IndexType + IntegerId,
[src]
T: IndexType + IntegerId,