Trait Field

Source
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§

Source

fn from_bytes(bytes: &FieldBytes<C>) -> CtOption<Self>

Create an instance of self from a FieldBytes.

Source

fn to_bytes(self) -> FieldBytes<C>

Convert self to a FieldBytes.

Note: Implementers should ensure these methods normalize first.

Source

fn normalize(self) -> Self

Ensure the field element is normalized.

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§