[][src]Struct lightning::chain::transaction::OutPoint

pub struct OutPoint {
    pub txid: Sha256dHash,
    pub index: u16,
}

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: Sha256dHash

The referenced transaction's txid.

index: u16

The index of the referenced output in its transaction's vout.

Methods

impl OutPoint[src]

pub fn new(txid: Sha256dHash, index: u16) -> OutPoint[src]

Creates a new OutPoint from the txid and the index.

pub fn to_channel_id(&self) -> [u8; 32][src]

Convert an OutPoint to a lightning channel id.

pub fn into_bitcoin_outpoint(self) -> BitcoinOutPoint[src]

Converts this OutPoint into the OutPoint field as used by rust-bitcoin

Trait Implementations

impl Clone for OutPoint[src]

impl Copy for OutPoint[src]

impl Debug for OutPoint[src]

impl Eq for OutPoint[src]

impl Hash for OutPoint[src]

impl Ord for OutPoint[src]

impl PartialEq<OutPoint> for OutPoint[src]

impl PartialOrd<OutPoint> for OutPoint[src]

impl StructuralEq for OutPoint[src]

impl StructuralPartialEq for OutPoint[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.