[−][src]Struct accumulator::uint::U256
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 f
s, number of f
s removed)
Trait Implementations
impl Eq for U256
[src]
impl Copy for U256
[src]
impl PartialOrd<U256> for U256
[src]
fn partial_cmp(&self, x: &Self) -> Option<Ordering>
[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]
fn eq(&self, u: &u64) -> bool
[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 cmp(&self, x: &Self) -> Ordering
[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(&self) -> 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]
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.
fn mul(self, x: &Self) -> U512
[src]
impl Mul<U256> for U256
[src]
type Output = U512
The resulting type after applying the *
operator.
fn mul(self, x: Self) -> U512
[src]
impl<'_> Div<&'_ U256> for U256
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, x: &Self) -> Self
[src]
impl Div<U256> for U256
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, x: Self) -> Self
[src]
impl<'_> Rem<&'_ U256> for U256
[src]
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, x: &Self) -> Self
[src]
impl Rem<U256> for U256
[src]
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, x: Self) -> Self
[src]
impl<'_> Rem<&'_ U256> for U512
[src]
type Output = U256
The resulting type after applying the %
operator.
fn rem(self, x: &U256) -> U256
[src]
impl Rem<U256> for U512
[src]
type Output = U256
The resulting type after applying the %
operator.
fn rem(self, x: U256) -> U256
[src]
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]
fn rem_assign(&mut self, x: &Self)
[src]
impl RemAssign<U256> for U256
[src]
fn rem_assign(&mut self, x: Self)
[src]
impl Shl<u32> for U256
[src]
type Output = Self
The resulting type after applying the <<
operator.
fn shl(self, x: u32) -> Self
[src]
impl Shr<u32> for U256
[src]
type Output = Self
The resulting type after applying the >>
operator.
fn shr(self, x: u32) -> Self
[src]
impl ShlAssign<u32> for U256
[src]
fn shl_assign(&mut self, x: u32)
[src]
impl ShrAssign<u32> for U256
[src]
fn shr_assign(&mut self, x: u32)
[src]
impl Hash for U256
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Same for T
type Output = T
Should always be Self