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> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, _digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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