Struct sapio_bitcoin::blockdata::transaction::TxIn
source · [−]pub struct TxIn {
pub previous_output: OutPoint,
pub script_sig: Script,
pub sequence: u32,
pub witness: Witness,
}
Expand description
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.
witness: Witness
Witness data: an array of byte-arrays. Note that this field is not (de)serialized with the rest of the TxIn in Encodable/Decodable, 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)serialization routines.
Trait Implementations
sourceimpl Decodable for TxIn
impl Decodable for TxIn
sourcefn consensus_decode<D: Read>(d: D) -> Result<Self, Error>
fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>
Decode an object with a well-defined format
sourceimpl<'de> Deserialize<'de> for TxIn
impl<'de> Deserialize<'de> for TxIn
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Ord for TxIn
impl Ord for TxIn
sourceimpl PartialOrd<TxIn> for TxIn
impl PartialOrd<TxIn> for TxIn
sourcefn partial_cmp(&self, other: &TxIn) -> Option<Ordering>
fn partial_cmp(&self, other: &TxIn) -> 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
impl Eq for TxIn
impl StructuralEq for TxIn
impl StructuralPartialEq for TxIn
Auto Trait Implementations
impl RefUnwindSafe for TxIn
impl Send for TxIn
impl Sync for TxIn
impl Unpin for TxIn
impl UnwindSafe for TxIn
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more