Struct snarkvm_algorithms::commitment::pedersen_compressed::PedersenCompressedCommitment
source · [−]pub struct PedersenCompressedCommitment<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> {
pub pedersen: PedersenCommitment<G, NUM_WINDOWS, WINDOW_SIZE>,
}
Fields
pedersen: PedersenCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
Trait Implementations
sourceimpl<G: Clone + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Clone for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: Clone + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Clone for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourcefn clone(&self) -> PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
fn clone(&self) -> PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
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<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> CommitmentScheme for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> CommitmentScheme for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourcefn commit(
&self,
input: &[u8],
randomness: &Self::Randomness
) -> Result<Self::Output, CommitmentError>
fn commit(
&self,
input: &[u8],
randomness: &Self::Randomness
) -> Result<Self::Output, CommitmentError>
Returns the affine x-coordinate as the commitment.
type Output = <G::Affine as AffineCurve>::BaseField
type Parameters = (Vec<Vec<G>>, Vec<G>)
type Randomness = <G as Group>::ScalarField
fn setup(message: &str) -> Self
fn parameters(&self) -> Self::Parameters
sourceimpl<G: Debug + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Debug for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: Debug + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Debug for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourceimpl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> From<(Vec<Vec<G, Global>, Global>, Vec<G, Global>)> for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> From<(Vec<Vec<G, Global>, Global>, Vec<G, Global>)> for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourceimpl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> From<PedersenCommitment<G, NUM_WINDOWS, WINDOW_SIZE>> for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> From<PedersenCommitment<G, NUM_WINDOWS, WINDOW_SIZE>> for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourcefn from(pedersen: PedersenCommitment<G, NUM_WINDOWS, WINDOW_SIZE>) -> Self
fn from(pedersen: PedersenCommitment<G, NUM_WINDOWS, WINDOW_SIZE>) -> Self
Performs the conversion.
sourceimpl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> FromBytes for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> FromBytes for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourceimpl<G: Ord + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Ord for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: Ord + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Ord for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourcefn cmp(
&self,
other: &PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
) -> Ordering
fn cmp(
&self,
other: &PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
sourceimpl<G: PartialEq + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> PartialEq<PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>> for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: PartialEq + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> PartialEq<PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>> for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourcefn eq(
&self,
other: &PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
) -> bool
fn eq(
&self,
other: &PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(
&self,
other: &PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
) -> bool
fn ne(
&self,
other: &PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
) -> bool
This method tests for !=
.
sourceimpl<G: PartialOrd + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> PartialOrd<PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>> for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: PartialOrd + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> PartialOrd<PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>> for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourcefn partial_cmp(
&self,
other: &PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
) -> Option<Ordering>
fn partial_cmp(
&self,
other: &PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> ToBytes for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> ToBytes for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourceimpl<F: Field, G: ProjectiveCurve + ToConstraintField<F>, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> ToConstraintField<F> for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<F: Field, G: ProjectiveCurve + ToConstraintField<F>, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> ToConstraintField<F> for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
fn to_field_elements(&self) -> Result<Vec<F>, ConstraintFieldError>
impl<G: Eq + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Eq for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> StructuralEq for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> StructuralPartialEq for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
Auto Trait Implementations
impl<G, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> RefUnwindSafe for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE> where
G: RefUnwindSafe,
impl<G, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Send for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Sync for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Unpin for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE> where
G: Unpin,
impl<G, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> UnwindSafe for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE> where
G: 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)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more