pub struct SampledFromGenerator<'a, T: Clone> { /* private fields */ }Expand description
Generator that picks from a fixed list of values. Created by sampled_from().
Trait Implementations§
Source§impl<'a, T: Clone + Send + Sync + 'a> Generator<T> for SampledFromGenerator<'a, T>
impl<'a, T: Clone + Send + Sync + 'a> Generator<T> for SampledFromGenerator<'a, T>
Source§fn map<U, F>(self, f: F) -> Mapped<T, U, F, Self>
fn map<U, F>(self, f: F) -> Mapped<T, U, F, Self>
Transform generated values using a function. Read more
Source§fn flat_map<U, G, F>(self, f: F) -> FlatMapped<T, U, G, F, Self>
fn flat_map<U, G, F>(self, f: F) -> FlatMapped<T, U, G, F, Self>
Generate a value, then use it to choose or configure another generator. Read more
Auto Trait Implementations§
impl<'a, T> Freeze for SampledFromGenerator<'a, T>
impl<'a, T> RefUnwindSafe for SampledFromGenerator<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for SampledFromGenerator<'a, T>
impl<'a, T> Sync for SampledFromGenerator<'a, T>where
T: Sync,
impl<'a, T> Unpin for SampledFromGenerator<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for SampledFromGenerator<'a, T>
impl<'a, T> UnwindSafe for SampledFromGenerator<'a, T>where
T: RefUnwindSafe + UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more