Struct bitcoin::blockdata::transaction::TxIn
[−]
[src]
pub struct TxIn { pub prev_hash: Sha256dHash, pub prev_index: u32, pub script_sig: Script, pub sequence: u32, pub witness: Vec<Vec<u8>>, }
A transaction input, which defines old coins to be consumed
Fields
prev_hash: Sha256dHash
The hash of the transaction whose output is being used an an input
prev_index: u32
The index of the output in the previous transaction, which may have several
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.
witness: Vec<Vec<u8>>
Witness data: an array of byte-arrays. Note that this field is not (de)serialized with the rest of the TxIn in ConsensusEncodable/ConsennsusDecodable, as it is (de)serialized at the end of the full Transaction. It is (de)serialized with the rest of the TxIn in other (de)serializationn routines.
Trait Implementations
impl Clone for TxIn
[src]
fn clone(&self) -> TxIn
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for TxIn
[src]
fn eq(&self, __arg_0: &TxIn) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &TxIn) -> bool
[src]
This method tests for !=
.
impl Eq for TxIn
[src]
impl Debug for TxIn
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Hash for TxIn
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
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]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Deserialize for TxIn
[src]
fn deserialize<D>(deserializer: &mut D) -> Result<TxIn, D::Error> where
D: Deserializer,
[src]
D: Deserializer,
Deserialize this value given this Deserializer
.
impl Serialize for TxIn
[src]
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where
S: Serializer,
[src]
S: Serializer,
Serializes this value into this serializer.
impl<S: SimpleEncoder> ConsensusEncodable<S> for TxIn
[src]
fn consensus_encode(&self, s: &mut S) -> Result<(), S::Error>
[src]
Encode an object with a well-defined format