Struct bolero_generator::range::RangeInclusiveGenerator
source · pub struct RangeInclusiveGenerator<Start, End> { /* private fields */ }
Implementations§
source§impl<Start, End, T> RangeInclusiveGenerator<Start, End>where
Start: ValueGenerator<Output = T>,
End: ValueGenerator<Output = T>,
impl<Start, End, T> RangeInclusiveGenerator<Start, End>where
Start: ValueGenerator<Output = T>,
End: ValueGenerator<Output = T>,
pub fn start<NewS: ValueGenerator<Output = T>>( self, start: NewS, ) -> RangeInclusiveGenerator<NewS, End>
pub fn map_start<NewS: ValueGenerator<Output = T>, F: Fn(Start) -> NewS>( self, map: F, ) -> RangeInclusiveGenerator<NewS, End>
pub fn end<NewE: ValueGenerator<Output = T>>( self, end: NewE, ) -> RangeInclusiveGenerator<Start, NewE>
pub fn map_end<NewE: ValueGenerator<Output = T>, F: Fn(End) -> NewE>( self, map: F, ) -> RangeInclusiveGenerator<Start, NewE>
Trait Implementations§
source§impl<Start, End, T> ValueGenerator for RangeInclusiveGenerator<Start, End>where
Start: ValueGenerator<Output = T>,
End: ValueGenerator<Output = T>,
T: 'static,
impl<Start, End, T> ValueGenerator for RangeInclusiveGenerator<Start, End>where
Start: ValueGenerator<Output = T>,
End: ValueGenerator<Output = T>,
T: 'static,
type Output = RangeInclusive<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
fn driver_cache<D: Driver>(&self, driver: &mut D, value: Self::Output)
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<Start, End> Freeze for RangeInclusiveGenerator<Start, End>
impl<Start, End> RefUnwindSafe for RangeInclusiveGenerator<Start, End>where
Start: RefUnwindSafe,
End: RefUnwindSafe,
impl<Start, End> Send for RangeInclusiveGenerator<Start, End>
impl<Start, End> Sync for RangeInclusiveGenerator<Start, End>
impl<Start, End> Unpin for RangeInclusiveGenerator<Start, End>
impl<Start, End> UnwindSafe for RangeInclusiveGenerator<Start, End>where
Start: UnwindSafe,
End: 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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more