pub trait NthRoot: Copy + Mul<Output = Self> + Ord + Shl<usize, Output = Self> + Shr<usize, Output = Self> + Div<Output = Self> + Add<Output = Self> + Sub<Output = Self> + From<u64> + Debug {
    const BITS: usize;
    const MAX: Self;

    // Required methods
    fn checked_mul(self, other: Self) -> Option<Self>;
    fn mul_usize(self, other: usize) -> Self;
    fn div_usize(self, other: usize) -> Self;
    fn bits(self) -> usize;
    fn init_root<N: RootDegree>(self) -> InitRoot<Self>;

    // Provided methods
    fn nth_root<N: RootDegree>(self) -> Self { ... }
    fn truncate(self, next_bits: usize, multiply: usize) -> (Self, usize) { ... }
}

Required Associated Constants§

source

const BITS: usize

source

const MAX: Self

Required Methods§

source

fn checked_mul(self, other: Self) -> Option<Self>

source

fn mul_usize(self, other: usize) -> Self

source

fn div_usize(self, other: usize) -> Self

source

fn bits(self) -> usize

source

fn init_root<N: RootDegree>(self) -> InitRoot<Self>

Provided Methods§

source

fn nth_root<N: RootDegree>(self) -> Self

source

fn truncate(self, next_bits: usize, multiply: usize) -> (Self, usize)

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl NthRoot for u64

source§

const BITS: usize = 64usize

source§

const MAX: u64 = 18_446_744_073_709_551_615u64

source§

fn checked_mul(self, other: Self) -> Option<Self>

source§

fn mul_usize(self, other: usize) -> Self

source§

fn div_usize(self, other: usize) -> Self

source§

fn bits(self) -> usize

source§

fn init_root<N: RootDegree>(self) -> InitRoot<Self>

source§

impl NthRoot for u128

source§

const BITS: usize = 128usize

source§

const MAX: u128 = 340_282_366_920_938_463_463_374_607_431_768_211_455u128

source§

fn checked_mul(self, other: Self) -> Option<Self>

source§

fn mul_usize(self, other: usize) -> Self

source§

fn div_usize(self, other: usize) -> Self

source§

fn bits(self) -> usize

source§

fn init_root<N: RootDegree>(self) -> InitRoot<Self>

source§

impl NthRoot for U256

source§

const BITS: usize = 256usize

source§

const MAX: U256 = U256::MAX

source§

fn checked_mul(self, other: Self) -> Option<Self>

source§

fn mul_usize(self, other: usize) -> Self

source§

fn div_usize(self, other: usize) -> Self

source§

fn bits(self) -> usize

source§

fn init_root<N: RootDegree>(self) -> InitRoot<Self>

source§

impl NthRoot for U512

source§

const BITS: usize = 512usize

source§

const MAX: U512 = U512::MAX

source§

fn checked_mul(self, other: Self) -> Option<Self>

source§

fn mul_usize(self, other: usize) -> Self

source§

fn div_usize(self, other: usize) -> Self

source§

fn bits(self) -> usize

source§

fn init_root<N: RootDegree>(self) -> InitRoot<Self>

Implementors§