Struct digibyte::blockdata::transaction::OutPoint [−][src]
A reference to a transaction output
Fields
txid: Txid
The referenced transaction’s txid
vout: u32
The index of the referenced output in its transaction’s vout
Implementations
impl OutPoint
[src]
impl OutPoint
[src]pub fn new(txid: Txid, vout: u32) -> OutPoint
[src]
Create a new OutPoint.
pub fn null() -> OutPoint
[src]
Creates a “null” OutPoint
.
This value is used for coinbase transactions because they don’t have any previous outputs.
pub fn is_null(&self) -> bool
[src]
Checks if an OutPoint
is “null”.
Examples
use bitcoin::blockdata::constants::genesis_block; use bitcoin::network::constants::Network; let block = genesis_block(Network::Bitcoin); let tx = &block.txdata[0]; // Coinbase transactions don't have any previous output. assert_eq!(tx.input[0].previous_output.is_null(), true);
Trait Implementations
impl PartialOrd<OutPoint> for OutPoint
[src]
impl PartialOrd<OutPoint> for OutPoint
[src]impl StructuralEq for OutPoint
[src]
impl StructuralEq for OutPoint
[src]impl StructuralPartialEq for OutPoint
[src]
impl StructuralPartialEq for OutPoint
[src]Auto Trait Implementations
impl RefUnwindSafe for OutPoint
impl RefUnwindSafe for OutPoint
impl UnwindSafe for OutPoint
impl UnwindSafe for OutPoint