Struct bellperson::gadgets::uint32::UInt32[][src]

pub struct UInt32 { /* fields omitted */ }
Expand description

Represents an interpretation of 32 Boolean objects as an unsigned integer.

Implementations

impl UInt32[src]

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

Construct a constant UInt32 from a u32

pub fn alloc<E, CS>(cs: CS, value: Option<u32>) -> Result<Self, SynthesisError> where
    E: ScalarEngine,
    CS: ConstraintSystem<E>, 
[src]

Allocate a UInt32 in the constraint system

pub fn into_bits_be(self) -> Vec<Boolean>[src]

pub fn from_bits_be(bits: &[Boolean]) -> Self[src]

pub fn into_bits(self) -> Vec<Boolean>[src]

Turns this UInt32 into its little-endian byte order representation.

pub fn from_bits(bits: &[Boolean]) -> Self[src]

Converts a little-endian byte order representation of bits into a UInt32.

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

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

pub fn sha256_maj<E, CS>(
    cs: CS,
    a: &Self,
    b: &Self,
    c: &Self
) -> Result<Self, SynthesisError> where
    E: ScalarEngine,
    CS: ConstraintSystem<E>, 
[src]

Compute the maj value (a and b) xor (a and c) xor (b and c) during SHA256.

pub fn sha256_ch<E, CS>(
    cs: CS,
    a: &Self,
    b: &Self,
    c: &Self
) -> Result<Self, SynthesisError> where
    E: ScalarEngine,
    CS: ConstraintSystem<E>, 
[src]

Compute the ch value (a and b) xor ((not a) and c) during SHA256.

pub fn xor<E, CS>(&self, cs: CS, other: &Self) -> Result<Self, SynthesisError> where
    E: ScalarEngine,
    CS: ConstraintSystem<E>, 
[src]

XOR this UInt32 with another UInt32

pub fn addmany<E, CS, M>(
    cs: M,
    operands: &[Self]
) -> Result<Self, SynthesisError> where
    E: ScalarEngine,
    CS: ConstraintSystem<E>,
    M: ConstraintSystem<E, Root = MultiEq<E, CS>>, 
[src]

Perform modular addition of several UInt32 objects.

Trait Implementations

impl Clone for UInt32[src]

fn clone(&self) -> UInt32[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl RefUnwindSafe for UInt32

impl Send for UInt32

impl Sync for UInt32

impl Unpin for UInt32

impl UnwindSafe for UInt32

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V