pub trait Integer:
'static
+ Add<Output = Self>
+ for<'a> Add<&'a Self, Output = Self>
+ AddAssign<Self>
+ for<'a> AddAssign<&'a Self>
+ AddMod<Output = Self>
+ AsRef<[Limb]>
+ BitAnd<Output = Self>
+ for<'a> BitAnd<&'a Self, Output = Self>
+ BitAndAssign
+ for<'a> BitAndAssign<&'a Self>
+ BitOr<Output = Self>
+ for<'a> BitOr<&'a Self, Output = Self>
+ BitOrAssign
+ for<'a> BitOrAssign<&'a Self>
+ BitXor<Output = Self>
+ for<'a> BitXor<&'a Self, Output = Self>
+ BitXorAssign
+ for<'a> BitXorAssign<&'a Self>
+ BitOps
+ CheckedAdd
+ CheckedSub
+ CheckedMul
+ CheckedDiv
+ Clone
+ ConstantTimeEq
+ ConstantTimeGreater
+ ConstantTimeLess
+ ConstantTimeSelect
+ Debug
+ Default
+ Div<NonZero<Self>, Output = Self>
+ for<'a> Div<&'a NonZero<Self>, Output = Self>
+ DivAssign<NonZero<Self>>
+ for<'a> DivAssign<&'a NonZero<Self>>
+ DivRemLimb
+ Eq
+ From<u8>
+ From<u16>
+ From<u32>
+ From<u64>
+ From<Limb>
+ Mul<Output = Self>
+ for<'a> Mul<&'a Self, Output = Self>
+ MulAssign<Self>
+ for<'a> MulAssign<&'a Self>
+ MulMod<Output = Self>
+ NegMod<Output = Self>
+ Not<Output = Self>
+ Ord
+ Rem<NonZero<Self>, Output = Self>
+ for<'a> Rem<&'a NonZero<Self>, Output = Self>
+ RemAssign<NonZero<Self>>
+ for<'a> RemAssign<&'a NonZero<Self>>
+ RemLimb
+ Send
+ Sized
+ Shl<u32, Output = Self>
+ ShlAssign<u32>
+ ShlVartime
+ Shr<u32, Output = Self>
+ ShrAssign<u32>
+ ShrVartime
+ Sub<Output = Self>
+ for<'a> Sub<&'a Self, Output = Self>
+ SubAssign<Self>
+ for<'a> SubAssign<&'a Self>
+ SubMod<Output = Self>
+ Sync
+ SquareRoot
+ WrappingAdd
+ WrappingSub
+ WrappingMul
+ WrappingNeg
+ WrappingShl
+ WrappingShr
+ Zero {
type Monty: Monty<Integer = Self>;
// Required methods
fn one() -> Self;
fn from_limb_like(limb: Limb, other: &Self) -> Self;
fn nlimbs(&self) -> usize;
// Provided methods
fn one_like(other: &Self) -> Self { ... }
fn is_odd(&self) -> Choice { ... }
fn is_even(&self) -> Choice { ... }
}Expand description
Integer trait: represents common functionality of integer types provided by this crate.
Required Associated Types§
Required Methods§
Sourcefn from_limb_like(limb: Limb, other: &Self) -> Self
fn from_limb_like(limb: Limb, other: &Self) -> Self
Returns an integer with the first limb set to limb, and the same precision as other.
Provided Methods§
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.