[][src]Struct accumulator::uint::U512

pub struct U512 { /* fields omitted */ }

Methods

impl U512[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 U512[src]

pub fn low_u256(self) -> U256[src]

Returns the lower half of this U512 as a U256. TODO: Make checked?

Trait Implementations

impl Eq for U512[src]

impl Copy for U512[src]

impl PartialOrd<U512> for U512[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<U512> for U512[src]

impl PartialEq<u64> for U512[src]

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

This method tests for !=.

impl From<[u64; 8]> for U512[src]

impl From<u64> for U512[src]

impl From<[u8; 64]> for U512[src]

Lower-endian bytes.

impl<'_> From<&'_ [u8; 64]> for U512[src]

Lower-endian bytes.

impl From<U512> for Integer[src]

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

impl From<U256> for U512[src]

impl Ord for U512[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 U512[src]

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

Performs copy-assignment from source. Read more

impl Debug for U512[src]

impl Add<U512> for U512[src]

type Output = Self

Panics if result overflows.

impl Add<u64> for U512[src]

type Output = Self

The resulting type after applying the + operator.

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

Panics if result overflows.

impl Sub<U512> for U512[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 U512[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 &'_ U512[src]

type Output = U512

The resulting type after applying the - operator.

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

Panics if result is negative.

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

type Output = Self

The resulting type after applying the / operator.

impl Div<U512> for U512[src]

type Output = Self

The resulting type after applying the / operator.

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

type Output = Self

The resulting type after applying the % operator.

impl Rem<U512> for U512[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<U512> for U512[src]

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

Panics if result overflows.

impl SubAssign<U512> for U512[src]

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

Panics if result is negative.

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

impl RemAssign<U512> for U512[src]

impl Shl<u32> for U512[src]

type Output = Self

The resulting type after applying the << operator.

impl Shr<u32> for U512[src]

type Output = Self

The resulting type after applying the >> operator.

impl ShlAssign<u32> for U512[src]

impl ShrAssign<u32> for U512[src]

impl Hash for U512[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 U512

impl Sync for U512

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