Struct lightning_types::payment::PaymentHash
source · pub struct PaymentHash(pub [u8; 32]);
Expand description
The payment hash is the hash of the PaymentPreimage
which is the value used to lock funds
in HTLCs while they transit the lightning network.
This is not exported to bindings users as we just use [u8; 32] directly
Tuple Fields§
§0: [u8; 32]
Trait Implementations§
source§impl Borrow<[u8]> for PaymentHash
impl Borrow<[u8]> for PaymentHash
source§impl Clone for PaymentHash
impl Clone for PaymentHash
source§fn clone(&self) -> PaymentHash
fn clone(&self) -> PaymentHash
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 PaymentHash
impl Debug for PaymentHash
source§impl Display for PaymentHash
impl Display for PaymentHash
source§impl From<PaymentPreimage> for PaymentHash
impl From<PaymentPreimage> for PaymentHash
Converts a PaymentPreimage
into a PaymentHash
by hashing the preimage with SHA256.
source§fn from(value: PaymentPreimage) -> Self
fn from(value: PaymentPreimage) -> Self
Converts to this type from the input type.
source§impl Hash for PaymentHash
impl Hash for PaymentHash
source§impl LowerHex for PaymentHash
impl LowerHex for PaymentHash
source§impl Ord for PaymentHash
impl Ord for PaymentHash
source§fn cmp(&self, other: &PaymentHash) -> Ordering
fn cmp(&self, other: &PaymentHash) -> 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 for PaymentHash
impl PartialEq for PaymentHash
source§impl PartialOrd for PaymentHash
impl PartialOrd for PaymentHash
source§impl UpperHex for PaymentHash
impl UpperHex for PaymentHash
impl Copy for PaymentHash
impl Eq for PaymentHash
impl StructuralPartialEq for PaymentHash
Auto Trait Implementations§
impl Freeze for PaymentHash
impl RefUnwindSafe for PaymentHash
impl Send for PaymentHash
impl Sync for PaymentHash
impl Unpin for PaymentHash
impl UnwindSafe for PaymentHash
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)