impl_sum_prod_base_field

Macro impl_sum_prod_base_field 

Source
macro_rules! impl_sum_prod_base_field {
    ($alg_type:ty, $field_type:ty $(, ($type_param:ty, $param_name:ty))?) => { ... };
}
Expand description

Given two structs Alg and Field where Alg implements From<Field>, implement Sum<Field> and Product<Field> for Alg.

Both are implemented in the simplest way by simply computing the Sum/Product as field elements before mapping to an Alg element using From.