pub struct LabeledCommitment<C: PCCommitment> { /* private fields */ }
Expand description
A commitment along with information about its degree bound (if any).
Implementations
sourceimpl<C: PCCommitment> LabeledCommitment<C>
impl<C: PCCommitment> 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.
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
sourceimpl<TargetCurve, BaseCurve, PG> AllocGadget<LabeledCommitment<Commitment<TargetCurve>>, <BaseCurve as PairingEngine>::Fr> for LabeledCommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
impl<TargetCurve, BaseCurve, PG> AllocGadget<LabeledCommitment<Commitment<TargetCurve>>, <BaseCurve as PairingEngine>::Fr> for LabeledCommitmentVar<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<LabeledCommitment<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<LabeledCommitment<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<LabeledCommitment<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<TargetCurve, BaseCurve, PG> AllocGadget<LabeledCommitment<Commitment<TargetCurve>>, <BaseCurve as PairingEngine>::Fr> for LabeledCommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
impl<TargetCurve, BaseCurve, PG> AllocGadget<LabeledCommitment<Commitment<TargetCurve>>, <BaseCurve as PairingEngine>::Fr> for LabeledCommitmentVar<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<LabeledCommitment<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<LabeledCommitment<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<LabeledCommitment<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<C: PCCommitment> CanonicalSerialize for LabeledCommitment<C>
impl<C: PCCommitment> CanonicalSerialize for LabeledCommitment<C>
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<C: Clone + PCCommitment> Clone for LabeledCommitment<C>
impl<C: Clone + PCCommitment> Clone for LabeledCommitment<C>
sourcefn clone(&self) -> LabeledCommitment<C>
fn clone(&self) -> LabeledCommitment<C>
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<C: Debug + PCCommitment> Debug for LabeledCommitment<C>
impl<C: Debug + PCCommitment> Debug for LabeledCommitment<C>
sourceimpl<C: PCCommitment> ToBytes for LabeledCommitment<C>
impl<C: PCCommitment> ToBytes for LabeledCommitment<C>
sourceimpl<F: Field, C: PCCommitment + ToConstraintField<F>> ToConstraintField<F> for LabeledCommitment<C>
impl<F: Field, C: PCCommitment + ToConstraintField<F>> ToConstraintField<F> for LabeledCommitment<C>
fn to_field_elements(&self) -> Result<Vec<F>, ConstraintFieldError>
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
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
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