pub struct AnyTransactionReceipt(pub WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>);Expand description
A catch-all receipt type for handling receipts on multiple networks.
Tuple Fields§
§0: WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>Implementations§
Source§impl AnyTransactionReceipt
impl AnyTransactionReceipt
Sourcepub const fn new(
inner: WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>,
) -> AnyTransactionReceipt
pub const fn new( inner: WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>, ) -> AnyTransactionReceipt
Creates a new AnyTransactionReceipt.
Sourcepub fn into_parts(
self,
) -> (TransactionReceipt<AnyReceiptEnvelope<Log>>, OtherFields)
pub fn into_parts( self, ) -> (TransactionReceipt<AnyReceiptEnvelope<Log>>, OtherFields)
Splits the receipt into its inner receipt and unknown fields.
Sourcepub fn into_inner(self) -> TransactionReceipt<AnyReceiptEnvelope<Log>>
pub fn into_inner(self) -> TransactionReceipt<AnyReceiptEnvelope<Log>>
Consumes the type and returns the wrapped receipt.
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Returns true if the transaction was successful.
Sourcepub const fn deployed_contract(&self) -> Option<Address>
pub const fn deployed_contract(&self) -> Option<Address>
Returns the contract address if this was a deployment transaction.
Sourcepub const fn transaction_hash(&self) -> FixedBytes<32>
pub const fn transaction_hash(&self) -> FixedBytes<32>
Returns the transaction hash.
Sourcepub const fn tx_hash(&self) -> FixedBytes<32>
pub const fn tx_hash(&self) -> FixedBytes<32>
Alias for transaction_hash.
Sourcepub const fn block_hash(&self) -> Option<FixedBytes<32>>
pub const fn block_hash(&self) -> Option<FixedBytes<32>>
Returns the block hash if available.
Sourcepub const fn block_number(&self) -> Option<u64>
pub const fn block_number(&self) -> Option<u64>
Returns the block number if available.
Sourcepub fn cumulative_gas_used(&self) -> u64
pub fn cumulative_gas_used(&self) -> u64
Returns the cumulative gas used up to this transaction in the block.
Sourcepub const fn effective_gas_price(&self) -> u128
pub const fn effective_gas_price(&self) -> u128
Returns the effective gas price.
Sourcepub const fn other_fields(&self) -> &OtherFields
pub const fn other_fields(&self) -> &OtherFields
Returns a reference to the unknown fields.
Sourcepub const fn other_fields_mut(&mut self) -> &mut OtherFields
pub const fn other_fields_mut(&mut self) -> &mut OtherFields
Returns a mutable reference to the unknown fields.
Sourcepub fn deserialize_other<T>(&self) -> Result<T, Error>where
T: DeserializeOwned,
pub fn deserialize_other<T>(&self) -> Result<T, Error>where
T: DeserializeOwned,
Deserializes the unknown fields into a concrete type.
Sourcepub fn map_inner<U, F>(self, f: F) -> TransactionReceipt<U>
pub fn map_inner<U, F>(self, f: F) -> TransactionReceipt<U>
Maps the inner receipt envelope to a different type.
OtherFields are discarded while mapping.
Sourcepub fn try_map_inner<U, E, F>(self, f: F) -> Result<TransactionReceipt<U>, E>
pub fn try_map_inner<U, E, F>(self, f: F) -> Result<TransactionReceipt<U>, E>
Applies a fallible mapping function to the inner receipt envelope.
OtherFields are discarded while mapping.
Sourcepub fn convert<U>(self) -> TransactionReceipt<U>
pub fn convert<U>(self) -> TransactionReceipt<U>
Converts the receipt into a different envelope type.
OtherFields are discarded while mapping.
Sourcepub fn try_convert<U>(
self,
) -> Result<TransactionReceipt<U>, <U as TryFrom<AnyReceiptEnvelope<Log>>>::Error>
pub fn try_convert<U>( self, ) -> Result<TransactionReceipt<U>, <U as TryFrom<AnyReceiptEnvelope<Log>>>::Error>
Tries to convert the receipt into a different envelope type.
OtherFields are discarded while mapping.
Methods from Deref<Target = WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>>§
Trait Implementations§
Source§impl Clone for AnyTransactionReceipt
impl Clone for AnyTransactionReceipt
Source§fn clone(&self) -> AnyTransactionReceipt
fn clone(&self) -> AnyTransactionReceipt
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnyTransactionReceipt
impl Debug for AnyTransactionReceipt
Source§impl Deref for AnyTransactionReceipt
impl Deref for AnyTransactionReceipt
Source§type Target = WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>
type Target = WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>
Source§impl DerefMut for AnyTransactionReceipt
impl DerefMut for AnyTransactionReceipt
Source§impl<'de> Deserialize<'de> for AnyTransactionReceipt
impl<'de> Deserialize<'de> for AnyTransactionReceipt
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AnyTransactionReceipt, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AnyTransactionReceipt, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl From<AnyTransactionReceipt> for WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>
impl From<AnyTransactionReceipt> for WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>
Source§fn from(
value: AnyTransactionReceipt,
) -> WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>
fn from( value: AnyTransactionReceipt, ) -> WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>
Source§impl From<TransactionReceipt<AnyReceiptEnvelope<Log>>> for AnyTransactionReceipt
impl From<TransactionReceipt<AnyReceiptEnvelope<Log>>> for AnyTransactionReceipt
Source§fn from(
value: TransactionReceipt<AnyReceiptEnvelope<Log>>,
) -> AnyTransactionReceipt
fn from( value: TransactionReceipt<AnyReceiptEnvelope<Log>>, ) -> AnyTransactionReceipt
Source§impl From<WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>> for AnyTransactionReceipt
impl From<WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>> for AnyTransactionReceipt
Source§fn from(
value: WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>,
) -> AnyTransactionReceipt
fn from( value: WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>, ) -> AnyTransactionReceipt
Source§impl PartialEq for AnyTransactionReceipt
impl PartialEq for AnyTransactionReceipt
Source§impl ReceiptResponse for AnyTransactionReceipt
impl ReceiptResponse for AnyTransactionReceipt
Source§fn contract_address(&self) -> Option<Address>
fn contract_address(&self) -> Option<Address>
None if the transaction was not a deployment.Source§fn block_hash(&self) -> Option<FixedBytes<32>>
fn block_hash(&self) -> Option<FixedBytes<32>>
Source§fn block_number(&self) -> Option<u64>
fn block_number(&self) -> Option<u64>
Source§fn transaction_hash(&self) -> FixedBytes<32>
fn transaction_hash(&self) -> FixedBytes<32>
Source§fn transaction_index(&self) -> Option<u64>
fn transaction_index(&self) -> Option<u64>
Source§fn effective_gas_price(&self) -> u128
fn effective_gas_price(&self) -> u128
Source§fn blob_gas_used(&self) -> Option<u64>
fn blob_gas_used(&self) -> Option<u64>
Source§fn blob_gas_price(&self) -> Option<u128>
fn blob_gas_price(&self) -> Option<u128>
Source§fn cumulative_gas_used(&self) -> u64
fn cumulative_gas_used(&self) -> u64
Source§fn state_root(&self) -> Option<FixedBytes<32>>
fn state_root(&self) -> Option<FixedBytes<32>>
Source§fn block_hash_num(&self) -> Option<NumHash>
fn block_hash_num(&self) -> Option<NumHash>
BlockNumHash of the block this transaction was mined in. Read moreSource§fn ensure_success(&self) -> Result<(), TransactionFailedError>
fn ensure_success(&self) -> Result<(), TransactionFailedError>
Source§impl Serialize for AnyTransactionReceipt
impl Serialize for AnyTransactionReceipt
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for AnyTransactionReceipt
impl StructuralPartialEq for AnyTransactionReceipt
Auto Trait Implementations§
impl Freeze for AnyTransactionReceipt
impl RefUnwindSafe for AnyTransactionReceipt
impl Send for AnyTransactionReceipt
impl Sync for AnyTransactionReceipt
impl Unpin for AnyTransactionReceipt
impl UnsafeUnpin for AnyTransactionReceipt
impl UnwindSafe for AnyTransactionReceipt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'de, T> BorrowedRpcObject<'de> for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<'de, T> RpcBorrow<'de> for T
impl<T> RpcObject for T
impl<T> RpcRecv for T
impl<T> RpcSend for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 608 bytes