pub unsafe trait IndexType: Copy + Default + Hash + Ord + Debug + 'static {
    // Required methods
    fn new(x: usize) -> Self;
    fn index(&self) -> usize;
    fn max() -> Self;
}
Expand description

Trait for the unsigned integer type used for node and edge indices.

Marked unsafe because: the trait must faithfully preserve and convert index values.

Required Methods§

source

fn new(x: usize) -> Self

source

fn index(&self) -> usize

source

fn max() -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl IndexType for u8

source§

fn new(x: usize) -> u8

source§

fn index(&self) -> usize

source§

fn max() -> u8

source§

impl IndexType for u16

source§

fn new(x: usize) -> u16

source§

fn index(&self) -> usize

source§

fn max() -> u16

source§

impl IndexType for u32

source§

fn new(x: usize) -> u32

source§

fn index(&self) -> usize

source§

fn max() -> u32

source§

impl IndexType for usize

Implementors§

source§

impl<Ix> IndexType for NodeIndex<Ix>
where Ix: IndexType,