pub trait IsSubFieldOf<F: IsField>: IsField {
// Required methods
fn mul(a: &Self::BaseType, b: &F::BaseType) -> F::BaseType;
fn add(a: &Self::BaseType, b: &F::BaseType) -> F::BaseType;
fn div(
a: &Self::BaseType,
b: &F::BaseType,
) -> Result<F::BaseType, FieldError>;
fn sub(a: &Self::BaseType, b: &F::BaseType) -> F::BaseType;
fn embed(a: Self::BaseType) -> F::BaseType;
fn to_subfield_vec(b: F::BaseType) -> Vec<Self::BaseType>;
}
Expand description
Represents the subfield relation between two fields.
Required Methods§
fn mul(a: &Self::BaseType, b: &F::BaseType) -> F::BaseType
fn add(a: &Self::BaseType, b: &F::BaseType) -> F::BaseType
fn div(a: &Self::BaseType, b: &F::BaseType) -> Result<F::BaseType, FieldError>
fn sub(a: &Self::BaseType, b: &F::BaseType) -> F::BaseType
fn embed(a: Self::BaseType) -> F::BaseType
fn to_subfield_vec(b: F::BaseType) -> Vec<Self::BaseType>
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.
Implementors§
impl IsSubFieldOf<Degree2ExtensionField> for BLS12377PrimeField
impl IsSubFieldOf<Degree2ExtensionField> for BLS12381PrimeField
impl IsSubFieldOf<Degree2ExtensionField> for BN254PrimeField
impl IsSubFieldOf<Degree4BabyBearExtensionField> for lambdaworks_math::field::fields::fft_friendly::babybear::Babybear31PrimeField
impl IsSubFieldOf<Degree4BabyBearU32ExtensionField> for lambdaworks_math::field::fields::fft_friendly::babybear_u32::Babybear31PrimeField
Implements efficient operations between a BabyBear element and a degree four extension element