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§
Sourcetype Source
type Source
WitnessInstanceSampler::Source defines the type of the source from
which a satisfying pair is sampled.
Sourcetype Error: Error
type Error: Error
WitnessInstanceSampler::Error defines the error type that may occur
when sampling a satisfying pair.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".