Struct lightning::ln::chan_utils::HTLCOutputInCommitment
source · [−]pub struct HTLCOutputInCommitment {
pub offered: bool,
pub amount_msat: u64,
pub cltv_expiry: u32,
pub payment_hash: PaymentHash,
pub transaction_output_index: Option<u32>,
}
Expand description
Information about an HTLC as it appears in a commitment transaction
Fields
offered: bool
Whether the HTLC was “offered” (ie outbound in relation to this commitment transaction). Note that this is not the same as whether it is ountbound from us. To determine that you need to compare this value to whether the commitment transaction in question is that of the counterparty or our own.
amount_msat: u64
The value, in msat, of the HTLC. The value as it appears in the commitment transaction is this divided by 1000.
cltv_expiry: u32
The CLTV lock-time at which this HTLC expires.
payment_hash: PaymentHash
The hash of the preimage which unlocks this HTLC.
transaction_output_index: Option<u32>
The position within the commitment transactions’ outputs. This may be None if the value is below the dust limit (in which case no output appears in the commitment transaction and the value is spent to additional transaction fees).
Trait Implementations
sourceimpl Clone for HTLCOutputInCommitment
impl Clone for HTLCOutputInCommitment
sourcefn clone(&self) -> HTLCOutputInCommitment
fn clone(&self) -> HTLCOutputInCommitment
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 PartialEq<HTLCOutputInCommitment> for HTLCOutputInCommitment
impl PartialEq<HTLCOutputInCommitment> for HTLCOutputInCommitment
sourcefn eq(&self, other: &HTLCOutputInCommitment) -> bool
fn eq(&self, other: &HTLCOutputInCommitment) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &HTLCOutputInCommitment) -> bool
fn ne(&self, other: &HTLCOutputInCommitment) -> bool
This method tests for !=
.
sourceimpl Readable for HTLCOutputInCommitment
impl Readable for HTLCOutputInCommitment
sourceimpl Writeable for HTLCOutputInCommitment
impl Writeable for HTLCOutputInCommitment
sourcefn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>
Writes self out to the given Writer
sourcefn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Gets the length of this object after it has been serialized. This can be overridden to optimize cases where we prepend an object with its length. Read more
impl StructuralPartialEq for HTLCOutputInCommitment
Auto Trait Implementations
impl RefUnwindSafe for HTLCOutputInCommitment
impl Send for HTLCOutputInCommitment
impl Sync for HTLCOutputInCommitment
impl Unpin for HTLCOutputInCommitment
impl UnwindSafe for HTLCOutputInCommitment
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