Trait proptest::strategy::Shuffleable

source ·
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§

source

fn shuffle_len(&self) -> usize

Return the length of this collection.

source

fn shuffle_swap(&mut self, a: usize, b: usize)

Swap the elements at the given indices.

Implementations on Foreign Types§

source§

impl<T> Shuffleable for [T; 0]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 1]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 2]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 3]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 4]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 5]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 6]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 7]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 8]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 9]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 10]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 11]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 12]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 13]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 14]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 15]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 16]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 17]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 18]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 19]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 20]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 21]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 22]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 23]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 24]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 25]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 26]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 27]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 28]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 29]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 30]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 31]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T; 32]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for [T]

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for VecDeque<T>

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

source§

impl<T> Shuffleable for Vec<T>

source§

fn shuffle_len(&self) -> usize

source§

fn shuffle_swap(&mut self, a: usize, b: usize)

Implementors§