pub enum Variable<F>where
F: PrimeField,{
Constant(Arc<F>),
Public(Arc<(u64, F)>),
Private(Arc<(u64, F)>),
}
Variants§
Implementations§
Source§impl<F> Variable<F>where
F: PrimeField,
impl<F> Variable<F>where
F: PrimeField,
Sourcepub fn is_constant(&self) -> bool
pub fn is_constant(&self) -> bool
Returns true
if the variable is a constant.
Sourcepub fn is_private(&self) -> bool
pub fn is_private(&self) -> bool
Returns true
if the variable is private.
Sourcepub fn index_value(&self) -> (u64, F)
pub fn index_value(&self) -> (u64, F)
Returns the relative index and value of the variable.
Trait Implementations§
Source§impl<F> Add<&LinearCombination<F>> for &Variable<F>where
F: PrimeField,
impl<F> Add<&LinearCombination<F>> for &Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.Source§fn add(
self,
other: &LinearCombination<F>,
) -> <&Variable<F> as Add<&LinearCombination<F>>>::Output
fn add( self, other: &LinearCombination<F>, ) -> <&Variable<F> as Add<&LinearCombination<F>>>::Output
Performs the
+
operation. Read moreSource§impl<F> Add<&LinearCombination<F>> for Variable<F>where
F: PrimeField,
impl<F> Add<&LinearCombination<F>> for Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.Source§fn add(
self,
other: &LinearCombination<F>,
) -> <Variable<F> as Add<&LinearCombination<F>>>::Output
fn add( self, other: &LinearCombination<F>, ) -> <Variable<F> as Add<&LinearCombination<F>>>::Output
Performs the
+
operation. Read moreSource§impl<F> Add<&Variable<F>> for LinearCombination<F>where
F: PrimeField,
impl<F> Add<&Variable<F>> for LinearCombination<F>where
F: PrimeField,
Source§impl<F> Add<LinearCombination<F>> for &Variable<F>where
F: PrimeField,
impl<F> Add<LinearCombination<F>> for &Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.Source§fn add(
self,
other: LinearCombination<F>,
) -> <&Variable<F> as Add<LinearCombination<F>>>::Output
fn add( self, other: LinearCombination<F>, ) -> <&Variable<F> as Add<LinearCombination<F>>>::Output
Performs the
+
operation. Read moreSource§impl<F> Add<LinearCombination<F>> for Variable<F>where
F: PrimeField,
impl<F> Add<LinearCombination<F>> for Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.Source§fn add(
self,
other: LinearCombination<F>,
) -> <Variable<F> as Add<LinearCombination<F>>>::Output
fn add( self, other: LinearCombination<F>, ) -> <Variable<F> as Add<LinearCombination<F>>>::Output
Performs the
+
operation. Read moreSource§impl<F> Add<Variable<F>> for &LinearCombination<F>where
F: PrimeField,
impl<F> Add<Variable<F>> for &LinearCombination<F>where
F: PrimeField,
Source§impl<F> Add<Variable<F>> for LinearCombination<F>where
F: PrimeField,
impl<F> Add<Variable<F>> for LinearCombination<F>where
F: PrimeField,
Source§impl<F> Add for Variable<F>where
F: PrimeField,
impl<F> Add for Variable<F>where
F: PrimeField,
Source§impl<F> Debug for Variable<F>where
F: PrimeField,
impl<F> Debug for Variable<F>where
F: PrimeField,
Source§impl<F> Display for Variable<F>where
F: PrimeField,
impl<F> Display for Variable<F>where
F: PrimeField,
Source§impl<F> From<&Variable<F>> for LinearCombination<F>where
F: PrimeField,
impl<F> From<&Variable<F>> for LinearCombination<F>where
F: PrimeField,
Source§fn from(variable: &Variable<F>) -> LinearCombination<F>
fn from(variable: &Variable<F>) -> LinearCombination<F>
Converts to this type from the input type.
Source§impl<F> From<Variable<F>> for LinearCombination<F>where
F: PrimeField,
impl<F> From<Variable<F>> for LinearCombination<F>where
F: PrimeField,
Source§fn from(variable: Variable<F>) -> LinearCombination<F>
fn from(variable: Variable<F>) -> LinearCombination<F>
Converts to this type from the input type.
Source§impl<F> Ord for Variable<F>where
F: PrimeField,
impl<F> Ord for Variable<F>where
F: PrimeField,
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<F> PartialOrd for Variable<F>where
F: PrimeField,
impl<F> PartialOrd for Variable<F>where
F: PrimeField,
Source§impl<F> Sub<&LinearCombination<F>> for &Variable<F>where
F: PrimeField,
impl<F> Sub<&LinearCombination<F>> for &Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.Source§fn sub(
self,
other: &LinearCombination<F>,
) -> <&Variable<F> as Sub<&LinearCombination<F>>>::Output
fn sub( self, other: &LinearCombination<F>, ) -> <&Variable<F> as Sub<&LinearCombination<F>>>::Output
Performs the
-
operation. Read moreSource§impl<F> Sub<&LinearCombination<F>> for Variable<F>where
F: PrimeField,
impl<F> Sub<&LinearCombination<F>> for Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.Source§fn sub(
self,
other: &LinearCombination<F>,
) -> <Variable<F> as Sub<&LinearCombination<F>>>::Output
fn sub( self, other: &LinearCombination<F>, ) -> <Variable<F> as Sub<&LinearCombination<F>>>::Output
Performs the
-
operation. Read moreSource§impl<F> Sub<&Variable<F>> for LinearCombination<F>where
F: PrimeField,
impl<F> Sub<&Variable<F>> for LinearCombination<F>where
F: PrimeField,
Source§impl<F> Sub<LinearCombination<F>> for &Variable<F>where
F: PrimeField,
impl<F> Sub<LinearCombination<F>> for &Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.Source§fn sub(
self,
other: LinearCombination<F>,
) -> <&Variable<F> as Sub<LinearCombination<F>>>::Output
fn sub( self, other: LinearCombination<F>, ) -> <&Variable<F> as Sub<LinearCombination<F>>>::Output
Performs the
-
operation. Read moreSource§impl<F> Sub<LinearCombination<F>> for Variable<F>where
F: PrimeField,
impl<F> Sub<LinearCombination<F>> for Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.Source§fn sub(
self,
other: LinearCombination<F>,
) -> <Variable<F> as Sub<LinearCombination<F>>>::Output
fn sub( self, other: LinearCombination<F>, ) -> <Variable<F> as Sub<LinearCombination<F>>>::Output
Performs the
-
operation. Read moreSource§impl<F> Sub<Variable<F>> for &LinearCombination<F>where
F: PrimeField,
impl<F> Sub<Variable<F>> for &LinearCombination<F>where
F: PrimeField,
Source§impl<F> Sub<Variable<F>> for LinearCombination<F>where
F: PrimeField,
impl<F> Sub<Variable<F>> for LinearCombination<F>where
F: PrimeField,
Source§impl<F> Sub for Variable<F>where
F: PrimeField,
impl<F> Sub for Variable<F>where
F: PrimeField,
impl<F> Eq for Variable<F>where
F: Eq + PrimeField,
impl<F> StructuralPartialEq for Variable<F>where
F: PrimeField,
Auto Trait Implementations§
impl<F> Freeze for Variable<F>
impl<F> RefUnwindSafe for Variable<F>where
F: RefUnwindSafe,
impl<F> Send for Variable<F>
impl<F> Sync for Variable<F>
impl<F> Unpin for Variable<F>
impl<F> UnwindSafe for Variable<F>where
F: RefUnwindSafe,
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
Converts
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>
Converts
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