Function range_subset
pub fn range_subset<T>(range: Range<T>, size: impl Into<SizeRange>) -> RangeSubset<T>
where
T: Copy + Ord + Debug,
Range<T>: ExactSizeIterator<Item = T>,
Sample subsets whose size are within size from the given range.
This is roughly analogous to rand::sample, except that it samples without replacement.
Panics
Panics if the maximum size implied by size is larger than the size of
values.
Panics if size is a zero-length range.