Function proptest::sample::select
[−]
[src]
pub fn select<T, A>(values: A) -> Select<T> where
A: 'static + Into<Cow<'static, [T]>>,
T: Clone + Debug + 'static,
Create a strategy which uniformly selects one value from values
.
values
should be a &'static [T]
or a Vec<T>
, or potentially another
type that can be coerced to Cow<'static,[T]>
.
This is largely equivalent to making a Union
of a bunch of Just
strategies, but is substantially more efficient and shrinks by binary
search.