Struct snarkvm_gadgets::curves::templates::bls12::g2::G2PreparedGadget
source · [−]pub struct G2PreparedGadget<P: Bls12Parameters> {
pub ell_coeffs: Vec<(Fp2Gadget<<P as Bls12Parameters>::Fp2Params, <P as Bls12Parameters>::Fp>, Fp2Gadget<<P as Bls12Parameters>::Fp2Params, <P as Bls12Parameters>::Fp>)>,
}
Fields
ell_coeffs: Vec<(Fp2Gadget<<P as Bls12Parameters>::Fp2Params, <P as Bls12Parameters>::Fp>, Fp2Gadget<<P as Bls12Parameters>::Fp2Params, <P as Bls12Parameters>::Fp>)>
Implementations
sourceimpl<P: Bls12Parameters> G2PreparedGadget<P>
impl<P: Bls12Parameters> G2PreparedGadget<P>
pub fn from_affine<CS: ConstraintSystem<P::Fp>>(
cs: CS,
q: G2Gadget<P>
) -> Result<Self, SynthesisError>
Trait Implementations
sourceimpl<P: Bls12Parameters> AllocGadget<G2Prepared<P>, <P as Bls12Parameters>::Fp> for G2PreparedGadget<P>
impl<P: Bls12Parameters> AllocGadget<G2Prepared<P>, <P as Bls12Parameters>::Fp> for G2PreparedGadget<P>
fn alloc_constant<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<G2Prepared<P>>, CS: ConstraintSystem<<P as Bls12Parameters>::Fp>>(
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>
fn alloc<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<G2Prepared<P>>, CS: ConstraintSystem<<P as Bls12Parameters>::Fp>>(
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>
fn alloc_input<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<G2Prepared<P>>, CS: ConstraintSystem<<P as Bls12Parameters>::Fp>>(
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>
fn alloc_checked<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
fn alloc_input_checked<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
sourceimpl<P: Bls12Parameters> Clone for G2PreparedGadget<P> where
Fp2Gadget<P::Fp2Params, P::Fp>: Clone,
impl<P: Bls12Parameters> Clone for G2PreparedGadget<P> where
Fp2Gadget<P::Fp2Params, P::Fp>: Clone,
sourceimpl<P: Bls12Parameters> CondSelectGadget<<P as Bls12Parameters>::Fp> for G2PreparedGadget<P>
impl<P: Bls12Parameters> CondSelectGadget<<P as Bls12Parameters>::Fp> for G2PreparedGadget<P>
fn conditionally_select<CS: ConstraintSystem<<P as Bls12Parameters>::Fp>>(
cs: CS,
cond: &Boolean,
first: &Self,
second: &Self
) -> Result<Self, SynthesisError>
fn cost() -> usize
sourceimpl<P: Bls12Parameters> ConditionalEqGadget<<P as Bls12Parameters>::Fp> for G2PreparedGadget<P>
impl<P: Bls12Parameters> ConditionalEqGadget<<P as Bls12Parameters>::Fp> for G2PreparedGadget<P>
fn conditional_enforce_equal<CS: ConstraintSystem<P::Fp>>(
&self,
cs: CS,
other: &Self,
condition: &Boolean
) -> Result<(), SynthesisError>
fn cost() -> usize
sourceimpl<P: Bls12Parameters> Debug for G2PreparedGadget<P> where
Fp2Gadget<P::Fp2Params, P::Fp>: Debug,
impl<P: Bls12Parameters> Debug for G2PreparedGadget<P> where
Fp2Gadget<P::Fp2Params, P::Fp>: Debug,
sourceimpl<P: Bls12Parameters> EqGadget<<P as Bls12Parameters>::Fp> for G2PreparedGadget<P>
impl<P: Bls12Parameters> EqGadget<<P as Bls12Parameters>::Fp> for G2PreparedGadget<P>
sourcefn is_eq<CS: ConstraintSystem<F>>(
&self,
_cs: CS,
_other: &Self
) -> Result<Boolean, SynthesisError>
fn is_eq<CS: ConstraintSystem<F>>(
&self,
_cs: CS,
_other: &Self
) -> Result<Boolean, SynthesisError>
Output a Boolean
value representing whether self.value() == other.value()
. Read more
fn enforce_equal<CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<(), SynthesisError>
fn cost() -> usize
sourceimpl<P: Bls12Parameters> PartialEq<G2PreparedGadget<P>> for G2PreparedGadget<P> where
Fp2Gadget<P::Fp2Params, P::Fp>: Debug,
impl<P: Bls12Parameters> PartialEq<G2PreparedGadget<P>> for G2PreparedGadget<P> where
Fp2Gadget<P::Fp2Params, P::Fp>: Debug,
sourceimpl<P: Bls12Parameters> SumGadget<<P as Bls12Parameters>::Fp> for G2PreparedGadget<P>
impl<P: Bls12Parameters> SumGadget<<P as Bls12Parameters>::Fp> for G2PreparedGadget<P>
fn zero<CS: ConstraintSystem<<P as Bls12Parameters>::Fp>>(
cs: CS
) -> Result<Self, SynthesisError>
fn sum<CS: ConstraintSystem<<P as Bls12Parameters>::Fp>>(
cs: CS,
elems: &[Self]
) -> Result<Self, SynthesisError>
sourceimpl<P: Bls12Parameters> ToBytesGadget<<P as Bls12Parameters>::Fp> for G2PreparedGadget<P>
impl<P: Bls12Parameters> ToBytesGadget<<P as Bls12Parameters>::Fp> for G2PreparedGadget<P>
fn to_bytes<CS: ConstraintSystem<P::Fp>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
sourcefn to_bytes_strict<CS: ConstraintSystem<P::Fp>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
fn to_bytes_strict<CS: ConstraintSystem<P::Fp>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
Additionally checks if the produced list of booleans is ‘valid’.
impl<P: Bls12Parameters> Eq for G2PreparedGadget<P> where
Fp2Gadget<P::Fp2Params, P::Fp>: Debug,
Auto Trait Implementations
impl<P> RefUnwindSafe for G2PreparedGadget<P> where
<P as Bls12Parameters>::Fp: RefUnwindSafe,
<P as Bls12Parameters>::Fp2Params: RefUnwindSafe,
impl<P> Send for G2PreparedGadget<P>
impl<P> Sync for G2PreparedGadget<P>
impl<P> Unpin for G2PreparedGadget<P> where
<P as Bls12Parameters>::Fp: Unpin,
<P as Bls12Parameters>::Fp2Params: Unpin,
impl<P> UnwindSafe for G2PreparedGadget<P> where
<P as Bls12Parameters>::Fp: UnwindSafe,
<P as Bls12Parameters>::Fp2Params: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<F, T> ConditionalOrEqualsGadget<F> for T where
F: Field,
T: ConditionalEqGadget<F> + CondSelectGadget<F>,
impl<F, T> ConditionalOrEqualsGadget<F> for T where
F: Field,
T: ConditionalEqGadget<F> + CondSelectGadget<F>,
fn conditional_enforce_equal_or<CS: ConstraintSystem<F>>(
cs: CS,
cond: &Boolean,
var: &Self,
first: &Self,
second: &Self,
should_enforce: &Boolean
) -> Result<(), SynthesisError>
fn cost() -> usize
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<F, T> OrEqualsGadget<F> for T where
F: Field,
T: ConditionalOrEqualsGadget<F>,
impl<F, T> OrEqualsGadget<F> for T where
F: Field,
T: ConditionalOrEqualsGadget<F>,
fn enforce_equal_or<CS: ConstraintSystem<F>>(
cs: CS,
cond: &Boolean,
var: &Self,
first: &Self,
second: &Self
) -> Result<(), SynthesisError>
fn cost() -> usize
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more