pub struct Log<T = LogData> {
pub inner: Log<T>,
pub block_hash: Option<BlockHash>,
pub block_number: Option<u64>,
pub block_timestamp: Option<u64>,
pub transaction_hash: Option<TxHash>,
pub transaction_index: Option<u64>,
pub log_index: Option<u64>,
pub removed: bool,
}
Expand description
Ethereum Log emitted by a transaction
Fields§
§inner: Log<T>
Consensus log object
block_hash: Option<BlockHash>
Hash of the block the transaction that emitted this log was mined in
block_number: Option<u64>
Number of the block the transaction that emitted this log was mined in
block_timestamp: Option<u64>
The timestamp of the block as proposed in: https://ethereum-magicians.org/t/proposal-for-adding-blocktimestamp-to-logs-object-returned-by-eth-getlogs-and-related-requests https://github.com/ethereum/execution-apis/issues/295
transaction_hash: Option<TxHash>
Transaction Hash
transaction_index: Option<u64>
Index of the Transaction in the block
log_index: Option<u64>
Log Index in Block
removed: bool
Geth Compatibility Field: whether this log was removed
Implementations§
Source§impl Log<LogData>
impl Log<LogData>
Sourcepub fn topics_mut(&mut self) -> &mut [B256]
pub fn topics_mut(&mut self) -> &mut [B256]
Get the topic list, mutably. This gives access to the internal
array, without allowing extension of that array. Shortcut for
LogData::topics_mut
Sourcepub fn log_decode<T: SolEvent>(&self) -> Result<Log<T>>
pub fn log_decode<T: SolEvent>(&self) -> Result<Log<T>>
Decode the log data into a typed log.
Source§impl<T> Log<T>
impl<T> Log<T>
Sourcepub fn reserialize_inner(&self) -> Log
pub fn reserialize_inner(&self) -> Log
Reserialize the inner data, returning an alloy_primitives::Log
.
Sourcepub fn reserialize(&self) -> Log<LogData>
pub fn reserialize(&self) -> Log<LogData>
Reserialize the data, returning a new Log
object wrapping an
alloy_primitives::Log
. this copies the log metadata, preserving
the original object.
Trait Implementations§
Source§impl<'arbitrary, T: Arbitrary<'arbitrary>> Arbitrary<'arbitrary> for Log<T>
impl<'arbitrary, T: Arbitrary<'arbitrary>> Arbitrary<'arbitrary> for Log<T>
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self
from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured
this type
needs to construct itself. Read moreSource§impl<'de, T> Deserialize<'de> for Log<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Log<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>,
impl<T: Eq> Eq for Log<T>
impl<T> StructuralPartialEq for Log<T>
Auto Trait Implementations§
impl<T> Freeze for Log<T>where
T: Freeze,
impl<T> RefUnwindSafe for Log<T>where
T: RefUnwindSafe,
impl<T> Send for Log<T>where
T: Send,
impl<T> Sync for Log<T>where
T: Sync,
impl<T> Unpin for Log<T>where
T: Unpin,
impl<T> UnwindSafe for Log<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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 more