pub trait SampleLen: Sample<Output = Box<dyn Array>> + SetLen { }

Trait Implementations§

source§

impl Sample for Box<dyn SampleLen>

§

type Output = Box<dyn Array>

source§

fn generate(&mut self, g: &mut Random) -> Self::Output

Randomly generate the requested type.
source§

fn shrink(&self, v: Self::Output) -> Shrunk<'_, Self::Output>

Shrink the given value into a “smaller” value. Defaults to an empty iterator (which represents that the value cannot be shrunk).
source§

fn try_convert<T, I, F>(self, from: F, try_into: I) -> TryConvert<Self, F, I>
where Self: Sized, F: Fn(Self::Output) -> T, I: Fn(T) -> Option<Self::Output>,

Convert this sampler into a new sampler with from and try_into functions: Read more
source§

fn zip<OS>(self, other: OS) -> Zip<Self, OS>
where Self: Sized, OS: Sample,

“Zip” two samplers together. Functionally equivalent to (self, other).
source§

fn chain_resample<F, RS>( self, transform: F, subsamples: usize ) -> ChainResample<Self, F>
where Self: Sized, F: Fn(Self::Output) -> RS, RS: Sample,

“Resampling” method for chaining samplers. Read more

Implementations on Foreign Types§

source§

impl SampleLen for SamplerChoice<ArrowLenSampler>

source§

impl<S, F, I> SampleLen for TryConvert<S, F, I>
where S: Sample + SetLen, F: Fn(S::Output) -> Box<dyn Array>, I: Fn(Box<dyn Array>) -> Option<S::Output>,

Implementors§

source§

impl SampleLen for ArrowLenSampler

source§

impl<V, C, A, N> SampleLen for FixedSizeListWithLen<V, C, A, N>
where V: Sample<Output = Option<Bitmap>> + SetLen, C: Sample<Output = usize>, A: Sample<Output = Box<dyn Array>> + SetLen, N: Sample<Output = String>,

source§

impl<V, C, A, N> SampleLen for ListWithLen<V, C, A, N>
where V: Sample<Output = Option<Bitmap>> + SetLen, C: Sample<Output = i32>, A: Sample<Output = Box<dyn Array>> + SetLen, N: Sample<Output = String>,