contract and numerical range types in rust