#! @file ordinal.sakura #! @author John Christman (sorakatadzuma@gmail.com) #! @copyright Malunal Studios, LLC. #! @license MIT #! #! Contains the ordinal trait, which the compiler gives every integer type and #! every enum. module core; #! A value that is an integer underneath: every integer type, and every enum. #! #! A type parameter bounded by `ordinal` compares with `==`, orders with `<`, #! and converts to and from the integer types with `as`, which is what flags and #! tables indexed by an enum need. An integer becomes an enum only when it is #! some member's value, and stops the program otherwise. #! #! The compiler decides what is ordinal, so no other type can implement it. pub trait ordinal {}