Struct ark_r1cs_std::bits::uint16::UInt16[][src]

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

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

Implementations

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

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

Construct a constant U16 from the native u16 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() != 16 .

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<u16, ConstraintF> for UInt16<ConstraintF>[src]

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

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

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

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

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

type Value = u16

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

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

Auto Trait Implementations

impl<F> !RefUnwindSafe for UInt16<F>

impl<F> !Send for UInt16<F>

impl<F> !Sync for UInt16<F>

impl<F> Unpin for UInt16<F>

impl<F> !UnwindSafe for UInt16<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>,