Struct commit_verify::multi_commit::MultiCommitBlock
source · [−]pub struct MultiCommitBlock {
pub commitments: Vec<MultiCommitItem>,
pub entropy: Option<u64>,
}Expand description
Multi-message commitment data according to LNPBP-4 specification.
To create commitment use TryCommitVerify::try_commit method.
Fields
commitments: Vec<MultiCommitItem>Array of commitment items (see MultiCommitItem)
entropy: Option<u64>Entropy used for placeholders. May be unknown if the message is not
constructed via TryCommitVerify::try_commit method but is provided
by a third-party, whishing to conceal that information.
Trait Implementations
sourceimpl Clone for MultiCommitBlock
impl Clone for MultiCommitBlock
sourcefn clone(&self) -> MultiCommitBlock
fn clone(&self) -> MultiCommitBlock
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl CommitEncode for MultiCommitBlock
impl CommitEncode for MultiCommitBlock
sourceimpl ConsensusCommit for MultiCommitBlock
impl ConsensusCommit for MultiCommitBlock
type Commitment = MultiCommitment
type Commitment = MultiCommitment
Type of the resulting commitment
sourcefn consensus_commit(&self) -> Self::Commitment
fn consensus_commit(&self) -> Self::Commitment
Performs commitment to client-side-validated data
sourcefn consensus_verify(&self, commitment: &Self::Commitment) -> bool
fn consensus_verify(&self, commitment: &Self::Commitment) -> bool
Verifies commitment to client-side-validated data
sourceimpl Debug for MultiCommitBlock
impl Debug for MultiCommitBlock
sourceimpl Default for MultiCommitBlock
impl Default for MultiCommitBlock
sourcefn default() -> MultiCommitBlock
fn default() -> MultiCommitBlock
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for MultiCommitBlock
impl<'de> Deserialize<'de> for MultiCommitBlock
sourcefn 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
sourceimpl Hash for MultiCommitBlock
impl Hash for MultiCommitBlock
sourceimpl Ord for MultiCommitBlock
impl Ord for MultiCommitBlock
sourceimpl PartialEq<MultiCommitBlock> for MultiCommitBlock
impl PartialEq<MultiCommitBlock> for MultiCommitBlock
sourcefn eq(&self, other: &MultiCommitBlock) -> bool
fn eq(&self, other: &MultiCommitBlock) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &MultiCommitBlock) -> bool
fn ne(&self, other: &MultiCommitBlock) -> bool
This method tests for !=.
sourceimpl PartialOrd<MultiCommitBlock> for MultiCommitBlock
impl PartialOrd<MultiCommitBlock> for MultiCommitBlock
sourcefn partial_cmp(&self, other: &MultiCommitBlock) -> Option<Ordering>
fn partial_cmp(&self, other: &MultiCommitBlock) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl Serialize for MultiCommitBlock
impl Serialize for MultiCommitBlock
sourceimpl StrictDecode for MultiCommitBlock
impl StrictDecode for MultiCommitBlock
sourcefn strict_decode<D: Read>(d: D) -> Result<Self, Error>
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
Decode with the given std::io::Read instance; must either
construct an instance or return implementation-specific error type. Read more
sourcefn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode Read more
sourceimpl StrictEncode for MultiCommitBlock
impl StrictEncode for MultiCommitBlock
sourcefn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
Encode with the given std::io::Write instance; must return result
with either amount of bytes encoded – or implementation-specific
error type. Read more
sourcefn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
fn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
Serializes data as a byte array using StrictEncode::strict_encode
function Read more
sourceimpl TryCommitVerify<MultiSource, UntaggedProtocol> for MultiCommitBlock
impl TryCommitVerify<MultiSource, UntaggedProtocol> for MultiCommitBlock
type Error = Error
type Error = Error
Error type that may be reported during TryCommitVerify::try_commit
and TryCommitVerify::try_verify procedures Read more
sourcefn try_commit(source: &MultiSource) -> Result<Self, Error>
fn try_commit(source: &MultiSource) -> Result<Self, Error>
Tries to create commitment to a byte representation of a given message
impl Eq for MultiCommitBlock
impl StructuralEq for MultiCommitBlock
impl StructuralPartialEq for MultiCommitBlock
Auto Trait Implementations
impl RefUnwindSafe for MultiCommitBlock
impl Send for MultiCommitBlock
impl Sync for MultiCommitBlock
impl Unpin for MultiCommitBlock
impl UnwindSafe for MultiCommitBlock
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more