Skip to main content

ProjectableToField

Trait ProjectableToField 

Source
pub trait ProjectableToField<F: PrimeField> {
    // Required method
    fn prepare_projection(
        sampled_value: &F,
    ) -> impl Fn(&Self) -> F + Send + Sync + 'static;
}
Expand description

Trait for preparing a projection function to a field element from a current type.

Required Methods§

Source

fn prepare_projection( sampled_value: &F, ) -> impl Fn(&Self) -> F + Send + Sync + 'static

Prepare a projection function that will project the current type to a prime field using the given sampled value.

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<Mod: ConstMontyParams<LIMBS>, const LIMBS: usize, const LIMBS2: usize> ProjectableToField<ConstMontyField<Mod, LIMBS>> for Int<LIMBS2>

Source§

fn prepare_projection( _sampled_value: &ConstMontyField<Mod, LIMBS>, ) -> impl Fn(&Self) -> ConstMontyField<Mod, LIMBS> + Send + Sync + 'static

Implementors§

Source§

impl<T> ProjectableToField<BoxedMontyField> for T
where BoxedMontyField: for<'a> FromWithConfig<&'a T>,

Source§

impl<T, const LIMBS: usize> ProjectableToField<MontyField<LIMBS>> for T
where MontyField<LIMBS>: for<'a> FromWithConfig<&'a T>,