Struct proj_crypto::asymmetric::commitments::Commitment
[−]
[src]
pub struct Commitment { pub x: Mpz, pub p: Mpz, }
The commitment its self as one would share along a wire
Fields
x: Mpz
The numerical representation of the commitment
p: Mpz
We can't do any maths without p
Methods
impl Commitment
[src]
fn from_parts(x: Mpz, p: Mpz, check_p: bool) -> Result<Commitment, ()>
Creates a Commitment from raw parts
Trait Implementations
impl Clone for Commitment
[src]
fn clone(&self) -> Commitment
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Add<Commitment> for Commitment
[src]
Naming of these operations refers to the data enclosed
type Output = Commitment
The resulting type after applying the +
operator
fn add(self, other: Commitment) -> Self::Output
The method for the +
operator
impl<'a> Add<&'a Commitment> for Commitment
[src]
type Output = Commitment
The resulting type after applying the +
operator
fn add(self, other: &'a Commitment) -> Self::Output
The method for the +
operator
impl<'a> Add<Commitment> for &'a Commitment
[src]
type Output = Commitment
The resulting type after applying the +
operator
fn add(self, other: Commitment) -> Self::Output
The method for the +
operator
impl<'a, 'b> Add<&'a Commitment> for &'a Commitment
[src]
type Output = Commitment
The resulting type after applying the +
operator
fn add(self, other: &'a Commitment) -> Self::Output
The method for the +
operator
impl Mul<Mpz> for Commitment
[src]
type Output = Commitment
The resulting type after applying the *
operator
fn mul(self, other: Mpz) -> Self::Output
The method for the *
operator
impl<'a> Mul<&'a Mpz> for Commitment
[src]
type Output = Commitment
The resulting type after applying the *
operator
fn mul(self, other: &'a Mpz) -> Self::Output
The method for the *
operator
impl<'a> Mul<Mpz> for &'a Commitment
[src]
type Output = Commitment
The resulting type after applying the *
operator
fn mul(self, other: Mpz) -> Self::Output
The method for the *
operator
impl<'a, 'b> Mul<&'a Mpz> for &'a Commitment
[src]
type Output = Commitment
The resulting type after applying the *
operator
fn mul(self, other: &'a Mpz) -> Self::Output
The method for the *
operator
impl PartialEq for Commitment
[src]
fn eq(&self, other: &Commitment) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.