pub trait CanSampleBits<T> {
// Required method
fn sample_bits(&mut self, bits: usize) -> T;
}Expand description
A trait for sampling random bitstrings from the Fiat-Shamir transcript.
Required Methods§
Sourcefn sample_bits(&mut self, bits: usize) -> T
fn sample_bits(&mut self, bits: usize) -> T
Sample a random bits-bit integer from the transcript.
The distribution should be reasonably close to uniform. (In practice, a small bias may arise when bit-decomposing a uniformly sampled field element)
Guarantees that the returned value fits within the requested bit width.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".