pub struct ConstraintCircuitBuilder<II: InputIndicator> { /* private fields */ }
Expand description
Helper struct to construct new leaf nodes (i.e., input or challenge or constant) in the circuit multitree. Ensures that newly created nodes, even non-leaf nodes created through joining two other nodes using an arithmetic operation, get a unique ID.
Implementations§
Source§impl<II: InputIndicator> ConstraintCircuitBuilder<II>
impl<II: InputIndicator> ConstraintCircuitBuilder<II>
pub fn new() -> Self
Sourcepub fn is_same_as(&self, other: &Self) -> bool
pub fn is_same_as(&self, other: &Self) -> bool
Check whether two builders are the same.
Notably, this is distinct from checking equality: two builders are equal if they are in the same state. Two builders are the same if they are the same instance.
Sourcepub fn zero(&self) -> ConstraintCircuitMonad<II>
pub fn zero(&self) -> ConstraintCircuitMonad<II>
The unique monad representing the constant value 0.
Sourcepub fn one(&self) -> ConstraintCircuitMonad<II>
pub fn one(&self) -> ConstraintCircuitMonad<II>
The unique monad representing the constant value 1.
Sourcepub fn minus_one(&self) -> ConstraintCircuitMonad<II>
pub fn minus_one(&self) -> ConstraintCircuitMonad<II>
The unique monad representing the constant value -1.
Sourcepub fn b_constant<B>(&self, bfe: B) -> ConstraintCircuitMonad<II>where
B: Into<BFieldElement>,
pub fn b_constant<B>(&self, bfe: B) -> ConstraintCircuitMonad<II>where
B: Into<BFieldElement>,
Leaf node with constant over the base field.
Sourcepub fn x_constant<X>(&self, xfe: X) -> ConstraintCircuitMonad<II>where
X: Into<XFieldElement>,
pub fn x_constant<X>(&self, xfe: X) -> ConstraintCircuitMonad<II>where
X: Into<XFieldElement>,
Leaf node with constant over the extension field.
Sourcepub fn input(&self, input: II) -> ConstraintCircuitMonad<II>
pub fn input(&self, input: II) -> ConstraintCircuitMonad<II>
Create deterministic input leaf node.
Sourcepub fn challenge<C>(&self, challenge: C) -> ConstraintCircuitMonad<II>
pub fn challenge<C>(&self, challenge: C) -> ConstraintCircuitMonad<II>
Create challenge leaf node.
Trait Implementations§
Source§impl<II: Clone + InputIndicator> Clone for ConstraintCircuitBuilder<II>
impl<II: Clone + InputIndicator> Clone for ConstraintCircuitBuilder<II>
Source§fn clone(&self) -> ConstraintCircuitBuilder<II>
fn clone(&self) -> ConstraintCircuitBuilder<II>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<II: Debug + InputIndicator> Debug for ConstraintCircuitBuilder<II>
impl<II: Debug + InputIndicator> Debug for ConstraintCircuitBuilder<II>
Source§impl<II: InputIndicator> Default for ConstraintCircuitBuilder<II>
impl<II: InputIndicator> Default for ConstraintCircuitBuilder<II>
Source§impl<II: PartialEq + InputIndicator> PartialEq for ConstraintCircuitBuilder<II>
impl<II: PartialEq + InputIndicator> PartialEq for ConstraintCircuitBuilder<II>
Source§fn eq(&self, other: &ConstraintCircuitBuilder<II>) -> bool
fn eq(&self, other: &ConstraintCircuitBuilder<II>) -> bool
self
and other
values to be equal, and is used by ==
.impl<II: Eq + InputIndicator> Eq for ConstraintCircuitBuilder<II>
impl<II: InputIndicator> StructuralPartialEq for ConstraintCircuitBuilder<II>
Auto Trait Implementations§
impl<II> Freeze for ConstraintCircuitBuilder<II>
impl<II> !RefUnwindSafe for ConstraintCircuitBuilder<II>
impl<II> !Send for ConstraintCircuitBuilder<II>
impl<II> !Sync for ConstraintCircuitBuilder<II>
impl<II> Unpin for ConstraintCircuitBuilder<II>
impl<II> !UnwindSafe for ConstraintCircuitBuilder<II>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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