[][src]Struct zkp_u256::U256

pub struct U256 {
    pub c0: u64,
    pub c1: u64,
    pub c2: u64,
    pub c3: u64,
}

Fields

c0: u64c1: u64c2: u64c3: u64

Methods

impl U256[src]

pub const MAX: Self[src]

pub const ONE: Self[src]

pub const ZERO: Self[src]

pub const fn from_limbs(c0: u64, c1: u64, c2: u64, c3: u64) -> Self[src]

pub fn from_bytes_be(n: &[u8; 32]) -> Self[src]

pub fn to_bytes_be(&self) -> [u8; 32][src]

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

pub fn from_decimal_str(s: &str) -> Result<Self, ParseError>[src]

pub fn to_decimal_str(&self) -> String[src]

pub fn from_hex_str(s: &str) -> Self[src]

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

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

pub fn bits(&self) -> usize[src]

pub fn msb(&self) -> usize[src]

pub fn bit(&self, i: usize) -> bool[src]

pub fn leading_zeros(&self) -> usize[src]

pub fn trailing_zeros(&self) -> usize[src]

pub const fn mul_full(&self, rhs: &Self) -> (Self, Self)[src]

pub const fn sqr_full(&self) -> (Self, Self)[src]

pub fn divrem_u64(&self, rhs: u64) -> Option<(Self, u64)>[src]

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

pub fn mulmod(&self, rhs: &Self, modulus: &Self) -> Self[src]

pub fn invmod256(&self) -> Option<Self>[src]

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

pub fn pow(&self, exponent: u64) -> Option<Self>[src]

impl U256[src]

pub fn as_u8(&self) -> u8[src]

pub fn as_u16(&self) -> u16[src]

pub fn as_u32(&self) -> u32[src]

pub fn as_u64(&self) -> u64[src]

pub fn as_usize(&self) -> usize[src]

pub fn as_i8(&self) -> i8[src]

pub fn as_i16(&self) -> i16[src]

pub fn as_i32(&self) -> i32[src]

pub fn as_i64(&self) -> i64[src]

pub fn as_isize(&self) -> isize[src]

pub fn as_u128(&self) -> u128[src]

pub fn as_i128(&self) -> i128[src]

Trait Implementations

impl From<u8> for U256[src]

impl From<u16> for U256[src]

impl From<u32> for U256[src]

impl From<u64> for U256[src]

impl From<usize> for U256[src]

impl From<u128> for U256[src]

impl From<i8> for U256[src]

impl From<i16> for U256[src]

impl From<i32> for U256[src]

impl From<i64> for U256[src]

impl From<isize> for U256[src]

impl From<i128> for U256[src]

impl Clone for U256[src]

impl Default for U256[src]

impl PartialOrd<U256> for U256[src]

impl Eq for U256[src]

impl Ord for U256[src]

impl PartialEq<U256> for U256[src]

impl Debug for U256[src]

impl Display for U256[src]

impl Sub<U256> for U256[src]

type Output = Self

The resulting type after applying the - operator.

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

type Output = Self

The resulting type after applying the - operator.

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

type Output = U256

The resulting type after applying the - operator.

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

type Output = U256

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 &'_ U256[src]

type Output = U256

The resulting type after applying the % operator.

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

type Output = U256

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<'_> Div<U256> for &'_ U256[src]

type Output = U256

The resulting type after applying the / operator.

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

type Output = U256

The resulting type after applying the / operator.

impl Add<U256> for U256[src]

type Output = Self

The resulting type after applying the + operator.

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

type Output = Self

The resulting type after applying the + operator.

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

type Output = U256

The resulting type after applying the + operator.

impl<'_, '_> Add<&'_ U256> for &'_ U256[src]

type Output = U256

The resulting type after applying the + operator.

impl Mul<U256> for U256[src]

type Output = Self

The resulting type after applying the * operator.

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

type Output = Self

The resulting type after applying the * operator.

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

type Output = U256

The resulting type after applying the * operator.

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

type Output = U256

The resulting type after applying the * operator.

impl Mul<u64> for U256[src]

type Output = Self

The resulting type after applying the * operator.

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

type Output = U256

The resulting type after applying the * operator.

impl Mul<U256> for u64[src]

type Output = U256

The resulting type after applying the * operator.

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

type Output = U256

The resulting type after applying the * operator.

impl Mul<u128> for U256[src]

type Output = Self

The resulting type after applying the * operator.

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

type Output = U256

The resulting type after applying the * operator.

impl Mul<U256> for u128[src]

type Output = U256

The resulting type after applying the * operator.

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

type Output = U256

The resulting type after applying the * operator.

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

impl AddAssign<U256> for U256[src]

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

impl SubAssign<U256> for U256[src]

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

impl MulAssign<U256> for U256[src]

impl MulAssign<u64> for U256[src]

impl MulAssign<u128> for U256[src]

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

impl DivAssign<U256> for U256[src]

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

impl RemAssign<U256> for U256[src]

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

type Output = u64

The resulting type after applying the & operator.

impl BitAnd<U256> for U256[src]

type Output = Self

The resulting type after applying the & operator.

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

type Output = Self

The resulting type after applying the & operator.

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

type Output = U256

The resulting type after applying the & operator.

impl<'_, '_> BitAnd<&'_ U256> for &'_ U256[src]

type Output = U256

The resulting type after applying the & operator.

impl Shl<usize> for U256[src]

type Output = Self

The resulting type after applying the << operator.

impl Shr<usize> for U256[src]

type Output = Self

The resulting type after applying the >> operator.

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

impl BitAndAssign<U256> for U256[src]

impl ShlAssign<usize> for U256[src]

impl ShrAssign<usize> for U256[src]

Auto Trait Implementations

impl Send for U256

impl Sync for U256

impl Unpin for U256

impl UnwindSafe for U256

impl RefUnwindSafe for U256

Blanket Implementations

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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