[−][src]Struct zkp_u256::U256
Fields
c0: u64
c1: u64
c2: u64
c3: 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]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Eq for U256
[src]
impl Ord for U256
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[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.
fn sub(self, rhs: Self) -> Self
[src]
impl<'_> Sub<&'_ U256> for U256
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: &Self) -> Self
[src]
impl<'_> Sub<U256> for &'_ U256
[src]
type Output = U256
The resulting type after applying the -
operator.
fn sub(self, rhs: U256) -> U256
[src]
impl<'_, '_> Sub<&'_ U256> for &'_ U256
[src]
type Output = U256
The resulting type after applying the -
operator.
fn sub(self, rhs: &U256) -> U256
[src]
impl Rem<U256> for U256
[src]
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, rhs: Self) -> Self
[src]
impl<'_> Rem<&'_ U256> for U256
[src]
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, rhs: &Self) -> Self
[src]
impl<'_> Rem<U256> for &'_ U256
[src]
type Output = U256
The resulting type after applying the %
operator.
fn rem(self, rhs: U256) -> U256
[src]
impl<'_, '_> Rem<&'_ U256> for &'_ U256
[src]
type Output = U256
The resulting type after applying the %
operator.
fn rem(self, rhs: &U256) -> U256
[src]
impl Div<U256> for U256
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: Self) -> Self
[src]
impl<'_> Div<&'_ U256> for U256
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: &Self) -> Self
[src]
impl<'_> Div<U256> for &'_ U256
[src]
type Output = U256
The resulting type after applying the /
operator.
fn div(self, rhs: U256) -> U256
[src]
impl<'_, '_> Div<&'_ U256> for &'_ U256
[src]
type Output = U256
The resulting type after applying the /
operator.
fn div(self, rhs: &U256) -> U256
[src]
impl Add<U256> for U256
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self
[src]
impl<'_> Add<&'_ U256> for U256
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: &Self) -> Self
[src]
impl<'_> Add<U256> for &'_ U256
[src]
type Output = U256
The resulting type after applying the +
operator.
fn add(self, rhs: U256) -> U256
[src]
impl<'_, '_> Add<&'_ U256> for &'_ U256
[src]
type Output = U256
The resulting type after applying the +
operator.
fn add(self, rhs: &U256) -> U256
[src]
impl Mul<U256> for U256
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: Self) -> Self
[src]
impl<'_> Mul<&'_ U256> for U256
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: &Self) -> Self
[src]
impl<'_> Mul<U256> for &'_ U256
[src]
type Output = U256
The resulting type after applying the *
operator.
fn mul(self, rhs: U256) -> U256
[src]
impl<'_, '_> Mul<&'_ U256> for &'_ U256
[src]
type Output = U256
The resulting type after applying the *
operator.
fn mul(self, rhs: &U256) -> U256
[src]
impl Mul<u64> for U256
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: u64) -> Self
[src]
impl<'_> Mul<u64> for &'_ U256
[src]
type Output = U256
The resulting type after applying the *
operator.
fn mul(self, rhs: u64) -> U256
[src]
impl Mul<U256> for u64
[src]
type Output = U256
The resulting type after applying the *
operator.
fn mul(self, rhs: U256) -> U256
[src]
impl<'_> Mul<&'_ U256> for u64
[src]
type Output = U256
The resulting type after applying the *
operator.
fn mul(self, rhs: &U256) -> U256
[src]
impl Mul<u128> for U256
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: u128) -> Self
[src]
impl<'_> Mul<u128> for &'_ U256
[src]
type Output = U256
The resulting type after applying the *
operator.
fn mul(self, rhs: u128) -> U256
[src]
impl Mul<U256> for u128
[src]
type Output = U256
The resulting type after applying the *
operator.
fn mul(self, rhs: U256) -> U256
[src]
impl<'_> Mul<&'_ U256> for u128
[src]
type Output = U256
The resulting type after applying the *
operator.
fn mul(self, rhs: &U256) -> U256
[src]
impl<'_> AddAssign<&'_ U256> for U256
[src]
fn add_assign(&mut self, rhs: &Self)
[src]
impl AddAssign<U256> for U256
[src]
fn add_assign(&mut self, rhs: Self)
[src]
impl<'_> SubAssign<&'_ U256> for U256
[src]
fn sub_assign(&mut self, rhs: &Self)
[src]
impl SubAssign<U256> for U256
[src]
fn sub_assign(&mut self, rhs: Self)
[src]
impl<'_> MulAssign<&'_ U256> for U256
[src]
fn mul_assign(&mut self, rhs: &Self)
[src]
impl MulAssign<U256> for U256
[src]
fn mul_assign(&mut self, rhs: Self)
[src]
impl MulAssign<u64> for U256
[src]
fn mul_assign(&mut self, rhs: u64)
[src]
impl MulAssign<u128> for U256
[src]
fn mul_assign(&mut self, rhs: u128)
[src]
impl<'_> DivAssign<&'_ U256> for U256
[src]
fn div_assign(&mut self, rhs: &Self)
[src]
impl DivAssign<U256> for U256
[src]
fn div_assign(&mut self, rhs: Self)
[src]
impl<'_> RemAssign<&'_ U256> for U256
[src]
fn rem_assign(&mut self, rhs: &Self)
[src]
impl RemAssign<U256> for U256
[src]
fn rem_assign(&mut self, rhs: Self)
[src]
impl<'_> BitAnd<u64> for &'_ U256
[src]
type Output = u64
The resulting type after applying the &
operator.
fn bitand(self, rhs: u64) -> u64
[src]
impl BitAnd<U256> for U256
[src]
type Output = Self
The resulting type after applying the &
operator.
fn bitand(self, rhs: Self) -> Self
[src]
impl<'_> BitAnd<&'_ U256> for U256
[src]
type Output = Self
The resulting type after applying the &
operator.
fn bitand(self, rhs: &Self) -> Self
[src]
impl<'_> BitAnd<U256> for &'_ U256
[src]
type Output = U256
The resulting type after applying the &
operator.
fn bitand(self, rhs: U256) -> U256
[src]
impl<'_, '_> BitAnd<&'_ U256> for &'_ U256
[src]
type Output = U256
The resulting type after applying the &
operator.
fn bitand(self, rhs: &U256) -> U256
[src]
impl Shl<usize> for U256
[src]
type Output = Self
The resulting type after applying the <<
operator.
fn shl(self, rhs: usize) -> Self
[src]
impl Shr<usize> for U256
[src]
type Output = Self
The resulting type after applying the >>
operator.
fn shr(self, rhs: usize) -> Self
[src]
impl<'_> BitAndAssign<&'_ U256> for U256
[src]
fn bitand_assign(&mut self, rhs: &Self)
[src]
impl BitAndAssign<U256> for U256
[src]
fn bitand_assign(&mut self, rhs: Self)
[src]
impl ShlAssign<usize> for U256
[src]
fn shl_assign(&mut self, rhs: usize)
[src]
impl ShrAssign<usize> for U256
[src]
fn shr_assign(&mut self, rhs: usize)
[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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> 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, U> TryInto<U> 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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,