Struct snarkvm_polycommit::marlin_pc::Commitment
source · [−]pub struct Commitment<E: PairingEngine> { /* private fields */ }
Expand description
Commitment to a polynomial that optionally enforces a degree bound.
Trait Implementations
sourceimpl<TargetCurve, BaseCurve, PG> AllocGadget<Commitment<TargetCurve>, <BaseCurve as PairingEngine>::Fr> for CommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
impl<TargetCurve, BaseCurve, PG> AllocGadget<Commitment<TargetCurve>, <BaseCurve as PairingEngine>::Fr> for CommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
fn alloc_constant<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<Commitment<TargetCurve>>, CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>
fn alloc<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<Commitment<TargetCurve>>, CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>
fn alloc_input<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<Commitment<TargetCurve>>, CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>
fn alloc_checked<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
T: Borrow<V>,
CS: ConstraintSystem<F>,
fn alloc_input_checked<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
T: Borrow<V>,
CS: ConstraintSystem<F>,
sourceimpl<E: PairingEngine> CanonicalDeserialize for Commitment<E>
impl<E: PairingEngine> CanonicalDeserialize for Commitment<E>
sourcefn deserialize<R: Read>(reader: &mut R) -> Result<Self, SerializationError>
fn deserialize<R: Read>(reader: &mut R) -> Result<Self, SerializationError>
Reads Self
from reader
.
sourcefn deserialize_uncompressed<R: Read>(
reader: &mut R
) -> Result<Self, SerializationError>
fn deserialize_uncompressed<R: Read>(
reader: &mut R
) -> Result<Self, SerializationError>
Reads Self
from reader
without compression.
sourceimpl<E: PairingEngine> CanonicalSerialize for Commitment<E>
impl<E: PairingEngine> CanonicalSerialize for Commitment<E>
sourcefn serialize<W: Write>(&self, writer: &mut W) -> Result<(), SerializationError>
fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), SerializationError>
Serializes self
into writer
.
fn serialized_size(&self) -> usize
sourcefn serialize_uncompressed<W: Write>(
&self,
writer: &mut W
) -> Result<(), SerializationError>
fn serialize_uncompressed<W: Write>(
&self,
writer: &mut W
) -> Result<(), SerializationError>
Serializes self
into writer
without compression.
fn uncompressed_size(&self) -> usize
sourceimpl<E: PairingEngine> Clone for Commitment<E>
impl<E: PairingEngine> Clone for Commitment<E>
sourceimpl<E: PairingEngine> Debug for Commitment<E>
impl<E: PairingEngine> Debug for Commitment<E>
sourceimpl<E: PairingEngine> Default for Commitment<E>
impl<E: PairingEngine> Default for Commitment<E>
sourceimpl<E: PairingEngine> FromBytes for Commitment<E>
impl<E: PairingEngine> FromBytes for Commitment<E>
sourceimpl<E: PairingEngine> Hash for Commitment<E>
impl<E: PairingEngine> Hash for Commitment<E>
sourceimpl<E: PairingEngine> PCCommitment for Commitment<E>
impl<E: PairingEngine> PCCommitment for Commitment<E>
sourcefn has_degree_bound(&self) -> bool
fn has_degree_bound(&self) -> bool
Does this commitment have a degree bound?
sourcefn is_in_correct_subgroup_assuming_on_curve(&self) -> bool
fn is_in_correct_subgroup_assuming_on_curve(&self) -> bool
Does this commitment’s affine belong to the correct subgroup?
sourceimpl<E: PairingEngine> PartialEq<Commitment<E>> for Commitment<E>
impl<E: PairingEngine> PartialEq<Commitment<E>> for Commitment<E>
sourceimpl<E: PairingEngine> Prepare<PreparedCommitment<E>> for Commitment<E>
impl<E: PairingEngine> Prepare<PreparedCommitment<E>> for Commitment<E>
sourcefn prepare(&self) -> PreparedCommitment<E>
fn prepare(&self) -> PreparedCommitment<E>
Prepare commitment to a polynomial that optionally enforces a degree bound.
sourceimpl<E: PairingEngine> ToBytes for Commitment<E>
impl<E: PairingEngine> ToBytes for Commitment<E>
sourceimpl<E: PairingEngine> ToConstraintField<<E as PairingEngine>::Fq> for Commitment<E>
impl<E: PairingEngine> ToConstraintField<<E as PairingEngine>::Fq> for Commitment<E>
fn to_field_elements(&self) -> Result<Vec<E::Fq>, ConstraintFieldError>
sourceimpl<E: PairingEngine> ToMinimalBits for Commitment<E>
impl<E: PairingEngine> ToMinimalBits for Commitment<E>
sourcefn to_minimal_bits(&self) -> Vec<bool>
fn to_minimal_bits(&self) -> Vec<bool>
Returns self
as a minimal boolean array.
impl<E: PairingEngine> Copy for Commitment<E>
impl<E: PairingEngine> Eq for Commitment<E>
Auto Trait Implementations
impl<E> RefUnwindSafe for Commitment<E> where
<E as PairingEngine>::G1Affine: RefUnwindSafe,
impl<E> Send for Commitment<E>
impl<E> Sync for Commitment<E>
impl<E> Unpin for Commitment<E> where
<E as PairingEngine>::G1Affine: Unpin,
impl<E> UnwindSafe for Commitment<E> where
<E as PairingEngine>::G1Affine: 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<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.
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