[−][src]Struct secp256k1zkp::pedersen::Commitment
A Pedersen commitment
Methods
impl Commitment
[src]
pub fn as_ptr(&self) -> *const u8
[src]
Converts the object to a raw pointer for FFI interfacing
pub fn as_mut_ptr(&mut self) -> *mut u8
[src]
Converts the object to a mutable raw pointer for FFI interfacing
pub fn len(&self) -> usize
[src]
Returns the length of the object as an array
pub fn is_empty(&self) -> bool
[src]
Returns whether the object as an array is empty
impl Commitment
[src]
pub fn from_vec(v: Vec<u8>) -> Commitment
[src]
Builds a Hash from a byte vector. If the vector is too short, it will be completed by zeroes. If it's too long, it will be truncated.
pub fn to_pubkey(&self, secp: &Secp256k1) -> Result<PublicKey, Error>
[src]
Converts a commitment to a public key
Trait Implementations
impl AsRef<[u8]> for Commitment
[src]
impl Eq for Commitment
[src]
impl PartialEq<Commitment> for Commitment
[src]
fn eq(&self, other: &Commitment) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Clone for Commitment
[src]
fn clone(&self) -> Commitment
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Commitment
[src]
impl Debug for Commitment
[src]
impl Index<usize> for Commitment
[src]
impl Index<Range<usize>> for Commitment
[src]
type Output = [u8]
The returned type after indexing.
fn index(&self, index: Range<usize>) -> &[u8]
[src]
impl Index<RangeTo<usize>> for Commitment
[src]
type Output = [u8]
The returned type after indexing.
fn index(&self, index: RangeTo<usize>) -> &[u8]
[src]
impl Index<RangeFrom<usize>> for Commitment
[src]
type Output = [u8]
The returned type after indexing.
fn index(&self, index: RangeFrom<usize>) -> &[u8]
[src]
impl Index<RangeFull> for Commitment
[src]
impl Hash for Commitment
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Encodable for Commitment
[src]
impl Decodable for Commitment
[src]
impl Serialize for Commitment
[src]
impl<'de> Deserialize<'de> for Commitment
[src]
fn deserialize<D>(d: D) -> Result<Commitment, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Auto Trait Implementations
impl Send for Commitment
impl Sync for Commitment
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,