p3_challenger

Trait CanSample

Source
pub trait CanSample<T> {
    // Required method
    fn sample(&mut self) -> T;

    // Provided methods
    fn sample_array<const N: usize>(&mut self) -> [T; N] { ... }
    fn sample_vec(&mut self, n: usize) -> Vec<T> { ... }
}

Required Methods§

Source

fn sample(&mut self) -> T

Provided Methods§

Source

fn sample_array<const N: usize>(&mut self) -> [T; N]

Source

fn sample_vec(&mut self, n: usize) -> Vec<T>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, C, T> CanSample<T> for &'a mut C
where C: CanSample<T>,

Source§

fn sample(&mut self) -> T

Source§

fn sample_array<const N: usize>(&mut self) -> [T; N]

Source§

fn sample_vec(&mut self, n: usize) -> Vec<T>

Implementors§

Source§

impl<F, EF, Inner> CanSample<EF> for SerializingChallenger32<F, Inner>
where F: PrimeField32, EF: ExtensionField<F>, Inner: CanSample<u8>,

Source§

impl<F, EF, Inner> CanSample<EF> for SerializingChallenger64<F, Inner>
where F: PrimeField64, EF: ExtensionField<F>, Inner: CanSample<u8>,

Source§

impl<F, EF, P, const WIDTH: usize, const RATE: usize> CanSample<EF> for DuplexChallenger<F, P, WIDTH, RATE>

Source§

impl<F, EF, PF, P, const WIDTH: usize, const RATE: usize> CanSample<EF> for MultiField32Challenger<F, PF, P, WIDTH, RATE>

Source§

impl<T, H, const OUT_LEN: usize> CanSample<T> for HashChallenger<T, H, OUT_LEN>