Struct lightning::ln::types::PaymentPreimage
source · pub struct PaymentPreimage(pub [u8; 32]);
Expand description
The payment preimage is the “secret key” which is used to claim the funds of an HTLC on-chain or in a lightning channel.
This is not exported to bindings users as we just use [u8; 32] directly
Tuple Fields§
§0: [u8; 32]
Trait Implementations§
source§impl Clone for PaymentPreimage
impl Clone for PaymentPreimage
source§fn clone(&self) -> PaymentPreimage
fn clone(&self) -> PaymentPreimage
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 PaymentPreimage
impl Debug for PaymentPreimage
source§impl Display for PaymentPreimage
impl Display for PaymentPreimage
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 PaymentPreimage
impl Hash for PaymentPreimage
source§impl Ord for PaymentPreimage
impl Ord for PaymentPreimage
source§fn cmp(&self, other: &PaymentPreimage) -> Ordering
fn cmp(&self, other: &PaymentPreimage) -> 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 PaymentPreimage
impl PartialEq for PaymentPreimage
source§fn eq(&self, other: &PaymentPreimage) -> bool
fn eq(&self, other: &PaymentPreimage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for PaymentPreimage
impl PartialOrd for PaymentPreimage
source§fn partial_cmp(&self, other: &PaymentPreimage) -> Option<Ordering>
fn partial_cmp(&self, other: &PaymentPreimage) -> 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 Readable for PaymentPreimage
impl Readable for PaymentPreimage
source§impl Writeable for PaymentPreimage
impl Writeable for PaymentPreimage
impl Copy for PaymentPreimage
impl Eq for PaymentPreimage
impl StructuralPartialEq for PaymentPreimage
Auto Trait Implementations§
impl Freeze for PaymentPreimage
impl RefUnwindSafe for PaymentPreimage
impl Send for PaymentPreimage
impl Sync for PaymentPreimage
impl Unpin for PaymentPreimage
impl UnwindSafe for PaymentPreimage
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