pub enum Expression<F: Field> {
Constant(F),
Wire(Wire),
Neg(Box<Expression<F>>),
Sum(Box<Expression<F>>, Box<Expression<F>>),
Product(Box<Expression<F>>, Box<Expression<F>>),
}Expand description
A symbolic polynomial expression over field F and wire indices.
Used to build constraints: an expression that must equal zero.
Variants§
Constant(F)
A field constant.
Wire(Wire)
A wire reference (a variable).
Neg(Box<Expression<F>>)
Negation of an expression.
Sum(Box<Expression<F>>, Box<Expression<F>>)
Sum of two expressions.
Product(Box<Expression<F>>, Box<Expression<F>>)
Product of two expressions.
Implementations§
Source§impl<F: Field> Expression<F>
impl<F: Field> Expression<F>
Trait Implementations§
Source§impl<F: Field> Add for Expression<F>
impl<F: Field> Add for Expression<F>
Source§impl<F: Clone + Field> Clone for Expression<F>
impl<F: Clone + Field> Clone for Expression<F>
Source§fn clone(&self) -> Expression<F>
fn clone(&self) -> Expression<F>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<F: Field> Mul for Expression<F>
impl<F: Field> Mul for Expression<F>
Source§impl<F: Field> Neg for Expression<F>
impl<F: Field> Neg for Expression<F>
Auto Trait Implementations§
impl<F> Freeze for Expression<F>where
F: Freeze,
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> UnsafeUnpin for Expression<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for Expression<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