pub struct G1PreparedVar<P: MNT4Config> { /* private fields */ }
Expand description
Represents the cached precomputation that can be performed on a G1 element which enables speeding up pairing computation.
Implementations§
Source§impl<P: MNT4Config> G1PreparedVar<P>
impl<P: MNT4Config> G1PreparedVar<P>
Sourcepub fn value(&self) -> Result<G1Prepared<P>, SynthesisError>
pub fn value(&self) -> Result<G1Prepared<P>, SynthesisError>
Returns the value assigned to self
in the underlying constraint
system.
Sourcepub fn from_group_var(q: &G1Var<P>) -> Result<Self, SynthesisError>
pub fn from_group_var(q: &G1Var<P>) -> Result<Self, SynthesisError>
Constructs Self
from a G1Var
.
Trait Implementations§
Source§impl<P: MNT4Config> AllocVar<G1Prepared<P>, <P as MNT4Config>::Fp> for G1PreparedVar<P>
impl<P: MNT4Config> AllocVar<G1Prepared<P>, <P as MNT4Config>::Fp> for G1PreparedVar<P>
Source§fn new_variable<T: Borrow<G1Prepared<P>>>(
cs: impl Into<Namespace<P::Fp>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
mode: AllocationMode,
) -> Result<Self, SynthesisError>
fn new_variable<T: Borrow<G1Prepared<P>>>( cs: impl Into<Namespace<P::Fp>>, f: impl FnOnce() -> Result<T, SynthesisError>, mode: AllocationMode, ) -> Result<Self, SynthesisError>
Allocates a new variable of type
Self
in the ConstraintSystem
cs
.
The mode of allocation is decided by mode
.Source§fn new_constant(
cs: impl Into<Namespace<F>>,
t: impl Borrow<V>,
) -> Result<Self, SynthesisError>
fn new_constant( cs: impl Into<Namespace<F>>, t: impl Borrow<V>, ) -> Result<Self, SynthesisError>
Source§fn new_input<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
) -> Result<Self, SynthesisError>
fn new_input<T: Borrow<V>>( cs: impl Into<Namespace<F>>, f: impl FnOnce() -> Result<T, SynthesisError>, ) -> Result<Self, SynthesisError>
Allocates a new public input of type
Self
in the ConstraintSystem
cs
.Source§fn new_witness<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
) -> Result<Self, SynthesisError>
fn new_witness<T: Borrow<V>>( cs: impl Into<Namespace<F>>, f: impl FnOnce() -> Result<T, SynthesisError>, ) -> Result<Self, SynthesisError>
Allocates a new private witness of type
Self
in the ConstraintSystem
cs
.Source§fn new_variable_with_inferred_mode<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
) -> Result<Self, SynthesisError>
fn new_variable_with_inferred_mode<T: Borrow<V>>( cs: impl Into<Namespace<F>>, f: impl FnOnce() -> Result<T, SynthesisError>, ) -> Result<Self, SynthesisError>
Allocates a new constant or private witness of type
Self
in the
ConstraintSystem
cs
with the allocation mode inferred from cs
.
A constant is allocated if cs
is None
, and a private witness is
allocated otherwise. Read moreSource§impl<P: MNT4Config> Clone for G1PreparedVar<P>
impl<P: MNT4Config> Clone for G1PreparedVar<P>
Source§impl<P: MNT4Config> Debug for G1PreparedVar<P>
impl<P: MNT4Config> Debug for G1PreparedVar<P>
Source§impl<P: MNT4Config> ToBytesGadget<<P as MNT4Config>::Fp> for G1PreparedVar<P>
impl<P: MNT4Config> ToBytesGadget<<P as MNT4Config>::Fp> for G1PreparedVar<P>
Source§fn to_bytes_le(&self) -> Result<Vec<UInt8<P::Fp>>, SynthesisError>
fn to_bytes_le(&self) -> Result<Vec<UInt8<P::Fp>>, SynthesisError>
Outputs a canonical, little-endian, byte decomposition of
self
. Read moreSource§fn to_non_unique_bytes_le(&self) -> Result<Vec<UInt8<P::Fp>>, SynthesisError>
fn to_non_unique_bytes_le(&self) -> Result<Vec<UInt8<P::Fp>>, SynthesisError>
Outputs a possibly non-unique byte decomposition of
self
. Read moreAuto Trait Implementations§
impl<P> Freeze for G1PreparedVar<P>
impl<P> !RefUnwindSafe for G1PreparedVar<P>
impl<P> !Send for G1PreparedVar<P>
impl<P> !Sync for G1PreparedVar<P>
impl<P> Unpin for G1PreparedVar<P>
impl<P> !UnwindSafe for G1PreparedVar<P>
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