Trait FieldSpec

Source
pub trait FieldSpec: Clone {
    type BackendField: Add<Self::BackendField, Output = Self::BackendField> + Sub<Self::BackendField, Output = Self::BackendField> + Mul<Self::BackendField, Output = Self::BackendField> + Neg<Output = Self::BackendField> + Clone + TryFrom<BigInt, Error = Error> + ZkpInto<BigInt>;

    const FIELD_MODULUS: BigInt;
}
Expand description

Indicates the given type is a field used used in a ZKP backend. E.g. Bulletproofs uses Ristretto Scalar values.

Required Associated Constants§

Source

const FIELD_MODULUS: BigInt

The modulus defining the FieldSpec::BackendField type.

Required Associated Types§

Source

type BackendField: Add<Self::BackendField, Output = Self::BackendField> + Sub<Self::BackendField, Output = Self::BackendField> + Mul<Self::BackendField, Output = Self::BackendField> + Neg<Output = Self::BackendField> + Clone + TryFrom<BigInt, Error = Error> + ZkpInto<BigInt>

The underlying field type used in a backend.

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§