pub trait SparseSetIndex: Clone + PartialEq<Self> + Eq + Hash {
    // Required methods
    fn sparse_set_index(&self) -> usize;
    fn get_sparse_set_index(value: usize) -> Self;
}
Expand description

Represents something that can be stored in a SparseSet as an integer.

Ideally, the usize values should be very small (ie: incremented starting from zero), as the number of bits needed to represent a SparseSetIndex in a FixedBitSet is proportional to the value of those usize.

Required Methods§

fn sparse_set_index(&self) -> usize

fn get_sparse_set_index(value: usize) -> Self

Implementations on Foreign Types§

§

impl SparseSetIndex for u8

§

impl SparseSetIndex for usize

§

impl SparseSetIndex for u64

§

impl SparseSetIndex for u32

§

impl SparseSetIndex for u16

Implementors§