pub trait PrimeField64: PrimeField {
const ORDER_U64: u64;
// Required method
fn as_canonical_u64(&self) -> u64;
// Provided method
fn to_unique_u64(&self) -> u64 { ... }
}Expand description
A prime field ℤ/p with order, p < 2^64.
Required Associated Constants§
Required Methods§
Sourcefn as_canonical_u64(&self) -> u64
fn as_canonical_u64(&self) -> u64
Return the representative of value in canonical form
which lies in the range 0 <= x < ORDER_U64.
Provided Methods§
Sourcefn to_unique_u64(&self) -> u64
fn to_unique_u64(&self) -> u64
Convert a field element to a u64 such that any two field elements
are converted to the same u64 if and only if they represent the same value.
This will be the fastest way to convert a field element to a u64 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.