Skip to main content

WitnessInstanceSampler

Trait WitnessInstanceSampler 

Source
pub trait WitnessInstanceSampler<W, U> {
    type Source;
    type Error: Error;

    // Required method
    fn sample(
        &self,
        source: Self::Source,
        rng: impl RngCore,
    ) -> Result<(W, U), Self::Error>;
}
Expand description

WitnessInstanceSampler allows sampling a random witness-instance pair that satisfies the relation.

Required Associated Types§

Source

type Source

WitnessInstanceSampler::Source defines the type of the source from which a satisfying pair is sampled.

Source

type Error: Error

WitnessInstanceSampler::Error defines the error type that may occur when sampling a satisfying pair.

Required Methods§

Source

fn sample( &self, source: Self::Source, rng: impl RngCore, ) -> Result<(W, U), Self::Error>

WitnessInstanceSampler::sample draws a random satisfying pair.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§