core icon indicating copy to clipboard operation
core copied to clipboard

[proposal] Add BoundedEnum trait and provide impls for suitable builtin types

Open hackwaly opened this issue 11 months ago • 0 comments

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
}

hackwaly avatar Mar 03 '25 17:03 hackwaly