pub struct HashLock(_);
Expand description
HTLC payment hash
Trait Implementations
sourceimpl From<HashPreimage> for HashLock
impl From<HashPreimage> for HashLock
sourcefn from(preimage: HashPreimage) -> HashLock
fn from(preimage: HashPreimage) -> HashLock
Converts to this type from the input type.
sourceimpl FromHex for HashLock
impl FromHex for HashLock
sourcefn from_byte_iter<I>(iter: I) -> Result<HashLock, Error> where
I: Iterator<Item = Result<u8, Error>> + ExactSizeIterator + DoubleEndedIterator,
fn from_byte_iter<I>(iter: I) -> Result<HashLock, Error> where
I: Iterator<Item = Result<u8, Error>> + ExactSizeIterator + DoubleEndedIterator,
Produce an object from a byte iterator
sourceimpl Ord for HashLock
impl Ord for HashLock
sourceimpl PartialOrd<HashLock> for HashLock
impl PartialOrd<HashLock> for HashLock
sourcefn partial_cmp(&self, other: &HashLock) -> Option<Ordering>
fn partial_cmp(&self, other: &HashLock) -> 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 StrictDecode for HashLock
impl StrictDecode for HashLock
sourcefn strict_decode<D>(d: D) -> Result<HashLock, Error> where
D: Read,
fn strict_decode<D>(d: D) -> Result<HashLock, Error> where
D: Read,
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 HashLock
impl StrictEncode for HashLock
sourcefn strict_encode<E>(&self, e: E) -> Result<usize, Error> where
E: Write,
fn strict_encode<E>(&self, e: E) -> Result<usize, Error> where
E: Write,
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 HashLock
impl Wrapper for HashLock
sourcefn from_inner(inner: <HashLock as Wrapper>::Inner) -> HashLock
fn from_inner(inner: <HashLock as Wrapper>::Inner) -> HashLock
Instantiates wrapper type with the inner data
sourcefn as_inner(&self) -> &<HashLock as Wrapper>::Inner
fn as_inner(&self) -> &<HashLock as Wrapper>::Inner
Returns reference to the inner representation for the wrapper type
sourcefn as_inner_mut(&mut self) -> &mut <HashLock as Wrapper>::Inner
fn as_inner_mut(&mut self) -> &mut <HashLock as Wrapper>::Inner
Returns a mutable reference to the inner representation for the wrapper type Read more
sourcefn into_inner(self) -> <HashLock as Wrapper>::Inner
fn into_inner(self) -> <HashLock as Wrapper>::Inner
Unwraps the wrapper returning the inner type
impl Copy for HashLock
impl Eq for HashLock
impl StructuralEq for HashLock
impl StructuralPartialEq for HashLock
Auto Trait Implementations
impl RefUnwindSafe for HashLock
impl Send for HashLock
impl Sync for HashLock
impl Unpin for HashLock
impl UnwindSafe for HashLock
Blanket Implementations
impl<T> Base32Len for T where
T: AsRef<[u8]>,
impl<T> Base32Len for T where
T: AsRef<[u8]>,
fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
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
impl<T> ToHex for T where
T: LowerHex,
impl<T> ToHex for T where
T: LowerHex,
impl<T> ToHex for T where
T: LowerHex,
impl<T> ToHex for T where
T: LowerHex,
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