minus-squarebbaldinotoRust Programming•How can I limit a number to a certain range in a struct/enum definition?linkfedilinkEnglisharrow-up1·1 year agoAs far as I know, these are referred to as refinement/range/pattern types. There’s some official discussion here (nothing in the language yet). There’s a library called flux though that implements a form of it linkfedilink
As far as I know, these are referred to as refinement/range/pattern types. There’s some official discussion here (nothing in the language yet). There’s a library called flux though that implements a form of it