pub trait AllocBytesGadget<V, F> where
F: Field,
V: Into<Option<Vec<u8, Global>>> + ?Sized, {
fn alloc_bytes<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError>
where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<V>;
fn alloc_input_bytes<Fn, T, CS>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<V>;
fn alloc_bytes_checked<Fn, T, CS>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<V>,
{ ... }
fn alloc_input_bytes_checked<Fn, T, CS>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<V>,
{ ... }
}
impl<Pairing, F, P> AllocBytesGadget<Vec<u8, Global>, F> for GM17ProofGadget<Pairing, F, P> where
P: PairingGadget<Pairing, F>,
F: Field,
Pairing: PairingEngine, impl<Pairing, F, P> AllocBytesGadget<Vec<u8, Global>, F> for GM17VerifyingKeyGadget<Pairing, F, P> where
P: PairingGadget<Pairing, F>,
F: Field,
Pairing: PairingEngine, impl<PairingE, ConstraintF, P> AllocBytesGadget<Vec<u8, Global>, ConstraintF> for ProofGadget<PairingE, ConstraintF, P> where
P: PairingGadget<PairingE, ConstraintF>,
PairingE: PairingEngine,
ConstraintF: Field, impl<PairingE, ConstraintF, P> AllocBytesGadget<Vec<u8, Global>, ConstraintF> for VerifyingKeyGadget<PairingE, ConstraintF, P> where
P: PairingGadget<PairingE, ConstraintF>,
PairingE: PairingEngine,
ConstraintF: Field,