Struct snarkvm_algorithms::polycommit::kzg10::Commitment
source · [−]pub struct Commitment<E: PairingEngine>(pub E::G1Affine);
Expand description
Commitment
commits to a polynomial. It is output by KZG10::commit
.
Tuple Fields
0: E::G1Affine
The commitment is a group element.
Implementations
sourceimpl<E: PairingEngine> Commitment<E>
impl<E: PairingEngine> Commitment<E>
pub fn empty() -> Self
pub fn has_degree_bound(&self) -> bool
pub fn is_in_correct_subgroup_assuming_on_curve(&self) -> bool
Trait Implementations
sourceimpl<E: PairingEngine> CanonicalDeserialize for Commitment<E>
impl<E: PairingEngine> CanonicalDeserialize for Commitment<E>
fn deserialize_with_mode<R: Read>(
reader: R,
compress: Compress,
validate: Validate
) -> Result<Self, SerializationError>
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError> where
R: Read,
fn deserialize_compressed_unchecked<R>(
reader: R
) -> Result<Self, SerializationError> where
R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError> where
R: Read,
fn deserialize_uncompressed_unchecked<R>(
reader: R
) -> Result<Self, SerializationError> where
R: Read,
sourceimpl<E: PairingEngine> CanonicalSerialize for Commitment<E>
impl<E: PairingEngine> CanonicalSerialize for Commitment<E>
fn serialize_with_mode<W: Write>(
&self,
writer: W,
compress: Compress
) -> Result<(), SerializationError>
fn serialized_size(&self, compress: Compress) -> usize
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError> where
W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError> where
W: Write,
fn uncompressed_size(&self) -> usize
sourceimpl<E: Clone + PairingEngine> Clone for Commitment<E> where
E::G1Affine: Clone,
impl<E: Clone + PairingEngine> Clone for Commitment<E> where
E::G1Affine: Clone,
sourcefn clone(&self) -> Commitment<E>
fn clone(&self) -> Commitment<E>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<E: Debug + PairingEngine> Debug for Commitment<E> where
E::G1Affine: Debug,
impl<E: Debug + PairingEngine> Debug for Commitment<E> where
E::G1Affine: Debug,
sourceimpl<E: Default + PairingEngine> Default for Commitment<E> where
E::G1Affine: Default,
impl<E: Default + PairingEngine> Default for Commitment<E> where
E::G1Affine: Default,
sourcefn default() -> Commitment<E>
fn default() -> Commitment<E>
Returns the “default value” for a type. Read more
sourceimpl<E: PairingEngine> FromBytes for Commitment<E>
impl<E: PairingEngine> FromBytes for Commitment<E>
sourceimpl<E: Hash + PairingEngine> Hash for Commitment<E> where
E::G1Affine: Hash,
impl<E: Hash + PairingEngine> Hash for Commitment<E> where
E::G1Affine: Hash,
sourceimpl<E: PartialEq + PairingEngine> PartialEq<Commitment<E>> for Commitment<E> where
E::G1Affine: PartialEq,
impl<E: PartialEq + PairingEngine> PartialEq<Commitment<E>> for Commitment<E> where
E::G1Affine: PartialEq,
sourcefn eq(&self, other: &Commitment<E>) -> bool
fn eq(&self, other: &Commitment<E>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
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.
sourceimpl<E: PairingEngine> Valid for Commitment<E>
impl<E: PairingEngine> Valid for Commitment<E>
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
batch: impl Iterator<Item = &'a Self> + Send
) -> Result<(), SerializationError> where
Self: 'a,
impl<E: Copy + PairingEngine> Copy for Commitment<E> where
E::G1Affine: Copy,
impl<E: Eq + PairingEngine> Eq for Commitment<E> where
E::G1Affine: Eq,
impl<E: PairingEngine> StructuralEq for Commitment<E>
impl<E: PairingEngine> StructuralPartialEq 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 · sourcefn borrow_mut(&mut self) -> &mut T
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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.