pub(crate) trait IncrementDecrementMutator:
Sized
+ Copy
+ Debug {
const ONE: Self;
// Required methods
fn validate(old: Self, new: Self, size: usize) -> Option<Self>;
fn wrapping_add(self, rhs: Self) -> Self;
fn wrapping_sub(self, rhs: Self) -> Self;
// Provided method
fn increment_decrement(
self,
size: usize,
test_runner: &mut TestRunner,
) -> Option<Self> { ... }
}
Expand description
Mutator that randomly increments or decrements an uint or int.
Required Associated Constants§
Required Methods§
fn validate(old: Self, new: Self, size: usize) -> Option<Self>
fn wrapping_add(self, rhs: Self) -> Self
fn wrapping_sub(self, rhs: Self) -> Self
Provided Methods§
fn increment_decrement( self, size: usize, test_runner: &mut TestRunner, ) -> Option<Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.