zinc_utils/projectable_to_field.rs
1use crypto_primitives::PrimeField;
2
3/// Trait for preparing a projection function to a field element from a current
4/// type.
5pub trait ProjectableToField<F: PrimeField> {
6 /// Prepare a projection function that will project the current type
7 /// to a prime field using the given sampled value.
8 fn prepare_projection(sampled_value: &F) -> impl Fn(&Self) -> F + Send + Sync + 'static;
9}