pub trait FlattenableRandomStrategy: RandomStrategy {
// Required method
fn fmap_flat<A: Inner, B: Inner, F: FnMut(A) -> Self::Functor<B>>(
f: Self::Functor<A>,
func: F
) -> Self::Functor<B>;
}
Expand description
A RandomStrategy
that supports an fmap_flat
operation.
This requires a separate trait as, unlike fmap
, a call to fmap_flat
may
require a functor to grow. This poses problems for stateless strategies.
PopulationSampler
, for instance, requires an Rng
implementor to select
which samples to discard.
Required Methods§
Object Safety§
This trait is not object safe.