core
core copied to clipboard
[proposal] Add BoundedEnum trait and provide impls for suitable builtin types
Motivation: For implementing generic DIET(Discrete interval encoding tree) data structure.
trait BoundedEnum : Compare {
lower_bound() -> Self
upper_bound() -> Self
pred(Self) -> Self
succ(Self) -> Self
}