pub struct SecureMultisetHash { /* private fields */ }Expand description
The SecureMultisetHash structure maintains a running elliptic curve hash.
Implementations§
Source§impl SecureMultisetHash
impl SecureMultisetHash
Sourcepub fn remove(&mut self, element: &[u8])
pub fn remove(&mut self, element: &[u8])
Removes an element (provided as a byte slice) from the multiset hash.
This is done by adding the inverse (negation) of H(element).
Sourcepub fn add_elements<'a, T>(&mut self, elements: &'a [T])
pub fn add_elements<'a, T>(&mut self, elements: &'a [T])
Adds multiple elements in parallel.
Sourcepub fn remove_elements<'a, T>(&mut self, elements: &'a [T])
pub fn remove_elements<'a, T>(&mut self, elements: &'a [T])
Removes multiple elements in parallel.
pub fn get_compressed(&self) -> Option<[u8; 33]>
pub fn get_digest(&self) -> Option<[u8; 32]>
Auto Trait Implementations§
impl Freeze for SecureMultisetHash
impl RefUnwindSafe for SecureMultisetHash
impl Send for SecureMultisetHash
impl Sync for SecureMultisetHash
impl Unpin for SecureMultisetHash
impl UnwindSafe for SecureMultisetHash
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> 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