Trait range_union_find::NumInRange
source · pub trait NumInRange: Steppable + Add<Output = Self> + Clone + PartialOrd + Ord + PartialEq + Eq {
const MIN_DECR_IS_UNDERFLOW: bool;
const MAX_INCR_IS_OVERFLOW: bool;
// Required methods
fn min_value() -> Self;
fn max_value() -> Self;
}
Expand description
Trait representing number types over which intervals can be constructed.
Safety
This trait is not unsafe
, so do not use custom implementers of this trait in unsafe contexts (e.g. a custom NumInRange
as indexes to track initialized buckets in a custom HashMap) without auditing the exact implementation.
Required Associated Constants§
sourceconst MIN_DECR_IS_UNDERFLOW: bool
const MIN_DECR_IS_UNDERFLOW: bool
Whether caling Steppable::step_decr
on the min value would underflow the type.
sourceconst MAX_INCR_IS_OVERFLOW: bool
const MAX_INCR_IS_OVERFLOW: bool
Whether caling Steppable::step_incr
on the max value would overflow the type.