pub struct PedersenCommitment(/* private fields */);
Expand description
Pedersen commitment type.
Implementations§
Source§impl PedersenCommitment
impl PedersenCommitment
pub fn new(point: RistrettoPoint) -> Self
pub fn get_point(&self) -> &RistrettoPoint
pub fn to_bytes(&self) -> [u8; 32]
pub fn from_bytes(bytes: &[u8]) -> Option<PedersenCommitment>
Trait Implementations§
Source§impl<'a, 'b> Add<&'b PedersenCommitment> for &'a PedersenCommitment
impl<'a, 'b> Add<&'b PedersenCommitment> for &'a PedersenCommitment
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
+
operator.Source§fn add(self, commitment: &'b PedersenCommitment) -> PedersenCommitment
fn add(self, commitment: &'b PedersenCommitment) -> PedersenCommitment
Performs the
+
operation. Read moreSource§impl<'b> Add<&'b PedersenCommitment> for PedersenCommitment
impl<'b> Add<&'b PedersenCommitment> for PedersenCommitment
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
+
operator.Source§fn add(self, rhs: &'b PedersenCommitment) -> PedersenCommitment
fn add(self, rhs: &'b PedersenCommitment) -> PedersenCommitment
Performs the
+
operation. Read moreSource§impl<'a> Add<PedersenCommitment> for &'a PedersenCommitment
impl<'a> Add<PedersenCommitment> for &'a PedersenCommitment
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
+
operator.Source§fn add(self, rhs: PedersenCommitment) -> PedersenCommitment
fn add(self, rhs: PedersenCommitment) -> PedersenCommitment
Performs the
+
operation. Read moreSource§impl Add for PedersenCommitment
impl Add for PedersenCommitment
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
+
operator.Source§fn add(self, rhs: PedersenCommitment) -> PedersenCommitment
fn add(self, rhs: PedersenCommitment) -> PedersenCommitment
Performs the
+
operation. Read moreSource§impl Clone for PedersenCommitment
impl Clone for PedersenCommitment
Source§fn clone(&self) -> PedersenCommitment
fn clone(&self) -> PedersenCommitment
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 Debug for PedersenCommitment
impl Debug for PedersenCommitment
Source§impl Default for PedersenCommitment
impl Default for PedersenCommitment
Source§fn default() -> PedersenCommitment
fn default() -> PedersenCommitment
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PedersenCommitment
impl<'de> Deserialize<'de> for PedersenCommitment
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<PedersenCommitment> for PedersenCommitment
impl From<PedersenCommitment> for PedersenCommitment
Source§fn from(decoded_commitment: PedersenCommitment) -> Self
fn from(decoded_commitment: PedersenCommitment) -> Self
Converts to this type from the input type.
Source§impl<'a, 'b> Mul<&'b PedersenCommitment> for &'a Scalar
impl<'a, 'b> Mul<&'b PedersenCommitment> for &'a Scalar
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.Source§fn mul(self, commitment: &'b PedersenCommitment) -> PedersenCommitment
fn mul(self, commitment: &'b PedersenCommitment) -> PedersenCommitment
Performs the
*
operation. Read moreSource§impl<'b> Mul<&'b PedersenCommitment> for Scalar
impl<'b> Mul<&'b PedersenCommitment> for Scalar
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.Source§fn mul(self, rhs: &'b PedersenCommitment) -> PedersenCommitment
fn mul(self, rhs: &'b PedersenCommitment) -> PedersenCommitment
Performs the
*
operation. Read moreSource§impl<'a, 'b> Mul<&'b Scalar> for &'a PedersenCommitment
impl<'a, 'b> Mul<&'b Scalar> for &'a PedersenCommitment
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.Source§impl<'b> Mul<&'b Scalar> for PedersenCommitment
impl<'b> Mul<&'b Scalar> for PedersenCommitment
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.Source§impl<'a> Mul<PedersenCommitment> for &'a Scalar
impl<'a> Mul<PedersenCommitment> for &'a Scalar
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.Source§fn mul(self, rhs: PedersenCommitment) -> PedersenCommitment
fn mul(self, rhs: PedersenCommitment) -> PedersenCommitment
Performs the
*
operation. Read moreSource§impl Mul<PedersenCommitment> for Scalar
impl Mul<PedersenCommitment> for Scalar
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.Source§fn mul(self, rhs: PedersenCommitment) -> PedersenCommitment
fn mul(self, rhs: PedersenCommitment) -> PedersenCommitment
Performs the
*
operation. Read moreSource§impl<'a> Mul<Scalar> for &'a PedersenCommitment
impl<'a> Mul<Scalar> for &'a PedersenCommitment
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.Source§impl Mul<Scalar> for PedersenCommitment
impl Mul<Scalar> for PedersenCommitment
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.Source§impl PartialEq for PedersenCommitment
impl PartialEq for PedersenCommitment
Source§impl Serialize for PedersenCommitment
impl Serialize for PedersenCommitment
Source§impl<'a, 'b> Sub<&'b PedersenCommitment> for &'a PedersenCommitment
impl<'a, 'b> Sub<&'b PedersenCommitment> for &'a PedersenCommitment
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
-
operator.Source§fn sub(self, commitment: &'b PedersenCommitment) -> PedersenCommitment
fn sub(self, commitment: &'b PedersenCommitment) -> PedersenCommitment
Performs the
-
operation. Read moreSource§impl<'b> Sub<&'b PedersenCommitment> for PedersenCommitment
impl<'b> Sub<&'b PedersenCommitment> for PedersenCommitment
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
-
operator.Source§fn sub(self, rhs: &'b PedersenCommitment) -> PedersenCommitment
fn sub(self, rhs: &'b PedersenCommitment) -> PedersenCommitment
Performs the
-
operation. Read moreSource§impl<'a> Sub<PedersenCommitment> for &'a PedersenCommitment
impl<'a> Sub<PedersenCommitment> for &'a PedersenCommitment
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
-
operator.Source§fn sub(self, rhs: PedersenCommitment) -> PedersenCommitment
fn sub(self, rhs: PedersenCommitment) -> PedersenCommitment
Performs the
-
operation. Read moreSource§impl Sub for PedersenCommitment
impl Sub for PedersenCommitment
Source§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
-
operator.Source§fn sub(self, rhs: PedersenCommitment) -> PedersenCommitment
fn sub(self, rhs: PedersenCommitment) -> PedersenCommitment
Performs the
-
operation. Read moreSource§impl TryFrom<PedersenCommitment> for PedersenCommitment
impl TryFrom<PedersenCommitment> for PedersenCommitment
Source§type Error = ElGamalError
type Error = ElGamalError
The type returned in the event of a conversion error.
impl Copy for PedersenCommitment
impl Eq for PedersenCommitment
impl StructuralPartialEq for PedersenCommitment
Auto Trait Implementations§
impl Freeze for PedersenCommitment
impl RefUnwindSafe for PedersenCommitment
impl Send for PedersenCommitment
impl Sync for PedersenCommitment
impl Unpin for PedersenCommitment
impl UnwindSafe for PedersenCommitment
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more