[][src]Struct accumulator::uint::U256

pub struct U256 { /* fields omitted */ }

Methods

impl U256[src]

pub fn zero() -> Self[src]

pub fn is_zero(&self) -> bool[src]

pub fn one() -> Self[src]

pub fn is_odd(&self) -> bool[src]

pub fn mod_inv(self, m: &Self) -> Option<Self>[src]

Panics if m == 0.

pub fn pow_mod(self, e: Self, m: &Self) -> Self[src]

Panics if m == 0.

pub fn is_perfect_square(&self) -> bool[src]

pub fn jacobi(a: i32, b: &Self) -> i32[src]

pub fn is_congruent(self, i: i32, m: &Self) -> bool[src]

pub fn is_divisible_u(&self, u: u64) -> bool[src]

pub fn write_binary(&self, buf: &mut [u8]) -> usize[src]

Panics if buf is not large enough.

pub fn from_be_bytes(bytes: &[u8]) -> Self[src]

impl U256[src]

pub fn remove_factor(self, f: Self) -> (Self, u64)[src]

Returns (result of removing all fs, number of fs removed)

Trait Implementations

impl Eq for U256[src]

impl Copy for U256[src]

impl PartialOrd<U256> for U256[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq<U256> for U256[src]

impl PartialEq<u64> for U256[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl From<[u64; 4]> for U256[src]

impl From<u64> for U256[src]

impl From<[u8; 32]> for U256[src]

Lower-endian bytes.

impl<'_> From<&'_ [u8; 32]> for U256[src]

Lower-endian bytes.

impl From<U256> for Integer[src]

impl<'_> From<&'_ U256> for U512[src]

impl From<U256> for U512[src]

impl Ord for U256[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Clone for U256[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for U256[src]

impl Add<U256> for U256[src]

type Output = Self

Panics if result overflows.

impl Add<u64> for U256[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, x: u64) -> Self[src]

Panics if result overflows.

impl Sub<U256> for U256[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, x: Self) -> Self[src]

Panics if result is negative.

impl Sub<u64> for U256[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, x: u64) -> Self[src]

Panics if result is negative.

impl<'_> Sub<u64> for &'_ U256[src]

type Output = U256

The resulting type after applying the - operator.

fn sub(self, x: u64) -> U256[src]

Panics if result is negative.

impl<'_> Mul<&'_ U256> for U256[src]

It turns out to be faster to provide multiplication as U256 * U256 -> U512, because it lets us use mpn_mul_n instead of mpn_mul.

type Output = U512

The resulting type after applying the * operator.

impl Mul<U256> for U256[src]

type Output = U512

The resulting type after applying the * operator.

impl<'_> Div<&'_ U256> for U256[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<U256> for U256[src]

type Output = Self

The resulting type after applying the / operator.

impl<'_> Rem<&'_ U256> for U256[src]

type Output = Self

The resulting type after applying the % operator.

impl Rem<U256> for U256[src]

type Output = Self

The resulting type after applying the % operator.

impl<'_> Rem<&'_ U256> for U512[src]

type Output = U256

The resulting type after applying the % operator.

impl Rem<U256> for U512[src]

type Output = U256

The resulting type after applying the % operator.

impl AddAssign<U256> for U256[src]

fn add_assign(&mut self, x: Self)[src]

Panics if result overflows.

impl SubAssign<U256> for U256[src]

fn sub_assign(&mut self, x: Self)[src]

Panics if result is negative.

impl<'_> RemAssign<&'_ U256> for U256[src]

impl RemAssign<U256> for U256[src]

impl Shl<u32> for U256[src]

type Output = Self

The resulting type after applying the << operator.

impl Shr<u32> for U256[src]

type Output = Self

The resulting type after applying the >> operator.

impl ShlAssign<u32> for U256[src]

impl ShrAssign<u32> for U256[src]

impl Hash for U256[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for U256

impl Sync for U256

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self