pub trait Field<C: ECDSACurve>: PrimeField {
// Required methods
fn from_bytes(bytes: &FieldBytes<C>) -> CtOption<Self>;
fn to_bytes(self) -> FieldBytes<C>;
fn normalize(self) -> Self;
}Expand description
Alias trait for the ff::PrimeField with 32 byte field elements.
Note: All bytes should be considered to be in big-endian format.
Required Methods§
Sourcefn from_bytes(bytes: &FieldBytes<C>) -> CtOption<Self>
fn from_bytes(bytes: &FieldBytes<C>) -> CtOption<Self>
Create an instance of self from a FieldBytes.
Sourcefn to_bytes(self) -> FieldBytes<C>
fn to_bytes(self) -> FieldBytes<C>
Convert self to a FieldBytes.
Note: Implementers should ensure these methods normalize first.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".