[−][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) -> Hash
[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 Eq for Transaction
[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 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<D: Decoder> Decodable<D> for Transaction
[src]
fn consensus_decode(d: &mut D) -> Result<Transaction, Error>
[src]
impl<S: Encoder> Encodable<S> for Transaction
[src]
impl BitcoinHash for Transaction
[src]
fn bitcoin_hash(&self) -> Hash
[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 Unpin for Transaction
impl Sync for Transaction
impl UnwindSafe for Transaction
impl RefUnwindSafe for Transaction
Blanket Implementations
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,