pub trait IndexType: PrimInt + Debug { }Expand description
A trait for types that can be used as interval indices.
This trait is automatically implemented for any type that satisfies
PrimInt + Debug. This restricts IndexType to primitive integer types only
(i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, usize).
Floating-point types (f32, f64) are explicitly excluded because they are inappropriate for interval indexing due to non-discrete values and rounding issues.
The default index type for IntervalSet and IntervalMap is u32.
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.