pub struct AffineVar<P: SWCurveConfig, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>>{
pub x: F,
pub y: F,
pub infinity: Boolean<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
/* private fields */
}
Expand description
An affine representation of a curve point.
Fields§
§x: F
The x-coordinate.
y: F
The y-coordinate.
infinity: Boolean<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>
Is self
the point at infinity.
Implementations§
Source§impl<P, F> AffineVar<P, F>where
P: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> AffineVar<P, F>where
P: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
Sourcepub fn value(&self) -> Result<SWAffine<P>, SynthesisError>
pub fn value(&self) -> Result<SWAffine<P>, SynthesisError>
Returns the value assigned to self
in the underlying
constraint system.
Trait Implementations§
Source§impl<P: SWCurveConfig, F> Clone for AffineVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Clone + FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
Boolean<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>: Clone,
PhantomData<P>: Clone,
impl<P: SWCurveConfig, F> Clone for AffineVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Clone + FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
Boolean<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>: Clone,
PhantomData<P>: Clone,
Source§impl<P: SWCurveConfig, F> Debug for AffineVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Debug + FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
Boolean<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>: Debug,
impl<P: SWCurveConfig, F> Debug for AffineVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Debug + FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
Boolean<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>: Debug,
Source§impl<P, F> ToConstraintFieldGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for AffineVar<P, F>where
P: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + ToConstraintFieldGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> ToConstraintFieldGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for AffineVar<P, F>where
P: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + ToConstraintFieldGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
Source§fn to_constraint_field(
&self,
) -> Result<Vec<FpVar<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>>, SynthesisError>
fn to_constraint_field( &self, ) -> Result<Vec<FpVar<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>>, SynthesisError>
Converts
self
to FpVar<ConstraintF>
variables.Auto Trait Implementations§
impl<P, F> Freeze for AffineVar<P, F>
impl<P, F> !RefUnwindSafe for AffineVar<P, F>
impl<P, F> !Send for AffineVar<P, F>
impl<P, F> !Sync for AffineVar<P, F>
impl<P, F> Unpin for AffineVar<P, F>
impl<P, F> !UnwindSafe for AffineVar<P, F>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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