Struct snarkvm_algorithms::polycommit::sonic_pc::LabeledCommitment
source · pub struct LabeledCommitment<C: CanonicalSerialize + 'static> { /* private fields */ }
Expand description
A commitment along with information about its degree bound (if any).
Implementations§
source§impl<C: CanonicalSerialize> LabeledCommitment<C>
impl<C: CanonicalSerialize> LabeledCommitment<C>
sourcepub fn new(
label: PolynomialLabel,
commitment: C,
degree_bound: Option<usize>
) -> Self
pub fn new( label: PolynomialLabel, commitment: C, degree_bound: Option<usize> ) -> Self
Instantiate a new polynomial_context.
pub fn new_with_info(info: &PolynomialInfo, commitment: C) -> Self
sourcepub fn commitment(&self) -> &C
pub fn commitment(&self) -> &C
Retrieve the commitment from self
.
sourcepub fn degree_bound(&self) -> Option<usize>
pub fn degree_bound(&self) -> Option<usize>
Retrieve the degree bound in self
.
Trait Implementations§
source§impl<C: CanonicalSerialize + 'static> CanonicalSerialize for LabeledCommitment<C>
impl<C: CanonicalSerialize + 'static> CanonicalSerialize for LabeledCommitment<C>
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
source§impl<C: Clone + CanonicalSerialize + 'static> Clone for LabeledCommitment<C>
impl<C: Clone + CanonicalSerialize + 'static> Clone for LabeledCommitment<C>
source§fn clone(&self) -> LabeledCommitment<C>
fn clone(&self) -> LabeledCommitment<C>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<C: Debug + CanonicalSerialize + 'static> Debug for LabeledCommitment<C>
impl<C: Debug + CanonicalSerialize + 'static> Debug for LabeledCommitment<C>
source§impl<C: PartialEq + CanonicalSerialize + 'static> PartialEq<LabeledCommitment<C>> for LabeledCommitment<C>
impl<C: PartialEq + CanonicalSerialize + 'static> PartialEq<LabeledCommitment<C>> for LabeledCommitment<C>
source§fn eq(&self, other: &LabeledCommitment<C>) -> bool
fn eq(&self, other: &LabeledCommitment<C>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<C: CanonicalSerialize + ToBytes> ToBytes for LabeledCommitment<C>
impl<C: CanonicalSerialize + ToBytes> ToBytes for LabeledCommitment<C>
source§impl<F: Field, C: CanonicalSerialize + ToConstraintField<F>> ToConstraintField<F> for LabeledCommitment<C>
impl<F: Field, C: CanonicalSerialize + ToConstraintField<F>> ToConstraintField<F> for LabeledCommitment<C>
fn to_field_elements(&self) -> Result<Vec<F>, ConstraintFieldError>
impl<C: Eq + CanonicalSerialize + 'static> Eq for LabeledCommitment<C>
impl<C: CanonicalSerialize + 'static> StructuralEq for LabeledCommitment<C>
impl<C: CanonicalSerialize + 'static> StructuralPartialEq for LabeledCommitment<C>
Auto Trait Implementations§
impl<C> RefUnwindSafe for LabeledCommitment<C>where C: RefUnwindSafe,
impl<C> Send for LabeledCommitment<C>where C: Send,
impl<C> Sync for LabeledCommitment<C>where C: Sync,
impl<C> Unpin for LabeledCommitment<C>where C: Unpin,
impl<C> UnwindSafe for LabeledCommitment<C>where C: UnwindSafe,
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.