[][src]Trait bolero_generator::ValueGenerator

pub trait ValueGenerator: Sized {
    type Output;
    fn generate(&mut self, rng: &mut dyn RngCore) -> Self::Output;

    fn map<F: Fn(Self::Output) -> T, T>(self, map: F) -> MapGenerator<Self, F> { ... }
fn and_then<F: Fn(Self::Output, &mut dyn RngCore) -> T, T: ValueGenerator>(
        self,
        and_then: F
    ) -> AndThenGenerator<Self, F> { ... } }

Associated Types

type Output

Loading content...

Required methods

fn generate(&mut self, rng: &mut dyn RngCore) -> Self::Output

Loading content...

Provided methods

fn map<F: Fn(Self::Output) -> T, T>(self, map: F) -> MapGenerator<Self, F>

fn and_then<F: Fn(Self::Output, &mut dyn RngCore) -> T, T: ValueGenerator>(
    self,
    and_then: F
) -> AndThenGenerator<Self, F>

Loading content...

Implementations on Foreign Types

impl<A: ValueGenerator> ValueGenerator for (A,)[src]

type Output = (A::Output,)

impl<B: ValueGenerator, A: ValueGenerator> ValueGenerator for (A, B)[src]

type Output = (B::Output, A::Output)

impl<C: ValueGenerator, A: ValueGenerator, B: ValueGenerator> ValueGenerator for (A, B, C)[src]

type Output = (C::Output, A::Output, B::Output)

impl<D: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator> ValueGenerator for (A, B, C, D)[src]

type Output = (D::Output, A::Output, B::Output, C::Output)

impl<E: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator> ValueGenerator for (A, B, C, D, E)[src]

type Output = (E::Output, A::Output, B::Output, C::Output, D::Output)

impl<F: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator> ValueGenerator for (A, B, C, D, E, F)[src]

type Output = (F::Output, A::Output, B::Output, C::Output, D::Output, E::Output)

impl<G: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G)[src]

type Output = (G::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output)

impl<H: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H)[src]

type Output = (H::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output)

impl<I: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I)[src]

type Output = (I::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output)

impl<J: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J)[src]

type Output = (J::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output)

impl<K: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K)[src]

type Output = (K::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output)

impl<L: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator, K: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K, L)[src]

type Output = (L::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output)

impl<M: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator, K: ValueGenerator, L: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K, L, M)[src]

type Output = (M::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output, L::Output)

impl<N: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator, K: ValueGenerator, L: ValueGenerator, M: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)[src]

type Output = (N::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output, L::Output, M::Output)

impl<O: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator, K: ValueGenerator, L: ValueGenerator, M: ValueGenerator, N: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)[src]

type Output = (O::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output, L::Output, M::Output, N::Output)

impl<P: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator, K: ValueGenerator, L: ValueGenerator, M: ValueGenerator, N: ValueGenerator, O: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)[src]

type Output = (P::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output, L::Output, M::Output, N::Output, O::Output)

impl<Q: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator, K: ValueGenerator, L: ValueGenerator, M: ValueGenerator, N: ValueGenerator, O: ValueGenerator, P: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)[src]

type Output = (Q::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output, L::Output, M::Output, N::Output, O::Output, P::Output)

impl<R: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator, K: ValueGenerator, L: ValueGenerator, M: ValueGenerator, N: ValueGenerator, O: ValueGenerator, P: ValueGenerator, Q: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)[src]

type Output = (R::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output, L::Output, M::Output, N::Output, O::Output, P::Output, Q::Output)

impl<S: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator, K: ValueGenerator, L: ValueGenerator, M: ValueGenerator, N: ValueGenerator, O: ValueGenerator, P: ValueGenerator, Q: ValueGenerator, R: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)[src]

type Output = (S::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output, L::Output, M::Output, N::Output, O::Output, P::Output, Q::Output, R::Output)

impl<T: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator, K: ValueGenerator, L: ValueGenerator, M: ValueGenerator, N: ValueGenerator, O: ValueGenerator, P: ValueGenerator, Q: ValueGenerator, R: ValueGenerator, S: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)[src]

type Output = (T::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output, L::Output, M::Output, N::Output, O::Output, P::Output, Q::Output, R::Output, S::Output)

