Trait IndexableNum

Source
pub trait IndexableNum:
    Sealed
    + Num
    + NumCast
    + PartialOrd
    + Debug
    + Send
    + Sync
    + Pod
    + Bounded {
    const TYPE_INDEX: u8;
    const BYTES_PER_ELEMENT: usize;
}
Expand description

A trait for types that can be used for indexed coordinates.

This trait is sealed and cannot be implemented for external types. This is because we want to ensure FFI compatibility with other implementations, including the reference implementations in JavaScript (rtree, kdtree)

Required Associated Constants§

Source

const TYPE_INDEX: u8

The type index to match the array order of ARRAY_TYPES in flatbush JS

Source

const BYTES_PER_ELEMENT: usize

The number of bytes per element

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl IndexableNum for f32

Source§

impl IndexableNum for f64

Source§

impl IndexableNum for i8

Source§

impl IndexableNum for i16

Source§

impl IndexableNum for i32

Source§

impl IndexableNum for u8

Source§

impl IndexableNum for u16

Source§

impl IndexableNum for u32

Implementors§