Struct bitcoin_scripts::hlc::HashPreimage
source · pub struct HashPreimage(_);
Expand description
HTLC payment preimage
Trait Implementations§
source§impl AsMut<<HashPreimage as Wrapper>::Inner> for HashPreimage
impl AsMut<<HashPreimage as Wrapper>::Inner> for HashPreimage
source§impl AsRef<<HashPreimage as Wrapper>::Inner> for HashPreimage
impl AsRef<<HashPreimage as Wrapper>::Inner> for HashPreimage
source§impl AsRef<[u8]> for HashPreimage
impl AsRef<[u8]> for HashPreimage
source§impl Borrow<<HashPreimage as Wrapper>::Inner> for HashPreimage
impl Borrow<<HashPreimage as Wrapper>::Inner> for HashPreimage
source§impl Borrow<[u8]> for HashPreimage
impl Borrow<[u8]> for HashPreimage
source§impl BorrowMut<<HashPreimage as Wrapper>::Inner> for HashPreimage
impl BorrowMut<<HashPreimage as Wrapper>::Inner> for HashPreimage
source§impl Clone for HashPreimage
impl Clone for HashPreimage
source§fn clone(&self) -> HashPreimage
fn clone(&self) -> HashPreimage
Returns a copy 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 HashPreimage
impl Debug for HashPreimage
source§impl Deref for HashPreimage
impl Deref for HashPreimage
source§impl DerefMut for HashPreimage
impl DerefMut for HashPreimage
source§impl Display for HashPreimage
impl Display for HashPreimage
source§impl DumbDefault for HashPreimage
impl DumbDefault for HashPreimage
source§fn dumb_default() -> Self
fn dumb_default() -> Self
Returns an object initialized with dumb data
source§impl From<HashPreimage> for HashLock
impl From<HashPreimage> for HashLock
source§fn from(preimage: HashPreimage) -> Self
fn from(preimage: HashPreimage) -> Self
Converts to this type from the input type.
source§impl From<HashPreimage> for Slice32
impl From<HashPreimage> for Slice32
source§fn from(wrapped: HashPreimage) -> Self
fn from(wrapped: HashPreimage) -> Self
Converts to this type from the input type.
source§impl From<Slice32> for HashPreimage
impl From<Slice32> for HashPreimage
source§impl FromHex for HashPreimage
impl FromHex for HashPreimage
source§fn from_byte_iter<I>(iter: I) -> Result<Self, Error>where
I: Iterator<Item = Result<u8, Error>> + ExactSizeIterator + DoubleEndedIterator,
fn from_byte_iter<I>(iter: I) -> Result<Self, Error>where
I: Iterator<Item = Result<u8, Error>> + ExactSizeIterator + DoubleEndedIterator,
Produce an object from a byte iterator
source§impl FromStr for HashPreimage
impl FromStr for HashPreimage
source§impl Hash for HashPreimage
impl Hash for HashPreimage
source§impl LowerHex for HashPreimage
impl LowerHex for HashPreimage
source§impl Ord for HashPreimage
impl Ord for HashPreimage
source§fn cmp(&self, other: &HashPreimage) -> Ordering
fn cmp(&self, other: &HashPreimage) -> 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<HashPreimage> for HashPreimage
impl PartialEq<HashPreimage> for HashPreimage
source§fn eq(&self, other: &HashPreimage) -> bool
fn eq(&self, other: &HashPreimage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<HashPreimage> for HashPreimage
impl PartialOrd<HashPreimage> for HashPreimage
source§fn partial_cmp(&self, other: &HashPreimage) -> Option<Ordering>
fn partial_cmp(&self, other: &HashPreimage) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl StrictDecode for HashPreimage
impl StrictDecode for HashPreimage
source§fn 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.source§fn 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
. If there are some data remains in the
buffer once deserialization is completed, fails with
Error::DataNotEntirelyConsumed
. Use io::Cursor
over the buffer and
StrictDecode::strict_decode
to avoid such failures.source§fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
Reads data from file at
path
and reconstructs object from it. Fails
with Error::DataNotEntirelyConsumed
if file contains remaining
data after the object reconstruction.source§impl StrictEncode for HashPreimage
impl StrictEncode for HashPreimage
source§fn 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.source§fn 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
functionsource§impl UpperHex for HashPreimage
impl UpperHex for HashPreimage
source§impl Wrapper for HashPreimage
impl Wrapper for HashPreimage
source§fn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Instantiates wrapper type with the inner data
source§fn as_inner(&self) -> &Self::Inner
fn as_inner(&self) -> &Self::Inner
Returns reference to the inner representation for the wrapper type
source§fn 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
source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Unwraps the wrapper returning the inner type
impl Copy for HashPreimage
impl Eq for HashPreimage
impl StructuralEq for HashPreimage
impl StructuralPartialEq for HashPreimage
Auto Trait Implementations§
impl RefUnwindSafe for HashPreimage
impl Send for HashPreimage
impl Sync for HashPreimage
impl Unpin for HashPreimage
impl UnwindSafe for HashPreimage
Blanket Implementations§
§impl<T> Base32Len for Twhere
T: AsRef<[u8]>,
impl<T> Base32Len for Twhere
T: AsRef<[u8]>,
§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length