Trait fuzzcheck::builder::FuzzTestFunction [−][src]
pub trait FuzzTestFunction<T: ?Sized, ImplId> { type NormalizedFunction: for<'a> Fn(&'a T) -> bool; fn test_function(self) -> Self::NormalizedFunction; }
Expand description
A function that can be fuzz-tested.
Strictly speaking, fuzzcheck can only test functions of type Fn(&T) -> bool.
Using this trait, we can convert other types of functions to Fn(&T) -> bool
automatically. For example, a function fn foo(x: &u8) -> Result<T, E> can be
wrapped in a closure that returns true iff foo(x) is Ok(..).