pub fn equal_to<T: PartialEq>(a: T) -> impl Fn(T) -> bool
Returns a closure that takes an argument and checks if it is equal to the given value a.
a
This can be passed to #[valid] attribute like: #[valid(fn(equal_to(5))].
#[valid]
#[valid(fn(equal_to(5))]