Trait morton_encoding::ValidKey[][src]

pub trait ValidKey<Coor>: PrimInt + From<Coor> + BitOrAssign + BitAndAssign + ShlAssign<usize> { }

Guarantees that a given data structure is suitable for a Morton Key.

Essentially, it guarantees that a) it behaves as if it’s an integer and b) that it’s larger than the relevant coordinate.

Ideally, we would also like a const N: usize here that would assert that a Key value is at least N times larger than a Coor value, but as of current (1.50) Rust this is not possible.

Implementors

impl<Coor, Key: PrimInt + From<Coor> + BitOrAssign + BitAndAssign + ShlAssign<usize>> ValidKey<Coor> for Key[src]

All primitive int types are suitable for Morton Keys.

Loading content...