pub trait Integer: Debug + Eq + Ord + BitAnd<Output = Self> + Div<Output = Self> + Shl<usize, Output = Self> + Shr<usize, Output = Self> + Add<Output = Self> + Sub<Output = Self> + TryFrom<usize, Error = Self::TryFromUsizeError> + TryInto<u64, Error = Self::TryIntoU64Error> {
type TryFromUsizeError: Error;
type TryIntoU64Error: Error;
// Required methods
fn zero() -> Self;
fn one() -> Self;
}
Expand description
An integer type that accompanies a finite field. Integers and field elements may be converted back and forth via the natural map between residue classes modulo ‘p’ and integers between 0 and p - 1.
Required Associated Types§
sourcetype TryFromUsizeError: Error
type TryFromUsizeError: Error
The error returned if converting usize
to this integer type fails.
sourcetype TryIntoU64Error: Error
type TryIntoU64Error: Error
The error returned if converting this integer type to a u64
fails.
Required Methods§
Object Safety§
This trait is not object safe.