[−][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) -> Sha256dHash
[src]
The txid of the transaction. To get its hash, use BitcoinHash::bitcoin_hash()
.
Trait Implementations
impl PartialEq<Transaction> for Transaction
[src]
fn eq(&self, other: &Transaction) -> bool
[src]
fn ne(&self, other: &Transaction) -> bool
[src]
impl Default for Transaction
[src]
fn default() -> Transaction
[src]
impl Clone for Transaction
[src]
fn clone(&self) -> Transaction
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
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,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Transaction
[src]
impl<S: Encoder> Encodable<S> for Transaction
[src]
impl<D: Decoder> Decodable<D> for Transaction
[src]
fn consensus_decode(d: &mut D) -> Result<Transaction, Error>
[src]
impl BitcoinHash for Transaction
[src]
fn bitcoin_hash(&self) -> Sha256dHash
[src]
To get a transaction's txid, which is usually what you want, use the txid
method.
Auto Trait Implementations
impl Send for Transaction
impl Sync for Transaction
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,