Expand description
A reference to a transaction output.
Differs from bitcoin::blockdata::transaction::OutPoint as the index is a u16 instead of u32 due to LN’s restrictions on index values. Should reduce (possibly) unsafe conversions this way.
Fields
txid: Txid
The referenced transaction’s txid.
index: u16
The index of the referenced output in its transaction’s vout.
Implementations
sourceimpl OutPoint
impl OutPoint
sourcepub fn to_channel_id(&self) -> [u8; 32]
pub fn to_channel_id(&self) -> [u8; 32]
Convert an OutPoint
to a lightning channel id.
sourcepub fn into_bitcoin_outpoint(self) -> BitcoinOutPoint
pub fn into_bitcoin_outpoint(self) -> BitcoinOutPoint
Converts this OutPoint into the OutPoint field as used by rust-bitcoin (C-not exported) as the same type is used universally in the C bindings for all outpoints
Trait Implementations
sourceimpl Ord for OutPoint
impl Ord for OutPoint
sourceimpl PartialOrd<OutPoint> for OutPoint
impl PartialOrd<OutPoint> for OutPoint
sourcefn partial_cmp(&self, other: &OutPoint) -> Option<Ordering>
fn partial_cmp(&self, other: &OutPoint) -> 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 Writeable for OutPoint
impl Writeable for OutPoint
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 Copy for OutPoint
impl Eq for OutPoint
impl StructuralEq for OutPoint
impl StructuralPartialEq for OutPoint
Auto Trait Implementations
impl RefUnwindSafe for OutPoint
impl Send for OutPoint
impl Sync for OutPoint
impl Unpin for OutPoint
impl UnwindSafe for OutPoint
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
sourceimpl<T> MaybeReadable for T where
T: Readable,
impl<T> MaybeReadable for T where
T: Readable,
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