[][src]Struct zkp_u256::U256

pub struct U256(_);

Implementations

impl U256[src]

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

pub fn to_bytes_be(&self) -> [u8; 32][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]

impl U256[src]

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

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

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

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

impl U256[src]

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

Note: if modulus is a constant, it is faster to use montgomery::mulmod with precomputed parameters.

impl U256[src]

pub const MAX: Self[src]

pub const ONE: Self[src]

pub const ZERO: Self[src]

pub const fn from_limbs(limbs: [u64; 4]) -> Self[src]

pub const fn as_limbs(&self) -> &[u64; 4][src]

pub fn limb(&self, index: usize) -> u64[src]

pub fn set_limb(&mut self, index: usize, value: u64)[src]

Trait Implementations

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

impl AddAssign<U256> for U256[src]

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

type High = u64

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

impl Binary for U256[src]

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

type Output = u64

The resulting type after applying the & operator.

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

impl BitAndAssign<U256> for U256[src]

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

type Output = Self

The resulting type after applying the | operator.

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

type Output = U256

The resulting type after applying the | operator.

impl BitOr<U256> for U256[src]

type Output = Self

The resulting type after applying the | operator.

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

type Output = U256

The resulting type after applying the | operator.

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

impl BitOrAssign<U256> for U256[src]

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

type Output = Self

The resulting type after applying the ^ operator.

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

type Output = U256

The resulting type after applying the ^ operator.

impl BitXor<U256> for U256[src]

type Output = Self

The resulting type after applying the ^ operator.

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

type Output = U256

The resulting type after applying the ^ operator.

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

impl BitXorAssign<U256> for U256[src]

impl Bounded for U256[src]

impl Clone for U256[src]

impl Debug for U256[src]

impl Default for U256[src]

impl<'a> Deserialize<'a> for U256[src]

impl Display for U256[src]

impl Distribution<U256> for Standard[src]

Draw from a uniform distribution over all values.

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

impl DivAssign<U256> for U256[src]

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

type Quotient = Self

type Remainder = Self

impl DivRem<u64> for U256[src]

type Quotient = Self

type Remainder = u64

impl Eq for U256[src]

impl From<bool> for U256[src]

impl From<i128> for U256[src]

impl From<i16> for U256[src]

impl From<i32> for U256[src]

impl From<i64> for U256[src]

impl From<i8> for U256[src]

impl From<isize> for U256[src]

impl From<u128> for U256[src]

impl From<u16> for U256[src]

impl From<u32> for U256[src]

impl From<u64> for U256[src]

impl From<u8> for U256[src]

impl From<usize> for U256[src]

impl FromPrimitive for U256[src]

impl GCD for U256[src]

impl Hash for U256[src]

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

Ring inversion.

type Output = Option<U256>

The result after applying the operator.

pub fn inv(self) -> Self::Output[src]

Computes the inverse modulo 2^256

impl InvMod for U256[src]

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

Computes the inverse modulo a given modulus

impl Montgomery for U256[src]

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

type Output = U256

The resulting type after applying the fused multiply-add.

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

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

impl MulAssign<U256> for U256[src]

impl MulAssign<u64> for U256[src]

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

type High = Self

impl MulFullInline<u64> for U256[src]

type High = u64

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

impl MulInline<u64> for U256[src]

impl Neg for U256[src]

type Output = Self

The resulting type after applying the - operator.

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

type Output = U256

The resulting type after applying the - operator.

impl NegInline for U256[src]

impl Not for U256[src]

type Output = Self

The resulting type after applying the ! operator.

impl Num for U256[src]

type FromStrRadixErr = ()

impl One for U256[src]

impl Ord for U256[src]

impl PartialEq<U256> for U256[src]

impl PartialOrd<U256> for U256[src]

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

type Output = U256

The result after applying the operator.

impl Product<U256> for U256[src]

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

impl RemAssign<U256> for U256[src]

impl SampleUniform for U256[src]

type Sampler = UniformU256

The UniformSampler implementation supporting type X.

impl Serialize for U256[src]

impl Shl<usize> for U256[src]

type Output = Self

The resulting type after applying the << operator.

impl ShlAssign<usize> for U256[src]

impl Shr<usize> for U256[src]

type Output = Self

The resulting type after applying the >> operator.

impl ShrAssign<usize> for U256[src]

impl SquareFullInline for U256[src]

impl SquareInline for U256[src]

impl StructuralEq for U256[src]

impl StructuralPartialEq for U256[src]

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

impl SubAssign<U256> for U256[src]

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

type High = u64

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

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

type High = u64

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

impl Sum<U256> for U256[src]

impl ToPrimitive for U256[src]

impl Unsigned for U256[src]

impl Zero for U256[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> NumAssign for T where
    T: Num + NumAssignOps<T>, 
[src]

impl<T, Rhs> NumAssignOps<Rhs> for T where
    T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, 
[src]

impl<T> NumAssignRef for T where
    T: NumAssign + for<'r> NumAssignOps<&'r T>, 
[src]

impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[src]

impl<T> NumRef for T where
    T: Num + for<'r> NumOps<&'r T, T>, 
[src]

impl<T, Base> RefNum<Base> for T where
    T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>, 
[src]

impl<Borrowed> SampleBorrow<Borrowed> for Borrowed where
    Borrowed: SampleUniform
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,