pub fn in_range<T: PartialOrd>(a: T, b: T) -> impl Fn(T) -> bool
Expand description
Returns a closure that takes an argument and checks if it is within the given range [a, b]
.
This can be passed to #[valid]
attribute like: #[valid(fn(in_range(1, 5))]
.