pub trait PrimeField32: PrimeField64 {
const ORDER_U32: u32;
// Required method
fn as_canonical_u32(&self) -> u32;
// Provided method
fn to_unique_u32(&self) -> u32 { ... }
}Expand description
A prime field ℤ/p with order p < 2^32.
Required Associated Constants§
Required Methods§
Sourcefn as_canonical_u32(&self) -> u32
fn as_canonical_u32(&self) -> u32
Return the representative of value in canonical form
which lies in the range 0 <= x < ORDER_U64.
Provided Methods§
Sourcefn to_unique_u32(&self) -> u32
fn to_unique_u32(&self) -> u32
Convert a field element to a u32 such that any two field elements
are converted to the same u32 if and only if they represent the same value.
This will be the fastest way to convert a field element to a u32 and
is intended for use in hashing. It will also be consistent across different targets.
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.