[−][src]Struct elements::Transaction
Elements transaction
Fields
version: u32
Transaction version field (should always be 2)
lock_time: u32
Transaction locktime
input: Vec<TxIn>
Vector of inputs
output: Vec<TxOut>
Vector of outputs
Methods
impl Transaction
[src]
pub fn is_coinbase(&self) -> bool
[src]
Whether the transaction is a coinbase tx
pub fn has_witness(&self) -> bool
[src]
Determines whether a transaction has any non-null witnesses
pub fn get_weight(&self) -> usize
[src]
Get the "weight" of this transaction; roughly equivalent to BIP141, in that witness data is counted as 1 while non-witness data is counted as 4.
pub fn txid(&self) -> Txid
[src]
The txid of the transaction. To get its hash, use BitcoinHash::bitcoin_hash()
.
Trait Implementations
impl BitcoinHash<Txid> for Transaction
[src]
fn bitcoin_hash(&self) -> Txid
[src]
To get a transaction's txid, which is usually what you want, use the txid
method.
impl Clone for Transaction
[src]
fn clone(&self) -> Transaction
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Transaction
[src]
impl Decodable for Transaction
[src]
fn consensus_decode<D: Read>(d: D) -> Result<Transaction, Error>
[src]
impl Default for Transaction
[src]
fn default() -> Transaction
[src]
impl Encodable for Transaction
[src]
impl Eq for Transaction
[src]
impl Hash for Transaction
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Transaction> for Transaction
[src]
fn eq(&self, other: &Transaction) -> bool
[src]
fn ne(&self, other: &Transaction) -> bool
[src]
impl StructuralEq for Transaction
[src]
impl StructuralPartialEq for Transaction
[src]
Auto Trait Implementations
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,