smaller_than_or_equal_to

Function smaller_than_or_equal_to 

Source
pub fn smaller_than_or_equal_to<T: PartialOrd>(a: T) -> impl Fn(T) -> bool
Expand description

Returns a closure that takes an argument and checks if it is less than or equal to the given value a.

This can be passed to #[valid] attribute like: #[valid(fn(smaller_than_or_equal_to(5))].