pub struct WitnessGenerator<F: Field> { /* private fields */ }Expand description
Generates some elements of the witness.
Implementations§
Source§impl<F: Field> WitnessGenerator<F>
impl<F: Field> WitnessGenerator<F>
Sourcepub fn new<T>(inputs: Vec<Wire>, generate: T) -> Selfwhere
T: Fn(&mut WireValues<F>) + 'static,
pub fn new<T>(inputs: Vec<Wire>, generate: T) -> Selfwhere
T: Fn(&mut WireValues<F>) + 'static,
Creates a new WitnessGenerator.
§Arguments
inputs- the wires whose values must be set before this generator can rungenerate- a function which generates some elements of the witness
Sourcepub fn inputs(&self) -> &[Wire]
pub fn inputs(&self) -> &[Wire]
The wires whose values must be set before this generator can run.
Sourcepub fn generate(&self, values: &mut WireValues<F>)
pub fn generate(&self, values: &mut WireValues<F>)
Run the generator.
Auto Trait Implementations§
impl<F> Freeze for WitnessGenerator<F>
impl<F> !RefUnwindSafe for WitnessGenerator<F>
impl<F> !Send for WitnessGenerator<F>
impl<F> !Sync for WitnessGenerator<F>
impl<F> Unpin for WitnessGenerator<F>
impl<F> !UnwindSafe for WitnessGenerator<F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more