[][src]Struct r1cs::Gadget

pub struct Gadget<F: Field> {
    pub constraints: Vec<Constraint<F>>,
    pub witness_generators: Vec<WitnessGenerator<F>>,
}

An R1CS gadget.

Fields

constraints: Vec<Constraint<F>>

The set of rank-1 constraints which define the R1CS instance.

witness_generators: Vec<WitnessGenerator<F>>

The set of generators used to generate a complete witness from inputs.

Methods

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

pub fn size(&self) -> usize[src]

The number of constraints in this gadget.

pub fn execute(&self, wire_values: &mut WireValues<F>) -> bool[src]

Execute the gadget, and return whether all constraints were satisfied.

Auto Trait Implementations

impl<F> !Send for Gadget<F>

impl<F> !Sync for Gadget<F>

impl<F> Unpin for Gadget<F>

impl<F> !UnwindSafe for Gadget<F>

impl<F> !RefUnwindSafe for Gadget<F>

Blanket Implementations

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

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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