pub struct MultiSource {
pub min_depth: u5,
pub messages: Confined<BTreeMap<ProtocolId, Message>, amplify::::collection::confinement::MediumOrdMap::{constant#0}, amplify::::collection::confinement::MediumOrdMap::{constant#1}>,
pub static_entropy: Option<u64>,
}Expand description
Structured source multi-message data for commitment creation
Fields§
§min_depth: u5Minimal depth of the created LNPBP-4 commitment tree
messages: Confined<BTreeMap<ProtocolId, Message>, amplify::::collection::confinement::MediumOrdMap::{constant#0}, amplify::::collection::confinement::MediumOrdMap::{constant#1}>Map of the messages by their respective protocol ids
static_entropy: Option<u64>Implementations§
Source§impl MultiSource
impl MultiSource
pub fn with_static_entropy(static_entropy: u64) -> MultiSource
Trait Implementations§
Source§impl Clone for MultiSource
impl Clone for MultiSource
Source§fn clone(&self) -> MultiSource
fn clone(&self) -> MultiSource
Returns a duplicate 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 MultiSource
impl Debug for MultiSource
Source§impl Default for MultiSource
impl Default for MultiSource
Source§fn default() -> MultiSource
fn default() -> MultiSource
Returns the “default value” for a type. Read more
Source§impl Hash for MultiSource
impl Hash for MultiSource
Source§impl Ord for MultiSource
impl Ord for MultiSource
Source§fn cmp(&self, other: &MultiSource) -> Ordering
fn cmp(&self, other: &MultiSource) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MultiSource
impl PartialEq for MultiSource
Source§impl PartialOrd for MultiSource
impl PartialOrd for MultiSource
Source§impl TryCommitVerify<MultiSource, UntaggedProtocol> for MerkleTree
§Panics
Panics if the crate is compiled without rand feature enabled and the
MultiSource doesn’t contain a static entropy.
impl TryCommitVerify<MultiSource, UntaggedProtocol> for MerkleTree
§Panics
Panics if the crate is compiled without rand feature enabled and the
MultiSource doesn’t contain a static entropy.
Source§type Error = Error
type Error = Error
Error type that may be reported during
TryCommitVerify::try_commit.Source§fn try_commit(source: &MultiSource) -> Result<MerkleTree, Error>
fn try_commit(source: &MultiSource) -> Result<MerkleTree, Error>
Tries to create commitment to a byte representation of a given message.
impl Eq for MultiSource
impl StructuralPartialEq for MultiSource
Auto Trait Implementations§
impl Freeze for MultiSource
impl RefUnwindSafe for MultiSource
impl Send for MultiSource
impl Sync for MultiSource
impl Unpin for MultiSource
impl UnwindSafe for MultiSource
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.