Struct bolero_generator::bounded::BoundedGenerator
source · pub struct BoundedGenerator<T, B> { /* private fields */ }
Implementations§
source§impl<T: BoundedValue, B: RangeBounds<T>> BoundedGenerator<T, B>
impl<T: BoundedValue, B: RangeBounds<T>> BoundedGenerator<T, B>
pub fn new(range_bounds: B) -> Self
pub fn bounds<NewB: RangeBounds<T>>( self, range_bounds: NewB ) -> BoundedGenerator<T, NewB>
Trait Implementations§
source§impl<T: BoundedValue, B: RangeBounds<T>> ValueGenerator for BoundedGenerator<T, B>
impl<T: BoundedValue, B: RangeBounds<T>> ValueGenerator for BoundedGenerator<T, B>
type Output = T
source§fn generate<D: Driver>(&self, driver: &mut D) -> Option<Self::Output>
fn generate<D: Driver>(&self, driver: &mut D) -> Option<Self::Output>
Generates a value with the given driver
source§fn mutate<D: Driver>(
&self,
driver: &mut D,
value: &mut Self::Output
) -> Option<()>
fn mutate<D: Driver>( &self, driver: &mut D, value: &mut Self::Output ) -> Option<()>
Mutates an existing value with the given driver
source§fn map_gen<F: Fn(Self::Output) -> T, T>(self, map: F) -> MapGenerator<Self, F>
fn map_gen<F: Fn(Self::Output) -> T, T>(self, map: F) -> MapGenerator<Self, F>
Map the value of a generator
source§fn and_then_gen<F: Fn(Self::Output) -> T, T: ValueGenerator>(
self,
and_then: F
) -> AndThenGenerator<Self, F>
fn and_then_gen<F: Fn(Self::Output) -> T, T: ValueGenerator>( self, and_then: F ) -> AndThenGenerator<Self, F>
Map the value of a generator with a new generator
source§fn filter_gen<F: Fn(&Self::Output) -> bool>(
self,
filter: F
) -> FilterGenerator<Self, F>
fn filter_gen<F: Fn(&Self::Output) -> bool>( self, filter: F ) -> FilterGenerator<Self, F>
Filter the value of a generator
source§fn filter_map_gen<F: Fn(Self::Output) -> Option<T>, T>(
self,
filter_map: F
) -> FilterMapGenerator<Self, F>
fn filter_map_gen<F: Fn(Self::Output) -> Option<T>, T>( self, filter_map: F ) -> FilterMapGenerator<Self, F>
Filter the value of a generator and map it to something else
Auto Trait Implementations§
impl<T, B> RefUnwindSafe for BoundedGenerator<T, B>where
B: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, B> Send for BoundedGenerator<T, B>
impl<T, B> Sync for BoundedGenerator<T, B>
impl<T, B> Unpin for BoundedGenerator<T, B>
impl<T, B> UnwindSafe for BoundedGenerator<T, B>where
B: UnwindSafe,
T: 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