pub trait Shuffleable {
// Required methods
fn shuffle_len(&self) -> usize;
fn shuffle_swap(&mut self, a: usize, b: usize);
}
Expand description
A value which can be used with the prop_shuffle
combinator.
This is not a general-purpose trait. Its methods are prefixed with
shuffle_
to avoid the compiler suggesting them or this trait as
corrections in errors.
Required Methods§
sourcefn shuffle_len(&self) -> usize
fn shuffle_len(&self) -> usize
Return the length of this collection.
sourcefn shuffle_swap(&mut self, a: usize, b: usize)
fn shuffle_swap(&mut self, a: usize, b: usize)
Swap the elements at the given indices.