Struct bolero_generator::alloc_generators::string::StringGenerator
source · pub struct StringGenerator<C, L> { /* private fields */ }
Implementations§
source§impl<C, L> StringGenerator<C, L>
impl<C, L> StringGenerator<C, L>
pub fn chars<Gen: ValueGenerator<Output = char>>( self, chars: Gen, ) -> StringGenerator<Gen, L>
pub fn map_chars<Gen: ValueGenerator<Output = char>, F: Fn(C) -> Gen>( self, map: F, ) -> StringGenerator<Gen, L>
pub fn len<Gen: ValueGenerator<Output = usize>>( self, len: Gen, ) -> StringGenerator<C, Gen>
pub fn map_len<Gen: ValueGenerator<Output = usize>, F: Fn(L) -> Gen>( self, map: F, ) -> StringGenerator<C, Gen>
Trait Implementations§
source§impl<G: ValueGenerator<Output = char>, L: ValueGenerator<Output = usize>> ValueGenerator for StringGenerator<G, L>
impl<G: ValueGenerator<Output = char>, L: ValueGenerator<Output = usize>> ValueGenerator for StringGenerator<G, L>
type Output = String
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<C, L> Freeze for StringGenerator<C, L>
impl<C, L> RefUnwindSafe for StringGenerator<C, L>where
C: RefUnwindSafe,
L: RefUnwindSafe,
impl<C, L> Send for StringGenerator<C, L>
impl<C, L> Sync for StringGenerator<C, L>
impl<C, L> Unpin for StringGenerator<C, L>
impl<C, L> UnwindSafe for StringGenerator<C, L>where
C: UnwindSafe,
L: 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