impl<U: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator, K: ValueGenerator, L: ValueGenerator, M: ValueGenerator, N: ValueGenerator, O: ValueGenerator, P: ValueGenerator, Q: ValueGenerator, R: ValueGenerator, S: ValueGenerator, T: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)[src]

type Output = (U::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output, L::Output, M::Output, N::Output, O::Output, P::Output, Q::Output, R::Output, S::Output, T::Output)

impl<V: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator, K: ValueGenerator, L: ValueGenerator, M: ValueGenerator, N: ValueGenerator, O: ValueGenerator, P: ValueGenerator, Q: ValueGenerator, R: ValueGenerator, S: ValueGenerator, T: ValueGenerator, U: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)[src]

type Output = (V::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output, L::Output, M::Output, N::Output, O::Output, P::Output, Q::Output, R::Output, S::Output, T::Output, U::Output)

impl<W: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator, K: ValueGenerator, L: ValueGenerator, M: ValueGenerator, N: ValueGenerator, O: ValueGenerator, P: ValueGenerator, Q: ValueGenerator, R: ValueGenerator, S: ValueGenerator, T: ValueGenerator, U: ValueGenerator, V: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W)[src]

type Output = (W::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output, L::Output, M::Output, N::Output, O::Output, P::Output, Q::Output, R::Output, S::Output, T::Output, U::Output, V::Output)

impl<X: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator, K: ValueGenerator, L: ValueGenerator, M: ValueGenerator, N: ValueGenerator, O: ValueGenerator, P: ValueGenerator, Q: ValueGenerator, R: ValueGenerator, S: ValueGenerator, T: ValueGenerator, U: ValueGenerator, V: ValueGenerator, W: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X)[src]

type Output = (X::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output, L::Output, M::Output, N::Output, O::Output, P::Output, Q::Output, R::Output, S::Output, T::Output, U::Output, V::Output, W::Output)

impl<Y: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator, K: ValueGenerator, L: ValueGenerator, M: ValueGenerator, N: ValueGenerator, O: ValueGenerator, P: ValueGenerator, Q: ValueGenerator, R: ValueGenerator, S: ValueGenerator, T: ValueGenerator, U: ValueGenerator, V: ValueGenerator, W: ValueGenerator, X: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y)[src]

type Output = (Y::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output, L::Output, M::Output, N::Output, O::Output, P::Output, Q::Output, R::Output, S::Output, T::Output, U::Output, V::Output, W::Output, X::Output)

impl<Z: ValueGenerator, A: ValueGenerator, B: ValueGenerator, C: ValueGenerator, D: ValueGenerator, E: ValueGenerator, F: ValueGenerator, G: ValueGenerator, H: ValueGenerator, I: ValueGenerator, J: ValueGenerator, K: ValueGenerator, L: ValueGenerator, M: ValueGenerator, N: ValueGenerator, O: ValueGenerator, P: ValueGenerator, Q: ValueGenerator, R: ValueGenerator, S: ValueGenerator, T: ValueGenerator, U: ValueGenerator, V: ValueGenerator, W: ValueGenerator, X: ValueGenerator, Y: ValueGenerator> ValueGenerator for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)[src]

type Output = (Z::Output, A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output, I::Output, J::Output, K::Output, L::Output, M::Output, N::Output, O::Output, P::Output, Q::Output, R::Output, S::Output, T::Output, U::Output, V::Output, W::Output, X::Output, Y::Output)

Loading content...

Implementors

impl ValueGenerator for BooleanGenerator[src]

type Output = bool

impl<F: Fn(&mut dyn RngCore) -> T, T> ValueGenerator for FnGenerator<F, T>[src]

type Output = T

impl<G: ValueGenerator, M: Fn(G::Output) -> T, T> ValueGenerator for MapGenerator<G, M>[src]

type Output = T

impl<G: ValueGenerator, M: Fn(G::Output, &mut dyn RngCore) -> T, T> ValueGenerator for AndThenGenerator<G, M>[src]

type Output = T

impl<T: TypeGenerator> ValueGenerator for TypedGen<T>[src]

type Output = T

impl<T: Clone> ValueGenerator for Constant<T>[src]

type Output = T

Loading content...