pub struct ValueVecLayout {
pub n_const: usize,
pub n_inout: usize,
pub n_witness: usize,
pub n_internal: usize,
pub offset_inout: usize,
pub offset_witness: usize,
pub committed_total_len: usize,
pub n_scratch: usize,
}
Expand description
Description of a layout of the value vector for a particular circuit.
Fields§
§n_const: usize
The number of the constants declared by the circuit.
n_inout: usize
The number of the input output parameters declared by the circuit.
n_witness: usize
The number of the witness parameters declared by the circuit.
n_internal: usize
The number of the internal values declared by the circuit.
Those are outputs and intermediaries created by the gates.
offset_inout: usize
The offset at which inout
parameters start.
offset_witness: usize
The offset at which witness
parameters start.
The public section of the value vec has the power-of-two size and is greater than the minimum number of words. By public section we mean the constants and the inout values.
committed_total_len: usize
The total number of committed values in the values vector. This does not include any scratch values.
This must be a power-of-two.
n_scratch: usize
The number of scratch values at the end of the value vec.
Implementations§
Source§impl ValueVecLayout
impl ValueVecLayout
Sourcepub fn validate(&self) -> Result<(), ConstraintSystemError>
pub fn validate(&self) -> Result<(), ConstraintSystemError>
Validates that the value vec layout has a correct shape.
Specifically checks that:
- the total committed length is a power of two.
- the public segment (constants and inout values) is padded to the power of two.
- the public segment is not less than the minimum size.
Trait Implementations§
Source§impl Clone for ValueVecLayout
impl Clone for ValueVecLayout
Source§fn clone(&self) -> ValueVecLayout
fn clone(&self) -> ValueVecLayout
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ValueVecLayout
impl Debug for ValueVecLayout
Source§impl DeserializeBytes for ValueVecLayout
impl DeserializeBytes for ValueVecLayout
fn deserialize(read_buf: impl Buf) -> Result<Self, SerializationError>where
Self: Sized,
Source§impl PartialEq for ValueVecLayout
impl PartialEq for ValueVecLayout
Source§impl SerializeBytes for ValueVecLayout
impl SerializeBytes for ValueVecLayout
impl Eq for ValueVecLayout
impl StructuralPartialEq for ValueVecLayout
Auto Trait Implementations§
impl Freeze for ValueVecLayout
impl RefUnwindSafe for ValueVecLayout
impl Send for ValueVecLayout
impl Sync for ValueVecLayout
impl Unpin for ValueVecLayout
impl UnwindSafe for ValueVecLayout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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