Trait heckcheck::Shrink

source ·
pub trait Shrink {
    // Required methods
    fn shrink(source: Vec<u8>) -> Self;
    fn next(&mut self) -> &[u8] ;
    fn report(&mut self, report: ShrinkReport) -> Option<&[u8]>;
}
Expand description

Test case shrinking.

Required Methods§

source

fn shrink(source: Vec<u8>) -> Self

Start shrinking the provided data.

source

fn next(&mut self) -> &[u8]

Get the next test case.

source

fn report(&mut self, report: ShrinkReport) -> Option<&[u8]>

Report to the shrinker whether the last shrunk case passed or failed.

Returns the final shrinkage case if no more cases are left to report.

Implementors§