Skip to main content

BitSetIndex

Trait BitSetIndex 

Source
pub trait BitSetIndex:
    Copy
    + 'static
    + Ord
    + Debug
    + Hash {
    // Required methods
    fn from_usize(index: usize) -> Self;
    fn index(self) -> usize;
}
Expand description

An index that can be stored in a bitset.

Required Methods§

Source

fn from_usize(index: usize) -> Self

Creates an index from its integer representation.

Source

fn index(self) -> usize

Returns the integer representation of this index.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl BitSetIndex for usize

Source§

fn from_usize(index: usize) -> Self

Source§

fn index(self) -> usize

Implementors§