pub struct ShrinkEngine { /* private fields */ }Expand description
Shrinking engine that coordinates the shrinking process
Implementations§
Source§impl ShrinkEngine
impl ShrinkEngine
Sourcepub fn with_config(config: ShrinkConfig) -> Self
pub fn with_config(config: ShrinkConfig) -> Self
Create a new shrinking engine with custom configuration
Sourcepub fn shrink<T, F>(&self, value: T, property: F) -> ShrinkResult<T>
pub fn shrink<T, F>(&self, value: T, property: F) -> ShrinkResult<T>
Shrink a value using a property test function
Sourcepub fn shrink_with_strategy<T, F, S>(
&self,
value: T,
property: F,
strategy: S,
) -> ShrinkResult<T>
pub fn shrink_with_strategy<T, F, S>( &self, value: T, property: F, strategy: S, ) -> ShrinkResult<T>
Shrink a value with a custom shrinking strategy
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShrinkEngine
impl RefUnwindSafe for ShrinkEngine
impl Send for ShrinkEngine
impl Sync for ShrinkEngine
impl Unpin for ShrinkEngine
impl UnwindSafe for ShrinkEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more