Skip to main content

ConstPrimInt

Trait ConstPrimInt 

Source
pub trait ConstPrimInt:
    ConstBitPrimInt
    + Add<Output = Self>
    + Sub<Output = Self>
    + Mul<Output = Self>
    + Div<Output = Self>
    + AddAssign
    + SubAssign
    + PartialEq
    + Eq
    + PartialOrd
    + Ord
    + From<u8>
    + Default
    + ConstBounded {
    // Required method
    fn pow(self, exp: u32) -> Self;
}
Expand description

Base arithmetic traits for constant primitive integers.

Extends ConstBitPrimInt with the arithmetic + ordering operations that aren’t generally available on CT-restricted types. Implementors like FixedUInt<_, _, Ct> will get ConstBitPrimInt but not the full ConstPrimInt because they don’t expose Div (long division is the leaky algorithmic core for unsigned big integers).

Required Methods§

Source

fn pow(self, exp: u32) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ConstPrimInt for u8

Source§

fn pow(self, exp: u32) -> Self

Source§

impl ConstPrimInt for u16

Source§

fn pow(self, exp: u32) -> Self

Source§

impl ConstPrimInt for u32

Source§

fn pow(self, exp: u32) -> Self

Source§

impl ConstPrimInt for u64

Source§

fn pow(self, exp: u32) -> Self

Source§

impl ConstPrimInt for u128

Source§

fn pow(self, exp: u32) -> Self

Implementors§

Source§

impl<T: ConstMachineWord + MachineWord, const N: usize> ConstPrimInt for FixedUInt<T, N, Nct>