pub struct WitnessFiller<'a> { /* private fields */ }Expand description
A helper struct for filling witness values in a circuit.
Implementations§
Source§impl WitnessFiller<'_>
impl WitnessFiller<'_>
Sourcepub fn into_value_vec(self) -> ValueVec
pub fn into_value_vec(self) -> ValueVec
Destruct the witness filler and extracts the underlying value vector.
Sourcepub fn pack_bytes_le(&mut self, wires: &[Wire], bytes: &[u8])
pub fn pack_bytes_le(&mut self, wires: &[Wire], bytes: &[u8])
Populates the given wires from bytes as little-endian packed 64-bit words.
If bytes is not a multiple of 8, the last word is zero-padded.
Any wires past those needed to hold bytes are filled with Word::ZERO.
§Panics
Panics if bytes.len() exceeds wires.len() * 8.
Trait Implementations§
Source§impl Index<Wire> for WitnessFiller<'_>
impl Index<Wire> for WitnessFiller<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for WitnessFiller<'a>
impl<'a> !UnwindSafe for WitnessFiller<'a>
impl<'a> Freeze for WitnessFiller<'a>
impl<'a> Send for WitnessFiller<'a>
impl<'a> Sync for WitnessFiller<'a>
impl<'a> Unpin for WitnessFiller<'a>
impl<'a> UnsafeUnpin for WitnessFiller<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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