Trait snarkvm_wasm::traits::utilities::uint::UInt[][src]

pub trait UInt: Integer {
    pub fn negate(&self) -> Self;
pub fn rotr(&self, by: usize) -> Self;
pub fn addmany<F, CS>(
        cs: CS,
        operands: &[Self]
    ) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>,
        F: PrimeField
;
pub fn mul<F, CS>(
        &self,
        cs: CS,
        other: &Self
    ) -> Result<Self, UnsignedIntegerError>
    where
        CS: ConstraintSystem<F>,
        F: PrimeField
; }

Required methods

pub fn negate(&self) -> Self[src]

Returns the inverse UInt

pub fn rotr(&self, by: usize) -> Self[src]

Rotate self bits by size

pub fn addmany<F, CS>(cs: CS, operands: &[Self]) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>,
    F: PrimeField
[src]

Perform modular addition of several UInt objects.

pub fn mul<F, CS>(
    &self,
    cs: CS,
    other: &Self
) -> Result<Self, UnsignedIntegerError> where
    CS: ConstraintSystem<F>,
    F: PrimeField
[src]

Perform Bitwise multiplication of two UInt objects. Reference: https://en.wikipedia.org/wiki/Binary_multiplier

Loading content...

Implementors

impl UInt for UInt8[src]

impl UInt for UInt16[src]

impl UInt for UInt32[src]

impl UInt for UInt64[src]

impl UInt for UInt128[src]

pub fn negate(&self) -> UInt128[src]

Returns the inverse UInt128

pub fn addmany<F, CS>(
    cs: CS,
    operands: &[UInt128]
) -> Result<UInt128, SynthesisError> where
    CS: ConstraintSystem<F>,
    F: PrimeField
[src]

Perform modular addition of several UInt128 objects.

pub fn mul<F, CS>(
    &self,
    cs: CS,
    other: &UInt128
) -> Result<UInt128, UnsignedIntegerError> where
    CS: ConstraintSystem<F>,
    F: PrimeField
[src]

Bitwise multiplication of two UInt128 objects. Reference: https://en.wikipedia.org/wiki/Binary_multiplier

Loading content...