Struct alloy_consensus::receipt::any::AnyReceiptEnvelope
source · pub struct AnyReceiptEnvelope<T = Log> {
pub inner: ReceiptWithBloom<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<T>
The receipt envelope.
type: u8
The transaction type.
Implementations§
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) -> u128
pub const fn cumulative_gas_used(&self) -> u128
Returns the cumulative gas used at this receipt.
Trait Implementations§
source§impl<T: Clone> Clone for AnyReceiptEnvelope<T>
impl<T: Clone> Clone for AnyReceiptEnvelope<T>
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> Debug for AnyReceiptEnvelope<T>
impl<T: Debug> Debug for AnyReceiptEnvelope<T>
source§impl Decodable2718 for AnyReceiptEnvelope
impl Decodable2718 for AnyReceiptEnvelope
source§fn typed_decode(ty: u8, buf: &mut &[u8]) -> Eip2718Result<Self>
fn typed_decode(ty: u8, buf: &mut &[u8]) -> Eip2718Result<Self>
source§fn fallback_decode(buf: &mut &[u8]) -> Eip2718Result<Self>
fn fallback_decode(buf: &mut &[u8]) -> Eip2718Result<Self>
§fn extract_type_byte(buf: &mut &[u8]) -> Option<u8>
fn extract_type_byte(buf: &mut &[u8]) -> Option<u8>
§fn decode_2718(buf: &mut &[u8]) -> Result<Self, Eip2718Error>
fn decode_2718(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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::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)
§fn encoded_2718(&self) -> Vec<u8> ⓘ
fn encoded_2718(&self) -> Vec<u8> ⓘ
§fn trie_hash(&self) -> FixedBytes<32>
fn trie_hash(&self) -> FixedBytes<32>
§fn network_encode(&self, out: &mut dyn BufMut)
fn network_encode(&self, out: &mut dyn BufMut)
source§impl<T: PartialEq> PartialEq for AnyReceiptEnvelope<T>
impl<T: PartialEq> PartialEq for AnyReceiptEnvelope<T>
source§fn eq(&self, other: &AnyReceiptEnvelope<T>) -> bool
fn eq(&self, other: &AnyReceiptEnvelope<T>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<T> Serialize for AnyReceiptEnvelope<T>where
T: Serialize,
impl<T> Serialize for AnyReceiptEnvelope<T>where
T: Serialize,
source§impl<T> TxReceipt<T> for AnyReceiptEnvelope<T>
impl<T> TxReceipt<T> 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) -> u128
fn cumulative_gas_used(&self) -> u128
source§fn bloom_cheap(&self) -> Option<Bloom>
fn bloom_cheap(&self) -> Option<Bloom>
impl<T: Eq> Eq for AnyReceiptEnvelope<T>
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> 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 moreimpl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> Eip2718Envelope for Twhere
T: Decodable2718 + Encodable2718,
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: 352 bytes