pub struct AnyReceiptEnvelope<T = Log> {
pub inner: ReceiptWithBloom<Receipt<T>>,
pub type: u8,
}Expand description
Receipt envelope, as defined in EIP-2718.
This enum distinguishes between tagged and untagged legacy receipts, as the
in-protocol Merkle tree may commit to EITHER 0-prefixed or raw. Therefore
we must ensure that encoding returns the precise byte-array that was
decoded, preserving the presence or absence of the TransactionType flag.
Transaction receipt payloads are specified in their respective EIPs.
Fields§
§inner: ReceiptWithBloom<Receipt<T>>The receipt envelope.
type: u8The transaction type.
Implementations§
Source§impl<T> AnyReceiptEnvelope<T>
impl<T> AnyReceiptEnvelope<T>
Source§impl<T> AnyReceiptEnvelope<T>where
T: Encodable,
impl<T> AnyReceiptEnvelope<T>where
T: Encodable,
Sourcepub fn rlp_payload_length(&self) -> usize
pub fn rlp_payload_length(&self) -> usize
Calculate the length of the rlp payload of the network encoded receipt.
Source§impl<T> AnyReceiptEnvelope<T>
impl<T> AnyReceiptEnvelope<T>
Sourcepub const fn is_success(&self) -> bool
pub const fn is_success(&self) -> bool
Sourcepub const fn cumulative_gas_used(&self) -> u64
pub const fn cumulative_gas_used(&self) -> u64
Returns the cumulative gas used at this receipt.
Trait Implementations§
Source§impl<T> Clone for AnyReceiptEnvelope<T>where
T: Clone,
impl<T> Clone for AnyReceiptEnvelope<T>where
T: Clone,
Source§fn clone(&self) -> AnyReceiptEnvelope<T>
fn clone(&self) -> AnyReceiptEnvelope<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T> Debug for AnyReceiptEnvelope<T>where
T: Debug,
impl<T> Debug for AnyReceiptEnvelope<T>where
T: Debug,
Source§impl Decodable2718 for AnyReceiptEnvelope
impl Decodable2718 for AnyReceiptEnvelope
Source§fn typed_decode(
ty: u8,
buf: &mut &[u8],
) -> Result<AnyReceiptEnvelope, Eip2718Error>
fn typed_decode( ty: u8, buf: &mut &[u8], ) -> Result<AnyReceiptEnvelope, Eip2718Error>
Source§fn fallback_decode(buf: &mut &[u8]) -> Result<AnyReceiptEnvelope, Eip2718Error>
fn fallback_decode(buf: &mut &[u8]) -> Result<AnyReceiptEnvelope, Eip2718Error>
Source§fn extract_type_byte(buf: &mut &[u8]) -> Option<u8>
fn extract_type_byte(buf: &mut &[u8]) -> Option<u8>
Source§fn decode_2718(buf: &mut &[u8]) -> Result<Self, Eip2718Error>
fn decode_2718(buf: &mut &[u8]) -> Result<Self, Eip2718Error>
Source§fn network_decode(buf: &mut &[u8]) -> Result<Self, Eip2718Error>
fn network_decode(buf: &mut &[u8]) -> Result<Self, Eip2718Error>
Source§impl<'de, T> Deserialize<'de> for AnyReceiptEnvelope<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for AnyReceiptEnvelope<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AnyReceiptEnvelope<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AnyReceiptEnvelope<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Encodable2718 for AnyReceiptEnvelope
impl Encodable2718 for AnyReceiptEnvelope
Source§fn encode_2718_len(&self) -> usize
fn encode_2718_len(&self) -> usize
Source§fn encode_2718(&self, out: &mut dyn BufMut)
fn encode_2718(&self, out: &mut dyn BufMut)
Source§fn encoded_2718(&self) -> Vec<u8> ⓘ
fn encoded_2718(&self) -> Vec<u8> ⓘ
Source§fn trie_hash(&self) -> FixedBytes<32>
fn trie_hash(&self) -> FixedBytes<32>
Source§fn network_len(&self) -> usize
fn network_len(&self) -> usize
Source§fn network_encode(&self, out: &mut dyn BufMut)
fn network_encode(&self, out: &mut dyn BufMut)
Source§impl<T> PartialEq for AnyReceiptEnvelope<T>where
T: PartialEq,
impl<T> PartialEq for AnyReceiptEnvelope<T>where
T: PartialEq,
Source§impl<T> Serialize for AnyReceiptEnvelope<T>where
T: Serialize,
impl<T> Serialize for AnyReceiptEnvelope<T>where
T: Serialize,
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,
Source§impl<T> TxReceipt for AnyReceiptEnvelope<T>
impl<T> TxReceipt for AnyReceiptEnvelope<T>
Source§fn status_or_post_state(&self) -> Eip658Value
fn status_or_post_state(&self) -> Eip658Value
Source§fn bloom(&self) -> Bloom
fn bloom(&self) -> Bloom
Source§fn cumulative_gas_used(&self) -> u64
fn cumulative_gas_used(&self) -> u64
Source§fn bloom_cheap(&self) -> Option<Bloom>
fn bloom_cheap(&self) -> Option<Bloom>
Source§fn with_bloom_ref(&self) -> ReceiptWithBloom<&Self>
fn with_bloom_ref(&self) -> ReceiptWithBloom<&Self>
ReceiptWithBloom with the computed bloom filter Self::bloom and a reference
to the receipt.Source§fn into_with_bloom(self) -> ReceiptWithBloom<Self>
fn into_with_bloom(self) -> ReceiptWithBloom<Self>
ReceiptWithBloom with the computed bloom filter
Self::bloom and the receipt.Source§impl Typed2718 for AnyReceiptEnvelope
impl Typed2718 for AnyReceiptEnvelope
Source§fn is_eip2930(&self) -> bool
fn is_eip2930(&self) -> bool
Source§fn is_eip1559(&self) -> bool
fn is_eip1559(&self) -> bool
Source§fn is_eip4844(&self) -> bool
fn is_eip4844(&self) -> bool
Source§fn is_eip7702(&self) -> bool
fn is_eip7702(&self) -> bool
impl<T> Eq for AnyReceiptEnvelope<T>where
T: Eq,
impl<T> StructuralPartialEq for AnyReceiptEnvelope<T>
Auto Trait Implementations§
impl<T> Freeze for AnyReceiptEnvelope<T>
impl<T> RefUnwindSafe for AnyReceiptEnvelope<T>where
T: RefUnwindSafe,
impl<T> Send for AnyReceiptEnvelope<T>where
T: Send,
impl<T> Sync for AnyReceiptEnvelope<T>where
T: Sync,
impl<T> Unpin for AnyReceiptEnvelope<T>where
T: Unpin,
impl<T> UnwindSafe for AnyReceiptEnvelope<T>where
T: UnwindSafe,
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<T> Eip2718Envelope for Twhere
T: Decodable2718 + Encodable2718,
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: 316 bytes