Struct commit_verify::lnpbp4::CommitmentHash
source · [−]pub struct CommitmentHash(_);Expand description
Final LNPBP-4 commitment value.
Represents tagged hash (with Lnpbp4Tag) of the merkle root of
MerkleTree and MerkleBlock.
Trait Implementations
sourceimpl AsMut<<CommitmentHash as Wrapper>::Inner> for CommitmentHash
impl AsMut<<CommitmentHash as Wrapper>::Inner> for CommitmentHash
sourceimpl AsRef<<CommitmentHash as Wrapper>::Inner> for CommitmentHash
impl AsRef<<CommitmentHash as Wrapper>::Inner> for CommitmentHash
sourceimpl Borrow<<CommitmentHash as Wrapper>::Inner> for CommitmentHash
impl Borrow<<CommitmentHash as Wrapper>::Inner> for CommitmentHash
sourceimpl BorrowMut<<CommitmentHash as Wrapper>::Inner> for CommitmentHash
impl BorrowMut<<CommitmentHash as Wrapper>::Inner> for CommitmentHash
sourcefn borrow_mut(&mut self) -> &mut <Self as Wrapper>::Inner
fn borrow_mut(&mut self) -> &mut <Self as Wrapper>::Inner
Mutably borrows from an owned value. Read more
sourceimpl Clone for CommitmentHash
impl Clone for CommitmentHash
sourcefn clone(&self) -> CommitmentHash
fn clone(&self) -> CommitmentHash
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<M> CommitVerify<M, PrehashedProtocol> for CommitmentHash where
M: AsRef<[u8]>,
impl<M> CommitVerify<M, PrehashedProtocol> for CommitmentHash where
M: AsRef<[u8]>,
sourceimpl Debug for CommitmentHash
impl Debug for CommitmentHash
sourceimpl Default for CommitmentHash
impl Default for CommitmentHash
sourcefn default() -> CommitmentHash
fn default() -> CommitmentHash
Returns the “default value” for a type. Read more
sourceimpl Deref for CommitmentHash
impl Deref for CommitmentHash
sourceimpl DerefMut for CommitmentHash
impl DerefMut for CommitmentHash
sourceimpl<'de> Deserialize<'de> for CommitmentHash
impl<'de> Deserialize<'de> for CommitmentHash
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 CommitmentHash
impl Display for CommitmentHash
sourceimpl From<CommitmentHash> for Hash<Lnpbp4Tag>
impl From<CommitmentHash> for Hash<Lnpbp4Tag>
sourcefn from(wrapped: CommitmentHash) -> Self
fn from(wrapped: CommitmentHash) -> Self
Converts to this type from the input type.
sourceimpl From<Hash<Lnpbp4Tag>> for CommitmentHash
impl From<Hash<Lnpbp4Tag>> for CommitmentHash
sourceimpl Hash for CommitmentHash
impl Hash for CommitmentHash
sourceimpl Index<Range<usize>> for CommitmentHash
impl Index<Range<usize>> for CommitmentHash
sourceimpl Index<RangeFrom<usize>> for CommitmentHash
impl Index<RangeFrom<usize>> for CommitmentHash
sourceimpl Index<RangeFull> for CommitmentHash
impl Index<RangeFull> for CommitmentHash
sourceimpl Index<RangeTo<usize>> for CommitmentHash
impl Index<RangeTo<usize>> for CommitmentHash
sourceimpl Index<usize> for CommitmentHash
impl Index<usize> for CommitmentHash
sourceimpl LowerHex for CommitmentHash
impl LowerHex for CommitmentHash
sourceimpl Ord for CommitmentHash
impl Ord for CommitmentHash
sourceimpl PartialEq<CommitmentHash> for CommitmentHash
impl PartialEq<CommitmentHash> for CommitmentHash
sourcefn eq(&self, other: &CommitmentHash) -> bool
fn eq(&self, other: &CommitmentHash) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &CommitmentHash) -> bool
fn ne(&self, other: &CommitmentHash) -> bool
This method tests for !=.
sourceimpl PartialOrd<CommitmentHash> for CommitmentHash
impl PartialOrd<CommitmentHash> for CommitmentHash
sourcefn partial_cmp(&self, other: &CommitmentHash) -> Option<Ordering>
fn partial_cmp(&self, other: &CommitmentHash) -> 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 CommitmentHash
impl Serialize for CommitmentHash
sourceimpl Strategy for CommitmentHash
impl Strategy for CommitmentHash
type Strategy = UsingStrict
type Strategy = UsingStrict
Specific strategy. List of supported strategies: Read more
sourceimpl StrictDecode for CommitmentHash
impl StrictDecode for CommitmentHash
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 CommitmentHash
impl StrictEncode for CommitmentHash
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 Wrapper for CommitmentHash
impl Wrapper for CommitmentHash
sourcefn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Instantiates wrapper type with the inner data
sourcefn as_inner(&self) -> &Self::Inner
fn as_inner(&self) -> &Self::Inner
Returns reference to the inner representation for the wrapper type
sourcefn as_inner_mut(&mut self) -> &mut Self::Inner
fn as_inner_mut(&mut self) -> &mut Self::Inner
Returns a mutable reference to the inner representation for the wrapper type Read more
sourcefn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Unwraps the wrapper returning the inner type
impl Copy for CommitmentHash
impl Eq for CommitmentHash
impl StructuralEq for CommitmentHash
impl StructuralPartialEq for CommitmentHash
Auto Trait Implementations
impl RefUnwindSafe for CommitmentHash
impl Send for CommitmentHash
impl Sync for CommitmentHash
impl Unpin for CommitmentHash
impl UnwindSafe for CommitmentHash
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<'a, U, T> TaggedHash<'a, T> for U where
U: Wrapper<Inner = Hash<T>>,
T: 'a + Tag,
impl<'a, U, T> TaggedHash<'a, T> for U where
U: Wrapper<Inner = Hash<T>>,
T: 'a + Tag,
sourcefn hash(msg: impl AsRef<[u8]>) -> Self where
Self: Sized,
fn hash(msg: impl AsRef<[u8]>) -> Self where
Self: Sized,
Constructs tagged hash out of a given message data
sourcefn from_hash<X>(hash: X) -> Self where
Self: Sized,
X: Hash<Inner = [u8; 32]>,
fn from_hash<X>(hash: X) -> Self where
Self: Sized,
X: Hash<Inner = [u8; 32]>,
Constructs tagged hash out of other hash type. Read more
sourcefn from_slice(slice: &[u8]) -> Result<Self, Error> where
Self: Sized,
fn from_slice(slice: &[u8]) -> Result<Self, Error> where
Self: Sized,
Constructs tagged hash from byte slice. If slice length is not equal to
32 bytes, fails with Error::InvalidLength (this is just a
wrapper for sha256t::Hash::from_slice). Read more
sourcefn as_slice(&'a self) -> &'a [u8; 32]
fn as_slice(&'a self) -> &'a [u8; 32]
Returns a reference to 32-byte slice array representing internal hash data Read more