PrimeField

Trait PrimeField 

Source
pub trait PrimeField:
    Field
    + Ord
    + QuotientMap<u8>
    + QuotientMap<u16>
    + QuotientMap<u32>
    + QuotientMap<u64>
    + QuotientMap<u128>
    + QuotientMap<usize>
    + QuotientMap<i8>
    + QuotientMap<i16>
    + QuotientMap<i32>
    + QuotientMap<i64>
    + QuotientMap<i128>
    + QuotientMap<isize> {
    // Required method
    fn as_canonical_biguint(&self) -> BigUint;
}
Expand description

A field isomorphic to ℤ/p for some prime p.

There is a natural map from to ℤ/p which sends an integer r to its conjugacy class [r]. Canonically, each conjugacy class [r] can be represented by the unique integer s in [0, p - 1) satisfying s = r mod p. This however is often not the most convenient computational representation and so internal representations of field elements might differ from this and may change over time.

Required Methods§

Source

fn as_canonical_biguint(&self) -> BigUint

Return the representative of value in canonical form which lies in the range 0 <= x < self.order().

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§