[][src]Trait idmap::IntegerId

pub trait IntegerId: PartialEq + Debug {
    fn from_id(id: u64) -> Self;
fn id(&self) -> u64;
fn id32(&self) -> u32; }

A type that can be uniquely identified by a 64 bit integer id

Required methods

fn from_id(id: u64) -> Self

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.

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

Loading content...

Implementations on Foreign Types

impl IntegerId for NonZeroU8[src]

impl IntegerId for NonZeroU16[src]

impl IntegerId for NonZeroU32[src]

impl IntegerId for NonZeroU64[src]

impl IntegerId for NonZeroUsize[src]

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 IntegerId for u8[src]

impl IntegerId for i8[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]

Loading content...

Implementors

Loading content...