Struct alloy_consensus::Receipt
source · pub struct Receipt<T = Log> {
pub status: Eip658Value,
pub cumulative_gas_used: u64,
pub logs: Vec<T>,
}
Expand description
Receipt containing result of transaction execution.
Fields§
§status: Eip658Value
If transaction is executed successfully.
This is the statusCode
cumulative_gas_used: u64
Gas used
logs: Vec<T>
Log send from contracts.
Implementations§
source§impl<T> Receipt<T>
impl<T> Receipt<T>
sourcepub fn bloom_slow(&self) -> Bloom
pub fn bloom_slow(&self) -> Bloom
Calculates Log
’s bloom filter. this is slow operation and ReceiptWithBloom can
be used to cache this value.
sourcepub fn with_bloom(self) -> ReceiptWithBloom<Self>
pub fn with_bloom(self) -> ReceiptWithBloom<Self>
Calculates the bloom filter for the receipt and returns the ReceiptWithBloom container type.
source§impl<T: Encodable> Receipt<T>
impl<T: Encodable> Receipt<T>
sourcepub fn rlp_encoded_fields_length_with_bloom(&self, bloom: &Bloom) -> usize
pub fn rlp_encoded_fields_length_with_bloom(&self, bloom: &Bloom) -> usize
Returns length of RLP-encoded receipt fields with the given Bloom
without an RLP header.
sourcepub fn rlp_encode_fields_with_bloom(&self, bloom: &Bloom, out: &mut dyn BufMut)
pub fn rlp_encode_fields_with_bloom(&self, bloom: &Bloom, out: &mut dyn BufMut)
RLP-encodes receipt fields with the given Bloom
without an RLP header.
sourcepub fn rlp_header_with_bloom(&self, bloom: &Bloom) -> Header
pub fn rlp_header_with_bloom(&self, bloom: &Bloom) -> Header
Returns RLP header for this receipt encoding with the given Bloom
.
source§impl<T: Decodable> Receipt<T>
impl<T: Decodable> Receipt<T>
sourcepub fn rlp_decode_fields_with_bloom(
buf: &mut &[u8],
) -> Result<ReceiptWithBloom<Self>>
pub fn rlp_decode_fields_with_bloom( buf: &mut &[u8], ) -> Result<ReceiptWithBloom<Self>>
RLP-decodes receipt’s field with a Bloom
.
Does not expect an RLP header.
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Receipt<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Receipt<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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T> From<ReceiptWithBloom<Receipt<T>>> for Receipt<T>
impl<T> From<ReceiptWithBloom<Receipt<T>>> for Receipt<T>
source§fn from(receipt_with_bloom: ReceiptWithBloom<Self>) -> Self
fn from(receipt_with_bloom: ReceiptWithBloom<Self>) -> Self
Consume the structure, returning only the receipt
source§impl<T: PartialEq> PartialEq for Receipt<T>
impl<T: PartialEq> PartialEq for Receipt<T>
source§impl<T: Decodable> RlpDecodableReceipt for Receipt<T>
impl<T: Decodable> RlpDecodableReceipt for Receipt<T>
source§fn rlp_decode_with_bloom(buf: &mut &[u8]) -> Result<ReceiptWithBloom<Self>>
fn rlp_decode_with_bloom(buf: &mut &[u8]) -> Result<ReceiptWithBloom<Self>>
RLP decodes receipt and
Bloom
into ReceiptWithBloom
instance.source§impl<T: Encodable> RlpEncodableReceipt for Receipt<T>
impl<T: Encodable> RlpEncodableReceipt for Receipt<T>
source§fn rlp_encoded_length_with_bloom(&self, bloom: &Bloom) -> usize
fn rlp_encoded_length_with_bloom(&self, bloom: &Bloom) -> usize
Returns the length of the receipt payload with the provided bloom filter.
source§fn rlp_encode_with_bloom(&self, bloom: &Bloom, out: &mut dyn BufMut)
fn rlp_encode_with_bloom(&self, bloom: &Bloom, out: &mut dyn BufMut)
RLP encodes the receipt with the provided bloom filter.
source§impl<T> TxReceipt for Receipt<T>
impl<T> TxReceipt for Receipt<T>
source§fn status_or_post_state(&self) -> Eip658Value
fn status_or_post_state(&self) -> Eip658Value
Returns the status or post state of the transaction. Read more
source§fn bloom(&self) -> Bloom
fn bloom(&self) -> Bloom
Returns the bloom filter for the logs in the receipt. This operation
may be expensive.
source§fn cumulative_gas_used(&self) -> u64
fn cumulative_gas_used(&self) -> u64
Returns the cumulative gas used in the block after this transaction was executed.
source§fn bloom_cheap(&self) -> Option<Bloom>
fn bloom_cheap(&self) -> Option<Bloom>
Returns the bloom filter for the logs in the receipt, if it is cheap to
compute.
source§fn with_bloom_ref(&self) -> ReceiptWithBloom<&Self>
fn with_bloom_ref(&self) -> ReceiptWithBloom<&Self>
Returns
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>
Consumes the type and converts it into
ReceiptWithBloom
with the computed bloom filter
Self::bloom
and the receipt.impl<T: Eq> Eq for Receipt<T>
impl<T> StructuralPartialEq for Receipt<T>
Auto Trait Implementations§
impl<T> Freeze for Receipt<T>
impl<T> RefUnwindSafe for Receipt<T>where
T: RefUnwindSafe,
impl<T> Send for Receipt<T>where
T: Send,
impl<T> Sync for Receipt<T>where
T: Sync,
impl<T> Unpin for Receipt<T>where
T: Unpin,
impl<T> UnwindSafe for Receipt<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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.