Struct ark_r1cs_std::bits::uint32::UInt32[][src]

pub struct UInt32<F: Field> { /* fields omitted */ }

This struct represent an unsigned 32 bit integer as a sequence of 32 Booleans. This is the R1CS equivalent of the native u32 unsigned integer type.

Implementations

impl<F: Field> UInt32<F>[src]

pub fn constant(value: u32) -> Self[src]

Construct a constant U32 from the native u32 type.

pub fn to_bits_le(&self) -> Vec<Boolean<F>>[src]

Turns self into the underlying little-endian bits.

pub fn from_bits_le(bits: &[Boolean<F>]) -> Self[src]

Construct Self from a slice of Booleans.

Panics

This method panics if bits.len() != 32 .

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

Rotates self to the right by by steps, wrapping around.

pub fn xor(&self, other: &Self) -> Result<Self, SynthesisError>[src]

Outputs self ^ other.

If at least one of self and other are constants, then this method does not create any constraints or variables.

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

Perform modular addition of operands.

The user must ensure that overflow does not occur.

Trait Implementations

impl<ConstraintF: Field> AllocVar<u32, ConstraintF> for UInt32<ConstraintF>[src]

impl<F: Clone + Field> Clone for UInt32<F>[src]

impl<ConstraintF: Field> CondSelectGadget<ConstraintF> for UInt32<ConstraintF>[src]

impl<F: Debug + Field> Debug for UInt32<F>[src]

impl<ConstraintF: Field> EqGadget<ConstraintF> for UInt32<ConstraintF>[src]

impl<F: Field> R1CSVar<F> for UInt32<F>[src]

type Value = u32

The type of the “native” value that Self represents in the constraint system. Read more

impl<ConstraintF: Field> ToBytesGadget<ConstraintF> for UInt32<ConstraintF>[src]

Auto Trait Implementations

impl<F> !RefUnwindSafe for UInt32<F>

impl<F> !Send for UInt32<F>

impl<F> !Sync for UInt32<F>

impl<F> Unpin for UInt32<F>

impl<F> !UnwindSafe for UInt32<F>

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> From<T> for T[src]

impl<T> Instrument 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, 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>,