Struct elements::TxIn [−][src]
pub struct TxIn { pub previous_output: OutPoint, pub script_sig: Script, pub sequence: u32, pub asset_issuance: AssetIssuance, pub witness: TxInWitness, }
A transaction input, which defines old coins to be consumed
Fields
previous_output: OutPoint
The reference to the previous output that is being used an an input
script_sig: Script
The script which pushes values on the stack which will cause the referenced output's script to accept
sequence: u32
The sequence number, which suggests to miners which of two conflicting transactions should be preferred, or 0xFFFFFFFF to ignore this feature. This is generally never used since the miner behaviour cannot be enforced.
asset_issuance: AssetIssuance
Asset issuance data
witness: TxInWitness
Witness data - not deserialized/serialized as part of a TxIn
object
(rather as part of its containing transaction, if any) but is logically
part of the txin.
Methods
impl TxIn
[src]
impl TxIn
pub fn is_coinbase(&self) -> bool
[src]
pub fn is_coinbase(&self) -> bool
Whether the input is a coinbase
pub fn is_pegin(&self) -> bool
[src]
pub fn is_pegin(&self) -> bool
Whether the input is a pegin
pub fn has_issuance(&self) -> bool
[src]
pub fn has_issuance(&self) -> bool
Helper to determine whether an input has an asset issuance attached
Trait Implementations
impl Clone for TxIn
[src]
impl Clone for TxIn
fn clone(&self) -> TxIn
[src]
fn clone(&self) -> TxIn
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for TxIn
[src]
impl PartialEq for TxIn
fn eq(&self, other: &TxIn) -> bool
[src]
fn eq(&self, other: &TxIn) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &TxIn) -> bool
[src]
fn ne(&self, other: &TxIn) -> bool
This method tests for !=
.
impl Eq for TxIn
[src]
impl Eq for TxIn
impl Debug for TxIn
[src]
impl Debug for TxIn
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Hash for TxIn
[src]
impl Hash for TxIn
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<S: SimpleEncoder> ConsensusEncodable<S> for TxIn
[src]
impl<S: SimpleEncoder> ConsensusEncodable<S> for TxIn
fn consensus_encode(&self, s: &mut S) -> Result<(), Error>
[src]
fn consensus_encode(&self, s: &mut S) -> Result<(), Error>
Encode an object with a well-defined format
impl<D: SimpleDecoder> ConsensusDecodable<D> for TxIn
[src]
impl<D: SimpleDecoder> ConsensusDecodable<D> for TxIn