Struct commit_verify::multi_commit::MultiCommitItem
source · [−]pub struct MultiCommitItem {
pub protocol: Option<ProtocolId>,
pub message: Message,
}
Expand description
Single item within a multi-message commitment, consisting of optional protocol information (if known) and the actual single message commitment
Fields
protocol: Option<ProtocolId>
Protocol identifier, which may be hidden or absent for commitment placeholders
message: Message
Message commitment (LNPBP-4 tagged hash of the message)
Implementations
sourceimpl MultiCommitItem
impl MultiCommitItem
sourcepub fn new(protocol: ProtocolId, message: Message) -> Self
pub fn new(protocol: ProtocolId, message: Message) -> Self
Constructs multi-message commitment item for a given protocol
Trait Implementations
sourceimpl Clone for MultiCommitItem
impl Clone for MultiCommitItem
sourcefn clone(&self) -> MultiCommitItem
fn clone(&self) -> MultiCommitItem
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 Debug for MultiCommitItem
impl Debug for MultiCommitItem
sourceimpl<'de> Deserialize<'de> for MultiCommitItem
impl<'de> Deserialize<'de> for MultiCommitItem
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 Display for MultiCommitItem
impl Display for MultiCommitItem
sourceimpl Hash for MultiCommitItem
impl Hash for MultiCommitItem
sourceimpl Ord for MultiCommitItem
impl Ord for MultiCommitItem
sourceimpl PartialEq<MultiCommitItem> for MultiCommitItem
impl PartialEq<MultiCommitItem> for MultiCommitItem
sourcefn eq(&self, other: &MultiCommitItem) -> bool
fn eq(&self, other: &MultiCommitItem) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MultiCommitItem) -> bool
fn ne(&self, other: &MultiCommitItem) -> bool
This method tests for !=
.
sourceimpl PartialOrd<MultiCommitItem> for MultiCommitItem
impl PartialOrd<MultiCommitItem> for MultiCommitItem
sourcefn partial_cmp(&self, other: &MultiCommitItem) -> Option<Ordering>
fn partial_cmp(&self, other: &MultiCommitItem) -> 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 MultiCommitItem
impl Serialize for MultiCommitItem
sourceimpl StrictDecode for MultiCommitItem
impl StrictDecode for MultiCommitItem
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 MultiCommitItem
impl StrictEncode for MultiCommitItem
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
impl Copy for MultiCommitItem
impl Eq for MultiCommitItem
impl StructuralEq for MultiCommitItem
impl StructuralPartialEq for MultiCommitItem
Auto Trait Implementations
impl RefUnwindSafe for MultiCommitItem
impl Send for MultiCommitItem
impl Sync for MultiCommitItem
impl Unpin for MultiCommitItem
impl UnwindSafe for MultiCommitItem
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