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