pub struct Commitment(/* private fields */);
Expand description
The type for creating commitments to messages that are hidden during issuance.
Implementations§
Source§impl Commitment
impl Commitment
Sourcepub fn new<B: AsRef<[G1]>, S: AsRef<[Fr]>>(bases: B, scalars: S) -> Self
pub fn new<B: AsRef<[G1]>, S: AsRef<[Fr]>>(bases: B, scalars: S) -> Self
Compute a new commitment from multiple points and scalars
Sourcepub fn to_bytes_compressed_form(&self) -> [u8; 48]
pub fn to_bytes_compressed_form(&self) -> [u8; 48]
Convert to raw bytes compressed form
Sourcepub fn to_bytes_uncompressed_form(&self) -> [u8; 96]
pub fn to_bytes_uncompressed_form(&self) -> [u8; 96]
Convert to raw bytes uncompressed form
Trait Implementations§
Source§impl AsRef<G1> for Commitment
impl AsRef<G1> for Commitment
Source§impl Clone for Commitment
impl Clone for Commitment
Source§fn clone(&self) -> Commitment
fn clone(&self) -> Commitment
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 Commitment
impl Debug for Commitment
Source§impl Default for Commitment
impl Default for Commitment
Source§impl<'a> Deserialize<'a> for Commitment
impl<'a> Deserialize<'a> for Commitment
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Commitment
impl Display for Commitment
Source§impl From<&G1> for Commitment
impl From<&G1> for Commitment
Source§impl From<G1> for Commitment
impl From<G1> for Commitment
Source§impl HashElem for Commitment
impl HashElem for Commitment
Source§impl PartialEq for Commitment
impl PartialEq for Commitment
Source§impl Serialize for Commitment
impl Serialize for Commitment
Source§impl TryFrom<&[u8]> for Commitment
impl TryFrom<&[u8]> for Commitment
impl Copy for Commitment
impl Eq for Commitment
impl StructuralPartialEq for Commitment
Auto Trait Implementations§
impl Freeze for Commitment
impl RefUnwindSafe for Commitment
impl Send for Commitment
impl Sync for Commitment
impl Unpin for Commitment
impl UnwindSafe for Commitment
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<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