pub struct Variable(/* private fields */);Expand description
Variables in [ConstraintSystem]s
Implementations§
Source§impl Variable
impl Variable
Sourcepub const fn is_instance(self) -> bool
pub const fn is_instance(self) -> bool
Is self an instance variable?
Sourcepub const fn is_witness(self) -> bool
pub const fn is_witness(self) -> bool
Is self a witness variable?
Sourcepub const fn symbolic_lc(i: usize) -> Self
pub const fn symbolic_lc(i: usize) -> Self
Construct a symbolic linear combination variable.
Sourcepub const fn get_lc_index(&self) -> Option<usize>
pub const fn get_lc_index(&self) -> Option<usize>
Get the usize in self if self.is_lc().
Sourcepub const fn get_variable_index(&self, witness_offset: usize) -> Option<usize>
pub const fn get_variable_index(&self, witness_offset: usize) -> Option<usize>
Returns Some(usize) if !self.is_lc(), and None otherwise.
Trait Implementations§
Source§impl<'a, F: Field> Add<&'a Variable> for LinearCombination<F>
impl<'a, F: Field> Add<&'a Variable> for LinearCombination<F>
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+ operator.Source§impl<F: Field> Add<Variable> for LinearCombination<F>
impl<F: Field> Add<Variable> for LinearCombination<F>
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+ operator.Source§impl Ord for Variable
impl Ord for Variable
Source§impl PartialOrd for Variable
impl PartialOrd for Variable
Source§impl<'a, F: Field> Sub<&'a Variable> for LinearCombination<F>
impl<'a, F: Field> Sub<&'a Variable> for LinearCombination<F>
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
- operator.Source§impl<F: Field> Sub<Variable> for LinearCombination<F>
impl<F: Field> Sub<Variable> for LinearCombination<F>
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
- operator.impl Copy for Variable
impl Eq for Variable
impl StructuralPartialEq for Variable
Auto Trait Implementations§
impl Freeze for Variable
impl RefUnwindSafe for Variable
impl Send for Variable
impl Sync for Variable
impl Unpin for Variable
impl UnsafeUnpin for Variable
impl UnwindSafe for Variable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.