Enum halo2_proofs::plonk::Expression
source · [−]pub enum Expression<F> {
+Enum halo2_proofs::plonk::Expression
source · [−]pub enum Expression<F> {
Constant(F),
Selector(Selector),
Fixed(FixedQuery),
@@ -33,25 +33,25 @@
Sum(Box<Expression<F>>, Box<Expression<F>>)
This is the sum of two polynomials
Product(Box<Expression<F>>, Box<Expression<F>>)
This is the product of two polynomials
Scaled(Box<Expression<F>>, F)
This is a scaled polynomial
-Implementations
sourceimpl<F: Field> Expression<F>
sourcepub fn evaluate<T>(
&self,
constant: &impl Fn(F) -> T,
selector_column: &impl Fn(Selector) -> T,
fixed_column: &impl Fn(FixedQuery) -> T,
advice_column: &impl Fn(AdviceQuery) -> T,
instance_column: &impl Fn(InstanceQuery) -> T,
negated: &impl Fn(T) -> T,
sum: &impl Fn(T, T) -> T,
product: &impl Fn(T, T) -> T,
scaled: &impl Fn(T, F) -> T
) -> T
Evaluate the polynomial using the provided closures to perform the
+
Implementations
sourceimpl<F: Field> Expression<F>
sourcepub fn evaluate<T>(
&self,
constant: &impl Fn(F) -> T,
selector_column: &impl Fn(Selector) -> T,
fixed_column: &impl Fn(FixedQuery) -> T,
advice_column: &impl Fn(AdviceQuery) -> T,
instance_column: &impl Fn(InstanceQuery) -> T,
negated: &impl Fn(T) -> T,
sum: &impl Fn(T, T) -> T,
product: &impl Fn(T, T) -> T,
scaled: &impl Fn(T, F) -> T
) -> T
Evaluate the polynomial using the provided closures to perform the
operations.
-Trait Implementations
sourceimpl<F: Field> Add<Expression<F>> for Expression<F>
type Output = Expression<F>
The resulting type after applying the +
operator.
-sourcefn add(self, rhs: Expression<F>) -> Expression<F>
Performs the +
operation. Read more
-Trait Implementations
sourceimpl<F: Field> Add<Expression<F>> for Expression<F>
type Output = Expression<F>
The resulting type after applying the +
operator.
+sourcefn add(self, rhs: Expression<F>) -> Expression<F>
Performs the +
operation. Read more
+sourceimpl<F: Clone> Clone for Expression<F>
sourcefn clone(&self) -> Expression<F>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
-sourceimpl<F: Debug> Debug for Expression<F>
sourceimpl<F: Field> From<Expression<F>> for Constraint<F>
sourcefn from(poly: Expression<F>) -> Self
Converts to this type from the input type.
-sourceimpl<F: Field> From<Expression<F>> for Vec<Constraint<F>>
sourcefn from(poly: Expression<F>) -> Self
Converts to this type from the input type.
-sourceimpl<F: Field> Mul<Expression<F>> for Expression<F>
type Output = Expression<F>
The resulting type after applying the *
operator.
-sourcefn mul(self, rhs: Expression<F>) -> Expression<F>
Performs the *
operation. Read more
-sourceimpl<F: Field> Mul<F> for Expression<F>
type Output = Expression<F>
The resulting type after applying the *
operator.
-sourcefn mul(self, rhs: F) -> Expression<F>
Performs the *
operation. Read more
-sourceimpl<F: Field> Neg for Expression<F>
sourceimpl<F: Field> Sub<Expression<F>> for Expression<F>
type Output = Expression<F>
The resulting type after applying the -
operator.
-sourcefn sub(self, rhs: Expression<F>) -> Expression<F>
Performs the -
operation. Read more
+sourceimpl<F: Debug> Debug for Expression<F>
sourceimpl<F: Field> From<Expression<F>> for Constraint<F>
sourcefn from(poly: Expression<F>) -> Self
Converts to this type from the input type.
+sourceimpl<F: Field> From<Expression<F>> for Vec<Constraint<F>>
sourcefn from(poly: Expression<F>) -> Self
Converts to this type from the input type.
+sourceimpl<F: Field> Mul<Expression<F>> for Expression<F>
type Output = Expression<F>
The resulting type after applying the *
operator.
+sourcefn mul(self, rhs: Expression<F>) -> Expression<F>
Performs the *
operation. Read more
+sourceimpl<F: Field> Mul<F> for Expression<F>
type Output = Expression<F>
The resulting type after applying the *
operator.
+sourcefn mul(self, rhs: F) -> Expression<F>
Performs the *
operation. Read more
+sourceimpl<F: Field> Neg for Expression<F>
sourceimpl<F: Field> Sub<Expression<F>> for Expression<F>
type Output = Expression<F>
The resulting type after applying the -
operator.
+sourcefn sub(self, rhs: Expression<F>) -> Expression<F>
Performs the -
operation. Read more
Auto Trait Implementations
impl<F> RefUnwindSafe for Expression<F>where
F: RefUnwindSafe,
impl<F> Send for Expression<F>where
F: Send,
impl<F> Sync for Expression<F>where
F: Sync,
impl<F> Unpin for Expression<F>where
F: Unpin,
impl<F> UnwindSafe for Expression<F>where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
diff --git a/rustdoc/latest/halo2_proofs/plonk/fn.create_proof.html b/rustdoc/latest/halo2_proofs/plonk/fn.create_proof.html
index 29c5ef45..5fa1d93d 100644
--- a/rustdoc/latest/halo2_proofs/plonk/fn.create_proof.html
+++ b/rustdoc/latest/halo2_proofs/plonk/fn.create_proof.html
@@ -13,7 +13,7 @@
});
});
-Function halo2_proofs::plonk::create_proof
source · [−]pub fn create_proof<C: CurveAffine, E: EncodedChallenge<C>, R: RngCore, T: TranscriptWrite<C, E>, ConcreteCircuit: Circuit<C::Scalar>>(
params: &Params<C>,
pk: &ProvingKey<C>,
circuits: &[ConcreteCircuit],
instances: &[&[&[C::Scalar]]],
rng: R,
transcript: &mut T
) -> Result<(), Error>
Expand description
This creates a proof for the provided circuit
when given the public
+
Function halo2_proofs::plonk::create_proof
source · [−]pub fn create_proof<C: CurveAffine, E: EncodedChallenge<C>, R: RngCore, T: TranscriptWrite<C, E>, ConcreteCircuit: Circuit<C::Scalar>>(
params: &Params<C>,
pk: &ProvingKey<C>,
circuits: &[ConcreteCircuit],
instances: &[&[&[C::Scalar]]],
rng: R,
transcript: &mut T
) -> Result<(), Error>
Expand description
This creates a proof for the provided circuit
when given the public
parameters params
and the proving key ProvingKey
that was
generated previously for the same circuit. The provided instances
are zero-padded internally.
diff --git a/rustdoc/latest/halo2_proofs/plonk/struct.Constraint.html b/rustdoc/latest/halo2_proofs/plonk/struct.Constraint.html
index c893a70a..4188fa33 100644
--- a/rustdoc/latest/halo2_proofs/plonk/struct.Constraint.html
+++ b/rustdoc/latest/halo2_proofs/plonk/struct.Constraint.html
@@ -13,11 +13,11 @@
});
});
-Struct halo2_proofs::plonk::Constraint
source · [−]pub struct Constraint<F: Field> { /* private fields */ }
Expand description
An individual polynomial constraint.
+Struct halo2_proofs::plonk::Constraint
source · [−]pub struct Constraint<F: Field> { /* private fields */ }
Expand description
An individual polynomial constraint.
These are returned by the closures passed to ConstraintSystem::create_gate
.
-Trait Implementations
sourceimpl<F: Debug + Field> Debug for Constraint<F>
sourceimpl<F: Field> From<(&'static str, Expression<F>)> for Constraint<F>
sourcefn from((name, poly): (&'static str, Expression<F>)) -> Self
Converts to this type from the input type.
-sourceimpl<F: Field> From<Expression<F>> for Constraint<F>
sourcefn from(poly: Expression<F>) -> Self
Converts to this type from the input type.
+Trait Implementations
sourceimpl<F: Debug + Field> Debug for Constraint<F>
sourceimpl<F: Field> From<(&'static str, Expression<F>)> for Constraint<F>
sourcefn from((name, poly): (&'static str, Expression<F>)) -> Self
Converts to this type from the input type.
+sourceimpl<F: Field> From<Expression<F>> for Constraint<F>
sourcefn from(poly: Expression<F>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl<F> RefUnwindSafe for Constraint<F>where
F: RefUnwindSafe,
impl<F> Send for Constraint<F>
impl<F> Sync for Constraint<F>
impl<F> Unpin for Constraint<F>where
F: Unpin,
impl<F> UnwindSafe for Constraint<F>where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
diff --git a/rustdoc/latest/halo2_proofs/plonk/struct.ConstraintSystem.html b/rustdoc/latest/halo2_proofs/plonk/struct.ConstraintSystem.html
index a180cb77..cb7800ed 100644
--- a/rustdoc/latest/halo2_proofs/plonk/struct.ConstraintSystem.html
+++ b/rustdoc/latest/halo2_proofs/plonk/struct.ConstraintSystem.html
@@ -13,45 +13,45 @@
});
});
-Struct halo2_proofs::plonk::ConstraintSystem
source · [−]pub struct ConstraintSystem<F: Field> { /* private fields */ }
Expand description
This is a description of the circuit environment, such as the gate, column and
+
Struct halo2_proofs::plonk::ConstraintSystem
source · [−]pub struct ConstraintSystem<F: Field> { /* private fields */ }
Expand description
This is a description of the circuit environment, such as the gate, column and
permutation arrangements.
-Implementations
sourceimpl<F: Field> ConstraintSystem<F>
sourcepub fn pinned(&self) -> PinnedConstraintSystem<'_, F>
Obtain a pinned version of this constraint system; a structure with the
+
Implementations
sourceimpl<F: Field> ConstraintSystem<F>
sourcepub fn pinned(&self) -> PinnedConstraintSystem<'_, F>
Obtain a pinned version of this constraint system; a structure with the
minimal parameters needed to determine the rest of the constraint
system.
-sourcepub fn enable_constant(&mut self, column: Column<Fixed>)
Enables this fixed column to be used for global constant assignments.
+sourcepub fn enable_constant(&mut self, column: Column<Fixed>)
Enables this fixed column to be used for global constant assignments.
Side-effects
The column will be equality-enabled.
-sourcepub fn enable_equality<C: Into<Column<Any>>>(&mut self, column: C)
Enable the ability to enforce equality over cells in this column
-sourcepub fn lookup(
&mut self,
table_map: impl FnOnce(&mut VirtualCells<'_, F>) -> Vec<(Expression<F>, TableColumn)>
) -> usize
Add a lookup argument for some input expressions and table columns.
+sourcepub fn enable_equality<C: Into<Column<Any>>>(&mut self, column: C)
Enable the ability to enforce equality over cells in this column
+sourcepub fn lookup(
&mut self,
table_map: impl FnOnce(&mut VirtualCells<'_, F>) -> Vec<(Expression<F>, TableColumn)>
) -> usize
Add a lookup argument for some input expressions and table columns.
table_map
returns a map between input expressions and the table columns
they need to match.
-sourcepub fn set_minimum_degree(&mut self, degree: usize)
Sets the minimum degree required by the circuit, which can be set to a
+
sourcepub fn set_minimum_degree(&mut self, degree: usize)
Sets the minimum degree required by the circuit, which can be set to a
larger amount than actually needed. This can be used, for example, to
force the permutation argument to involve more columns in the same set.
-sourcepub fn create_gate<C: Into<Constraint<F>>, Iter: IntoIterator<Item = C>>(
&mut self,
name: &'static str,
constraints: impl FnOnce(&mut VirtualCells<'_, F>) -> Iter
)
Creates a new gate.
+sourcepub fn create_gate<C: Into<Constraint<F>>, Iter: IntoIterator<Item = C>>(
&mut self,
name: &'static str,
constraints: impl FnOnce(&mut VirtualCells<'_, F>) -> Iter
)
Creates a new gate.
Panics
A gate is required to contain polynomial constraints. This method will panic if
constraints
returns an empty iterator.
-sourcepub fn selector(&mut self) -> Selector
Allocate a new (simple) selector. Simple selectors cannot be added to
+
sourcepub fn selector(&mut self) -> Selector
Allocate a new (simple) selector. Simple selectors cannot be added to
expressions nor multiplied by other expressions containing simple
selectors. Also, simple selectors may not appear in lookup argument
inputs.
-sourcepub fn complex_selector(&mut self) -> Selector
Allocate a new complex selector that can appear anywhere
+
sourcepub fn complex_selector(&mut self) -> Selector
Allocate a new complex selector that can appear anywhere
within expressions.
-sourcepub fn lookup_table_column(&mut self) -> TableColumn
Allocates a new fixed column that can be used in a lookup table.
-sourcepub fn fixed_column(&mut self) -> Column<Fixed>
Allocate a new fixed column
-sourcepub fn advice_column(&mut self) -> Column<Advice>
Allocate a new advice column
-sourcepub fn instance_column(&mut self) -> Column<Instance>
Allocate a new instance column
-sourcepub fn degree(&self) -> usize
Compute the degree of the constraint system (the maximum degree of all
+
sourcepub fn lookup_table_column(&mut self) -> TableColumn
Allocates a new fixed column that can be used in a lookup table.
+sourcepub fn fixed_column(&mut self) -> Column<Fixed>
Allocate a new fixed column
+sourcepub fn advice_column(&mut self) -> Column<Advice>
Allocate a new advice column
+sourcepub fn instance_column(&mut self) -> Column<Instance>
Allocate a new instance column
+sourcepub fn degree(&self) -> usize
Compute the degree of the constraint system (the maximum degree of all
constraints).
-sourcepub fn blinding_factors(&self) -> usize
Compute the number of blinding factors necessary to perfectly blind
+
sourcepub fn blinding_factors(&self) -> usize
Compute the number of blinding factors necessary to perfectly blind
each of the prover’s witness polynomials.
-sourcepub fn minimum_rows(&self) -> usize
Returns the minimum necessary rows that need to exist in order to
+
sourcepub fn minimum_rows(&self) -> usize
Returns the minimum necessary rows that need to exist in order to
account for e.g. blinding factors.
-Trait Implementations
sourceimpl<F: Clone + Field> Clone for ConstraintSystem<F>
sourcefn clone(&self) -> ConstraintSystem<F>
Returns a copy of the value. Read more
+Trait Implementations
sourceimpl<F: Clone + Field> Clone for ConstraintSystem<F>
sourcefn clone(&self) -> ConstraintSystem<F>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
-sourceimpl<F: Debug + Field> Debug for ConstraintSystem<F>
sourceimpl<F: Field> Default for ConstraintSystem<F>
sourcefn default() -> ConstraintSystem<F>
Returns the “default value” for a type. Read more
+sourceimpl<F: Debug + Field> Debug for ConstraintSystem<F>
sourceimpl<F: Field> Default for ConstraintSystem<F>
sourcefn default() -> ConstraintSystem<F>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<F> RefUnwindSafe for ConstraintSystem<F>where
F: RefUnwindSafe,
impl<F> Send for ConstraintSystem<F>
impl<F> Sync for ConstraintSystem<F>
impl<F> Unpin for ConstraintSystem<F>where
F: Unpin,
impl<F> UnwindSafe for ConstraintSystem<F>where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
diff --git a/rustdoc/latest/halo2_proofs/plonk/struct.Constraints.html b/rustdoc/latest/halo2_proofs/plonk/struct.Constraints.html
index b270411f..ca2c4b0e 100644
--- a/rustdoc/latest/halo2_proofs/plonk/struct.Constraints.html
+++ b/rustdoc/latest/halo2_proofs/plonk/struct.Constraints.html
@@ -13,7 +13,7 @@
});
});
-Struct halo2_proofs::plonk::Constraints
source · [−]pub struct Constraints<F: Field, C: Into<Constraint<F>>, Iter: IntoIterator<Item = C>> { /* private fields */ }
Expand description
A set of polynomial constraints with a common selector.
+Struct halo2_proofs::plonk::Constraints
source · [−]pub struct Constraints<F: Field, C: Into<Constraint<F>>, Iter: IntoIterator<Item = C>> { /* private fields */ }
Expand description
A set of polynomial constraints with a common selector.
use halo2_proofs::{pasta::Fp, plonk::{Constraints, Expression}, poly::Rotation};
@@ -42,13 +42,13 @@ meta.create_gate("foo", |meta| {
Note that the use of std::array::IntoIter::new
is only necessary if you need to
support Rust 1.51 or 1.52. If your minimum supported Rust version is 1.53 or greater,
you can pass an array directly.
-
Implementations
sourceimpl<F: Field, C: Into<Constraint<F>>, Iter: IntoIterator<Item = C>> Constraints<F, C, Iter>
sourcepub fn with_selector(selector: Expression<F>, constraints: Iter) -> Self
Constructs a set of constraints that are controlled by the given selector.
+Implementations
sourceimpl<F: Field, C: Into<Constraint<F>>, Iter: IntoIterator<Item = C>> Constraints<F, C, Iter>
sourcepub fn with_selector(selector: Expression<F>, constraints: Iter) -> Self
Constructs a set of constraints that are controlled by the given selector.
Each constraint c
in iterator
will be converted into the constraint
selector * c
.
-Trait Implementations
sourceimpl<F: Debug + Field, C: Debug + Into<Constraint<F>>, Iter: Debug + IntoIterator<Item = C>> Debug for Constraints<F, C, Iter>
sourceimpl<F: Field, C: Into<Constraint<F>>, Iter: IntoIterator<Item = C>> IntoIterator for Constraints<F, C, Iter>
type Item = Constraint<F>
The type of the elements being iterated over.
+Trait Implementations
sourceimpl<F: Debug + Field, C: Debug + Into<Constraint<F>>, Iter: Debug + IntoIterator<Item = C>> Debug for Constraints<F, C, Iter>
sourceimpl<F: Field, C: Into<Constraint<F>>, Iter: IntoIterator<Item = C>> IntoIterator for Constraints<F, C, Iter>
type Item = Constraint<F>
The type of the elements being iterated over.
type IntoIter = Map<Zip<Repeat<Expression<F>>, <Iter as IntoIterator>::IntoIter>, fn((Expression<F>, C)) -> Constraint<F>>
Which kind of iterator are we turning this into?
-Auto Trait Implementations
impl<F, C, Iter> RefUnwindSafe for Constraints<F, C, Iter>where
F: RefUnwindSafe,
Iter: RefUnwindSafe,
impl<F, C, Iter> Send for Constraints<F, C, Iter>where
Iter: Send,
impl<F, C, Iter> Sync for Constraints<F, C, Iter>where
Iter: Sync,
impl<F, C, Iter> Unpin for Constraints<F, C, Iter>where
F: Unpin,
Iter: Unpin,
impl<F, C, Iter> UnwindSafe for Constraints<F, C, Iter>where
F: UnwindSafe,
Iter: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
diff --git a/rustdoc/latest/halo2_proofs/plonk/struct.PinnedConstraintSystem.html b/rustdoc/latest/halo2_proofs/plonk/struct.PinnedConstraintSystem.html
index 33ee8dcc..8a314d06 100644
--- a/rustdoc/latest/halo2_proofs/plonk/struct.PinnedConstraintSystem.html
+++ b/rustdoc/latest/halo2_proofs/plonk/struct.PinnedConstraintSystem.html
@@ -13,8 +13,8 @@
});
});
-Struct halo2_proofs::plonk::PinnedConstraintSystem
source · [−]pub struct PinnedConstraintSystem<'a, F: Field> { /* private fields */ }
Expand description
Represents the minimal parameters that determine a ConstraintSystem
.
-Trait Implementations
sourceimpl<'a, F: Debug + Field> Debug for PinnedConstraintSystem<'a, F>
sourcefn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter. Read more
+Struct halo2_proofs::plonk::PinnedConstraintSystem
source · [−]pub struct PinnedConstraintSystem<'a, F: Field> { /* private fields */ }
Expand description
Represents the minimal parameters that determine a ConstraintSystem
.
+Trait Implementations
Auto Trait Implementations
impl<'a, F> RefUnwindSafe for PinnedConstraintSystem<'a, F>where
F: RefUnwindSafe,
impl<'a, F> Send for PinnedConstraintSystem<'a, F>
impl<'a, F> Sync for PinnedConstraintSystem<'a, F>
impl<'a, F> Unpin for PinnedConstraintSystem<'a, F>
impl<'a, F> UnwindSafe for PinnedConstraintSystem<'a, F>where
F: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
diff --git a/rustdoc/latest/halo2_proofs/plonk/struct.TableColumn.html b/rustdoc/latest/halo2_proofs/plonk/struct.TableColumn.html
index 3f9ab545..01be0a54 100644
--- a/rustdoc/latest/halo2_proofs/plonk/struct.TableColumn.html
+++ b/rustdoc/latest/halo2_proofs/plonk/struct.TableColumn.html
@@ -13,13 +13,14 @@
});
});
-Struct halo2_proofs::plonk::TableColumn
source · [−]pub struct TableColumn { /* private fields */ }
Expand description
A fixed column of a lookup table.
+Struct halo2_proofs::plonk::TableColumn
source · [−]pub struct TableColumn { /* private fields */ }
Expand description
A fixed column of a lookup table.
A lookup table can be loaded into this column via Layouter::assign_table
. Columns
can currently only contain a single table, but they may be used in multiple lookup
arguments via ConstraintSystem::lookup
.
Lookup table columns are always “encumbered” by the lookup arguments they are used in;
they cannot simultaneously be used as general fixed columns.
-Trait Implementations
sourceimpl Clone for TableColumn
sourcefn clone(&self) -> TableColumn
Returns a copy of the value. Read more
+Implementations
sourceimpl TableColumn
sourcepub fn enable_equality<F: Field>(&self, meta: &mut ConstraintSystem<F>)
Enable equality on this TableColumn.
+Trait Implementations
sourceimpl Clone for TableColumn
sourcefn clone(&self) -> TableColumn
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TableColumn
sourceimpl Hash for TableColumn
sourcefn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given Hasher
. Read more
diff --git a/rustdoc/latest/halo2_proofs/plonk/struct.VirtualCells.html b/rustdoc/latest/halo2_proofs/plonk/struct.VirtualCells.html
index 4cfd0ad3..29554205 100644
--- a/rustdoc/latest/halo2_proofs/plonk/struct.VirtualCells.html
+++ b/rustdoc/latest/halo2_proofs/plonk/struct.VirtualCells.html
@@ -13,14 +13,14 @@
});
});
-Struct halo2_proofs::plonk::VirtualCells
source · [−]pub struct VirtualCells<'a, F: Field> { /* private fields */ }
Expand description
Exposes the “virtual cells” that can be queried while creating a custom gate or lookup
+
Struct halo2_proofs::plonk::VirtualCells
source · [−]pub struct VirtualCells<'a, F: Field> { /* private fields */ }
Expand description
Exposes the “virtual cells” that can be queried while creating a custom gate or lookup
table.
-Implementations
sourceimpl<'a, F: Field> VirtualCells<'a, F>
sourcepub fn query_selector(&mut self, selector: Selector) -> Expression<F>
Query a selector at the current position.
-sourcepub fn query_fixed(
&mut self,
column: Column<Fixed>,
at: Rotation
) -> Expression<F>
Query a fixed column at a relative position
-sourcepub fn query_advice(
&mut self,
column: Column<Advice>,
at: Rotation
) -> Expression<F>
Query an advice column at a relative position
-sourcepub fn query_instance(
&mut self,
column: Column<Instance>,
at: Rotation
) -> Expression<F>
Query an instance column at a relative position
-Trait Implementations
sourceimpl<'a, F: Debug + Field> Debug for VirtualCells<'a, F>
sourcefn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter. Read more
+Implementations
sourceimpl<'a, F: Field> VirtualCells<'a, F>
sourcepub fn query_selector(&mut self, selector: Selector) -> Expression<F>
Query a selector at the current position.
+sourcepub fn query_fixed(
&mut self,
column: Column<Fixed>,
at: Rotation
) -> Expression<F>
Query a fixed column at a relative position
+sourcepub fn query_advice(
&mut self,
column: Column<Advice>,
at: Rotation
) -> Expression<F>
Query an advice column at a relative position
+sourcepub fn query_instance(
&mut self,
column: Column<Instance>,
at: Rotation
) -> Expression<F>
Query an instance column at a relative position
+Trait Implementations
Auto Trait Implementations
impl<'a, F> RefUnwindSafe for VirtualCells<'a, F>where
F: RefUnwindSafe,
impl<'a, F> Send for VirtualCells<'a, F>
impl<'a, F> Sync for VirtualCells<'a, F>
impl<'a, F> Unpin for VirtualCells<'a, F>
impl<'a, F> !UnwindSafe for VirtualCells<'a, F>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
diff --git a/rustdoc/latest/halo2_proofs/plonk/trait.Assignment.html b/rustdoc/latest/halo2_proofs/plonk/trait.Assignment.html
index 61db30c5..d8ddf363 100644
--- a/rustdoc/latest/halo2_proofs/plonk/trait.Assignment.html
+++ b/rustdoc/latest/halo2_proofs/plonk/trait.Assignment.html
@@ -13,7 +13,7 @@
});
});
-Trait halo2_proofs::plonk::Assignment
source · [−]pub trait Assignment<F: Field> {
+Trait halo2_proofs::plonk::Assignment
source · [−]pub trait Assignment<F: Field> {
fn enter_region<NR, N>(&mut self, name_fn: N)
where
NR: Into<String>,
N: FnOnce() -> NR;
fn exit_region(&mut self);
fn enable_selector<A, AR>(
&mut self,
annotation: A,
selector: &Selector,
row: usize
) -> Result<(), Error>
where
A: FnOnce() -> AR,
AR: Into<String>;
@@ -26,21 +26,21 @@
fn pop_namespace(&mut self, gadget_name: Option<String>);
}
Expand description
This trait allows a Circuit
to direct some backend to assign a witness
for a constraint system.
-Required Methods
sourcefn enter_region<NR, N>(&mut self, name_fn: N)where
NR: Into<String>,
N: FnOnce() -> NR,
Creates a new region and enters into it.
+Required Methods
sourcefn enter_region<NR, N>(&mut self, name_fn: N)where
NR: Into<String>,
N: FnOnce() -> NR,
Creates a new region and enters into it.
Panics if we are currently in a region (if exit_region
was not called).
Not intended for downstream consumption; use Layouter::assign_region
instead.
-sourcefn exit_region(&mut self)
Exits the current region.
+sourcefn exit_region(&mut self)
Exits the current region.
Panics if we are not currently in a region (if enter_region
was not called).
Not intended for downstream consumption; use Layouter::assign_region
instead.
-
Enables a selector at the given row.
-
Queries the cell of an instance column at a particular absolute row.
+
Enables a selector at the given row.
+
Queries the cell of an instance column at a particular absolute row.
Returns the cell’s value, if known.
-
Assign an advice column value (witness)
-
Assign a fixed value
-
Assign two cells to have the same value
-
Fills a fixed column
starting from the given row
with value to
.
-sourcefn push_namespace<NR, N>(&mut self, name_fn: N)where
NR: Into<String>,
N: FnOnce() -> NR,
Creates a new (sub)namespace and enters into it.
+
Assign an advice column value (witness)
+
Assign a fixed value
+
Assign two cells to have the same value
+
Fills a fixed column
starting from the given row
with value to
.
+sourcefn push_namespace<NR, N>(&mut self, name_fn: N)where
NR: Into<String>,
N: FnOnce() -> NR,
Creates a new (sub)namespace and enters into it.
Not intended for downstream consumption; use Layouter::namespace
instead.
-sourcefn pop_namespace(&mut self, gadget_name: Option<String>)
Exits out of the existing namespace.
+sourcefn pop_namespace(&mut self, gadget_name: Option<String>)
Exits out of the existing namespace.
Not intended for downstream consumption; use Layouter::namespace
instead.
Implementors
sourceimpl<F: Field + Group> Assignment<F> for MockProver<F>