pub struct Witness<F> { /* private fields */ }Expand description
A prover-side assignment for a circuit proof.
This contains the committed values, their Pedersen blindings, and the internal left, right, and output wire values.
Implementations§
Source§impl<F> Witness<F>
impl<F> Witness<F>
Sourcepub fn new(
values: Vec<F>,
blinding: Vec<F>,
left: Vec<F>,
right: Vec<F>,
out: Vec<F>,
) -> Option<Self>
pub fn new( values: Vec<F>, blinding: Vec<F>, left: Vec<F>, right: Vec<F>, out: Vec<F>, ) -> Option<Self>
Create a new witness, given all committed values, and internal values.
This is a very low level method, with the only safety guard being to check that certain vectors have matching lengths. Beyond that, we don’t check that the values satisfy a circuit relationship, or match the commitments.
pub fn values(&self) -> &[F]
Sourcepub fn is_satisfied(&self, circuit: &Circuit<F>) -> boolwhere
F: Ring,
pub fn is_satisfied(&self, circuit: &Circuit<F>) -> boolwhere
F: Ring,
Auto Trait Implementations§
impl<F> Freeze for Witness<F>
impl<F> RefUnwindSafe for Witness<F>where
F: RefUnwindSafe,
impl<F> Send for Witness<F>where
F: Send,
impl<F> Sync for Witness<F>where
F: Sync,
impl<F> Unpin for Witness<F>where
F: Unpin,
impl<F> UnsafeUnpin for Witness<F>
impl<F> UnwindSafe for Witness<F>where
F: UnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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