[][src]Enum ethcontract::transaction::TransactionResult

pub enum TransactionResult {
    Hash(H256),
    Receipt(TransactionReceipt),
}

Represents the result of a sent transaction that can either be a transaction hash, in the case the transaction was not confirmed, or a full transaction receipt if the TransactionBuilder was configured to wait for confirmation blocks.

Note that the result will always be a TransactionResult::Hash if Confirm::Skip was used and TransactionResult::Receipt if Confirm::Blocks was used.

Variants

Hash(H256)

A transaction hash, this variant happens if and only if confirmation was skipped.

A transaction receipt, this variant happens if and only if the transaction was configured to wait for confirmations.

Methods

impl TransactionResult[src]

pub fn is_hash(&self) -> bool[src]

Returns true if the TransactionResult is a Hash variant, i.e. it is only a hash and does not contain the transaction receipt.

pub fn hash(&self) -> H256[src]

Get the transaction hash.

pub fn is_receipt(&self) -> bool[src]

Returns true if the TransactionResult is a Receipt variant, i.e. the transaction was confirmed and the full transaction receipt is available.

pub fn as_receipt(&self) -> Option<&TransactionReceipt>[src]

Extract a TransactionReceipt from the result. This will return None if the result is only a hash and the transaction receipt is not available.

Trait Implementations

impl Clone for TransactionResult[src]

impl Debug for TransactionResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,