Function equal_to

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

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

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