#[non_exhaustive]pub struct Log {
pub address: Address,
pub data: Bytes,
/* private fields */
}Expand description
An EVM-style event log emitted during contract execution.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.address: AddressEmitting contract address.
data: BytesNon-indexed data.
Implementations§
Source§impl Log
impl Log
Sourcepub fn new_unchecked(
address: Address,
topics: Vec<B256>,
data: impl Into<Bytes>,
) -> Self
pub fn new_unchecked( address: Address, topics: Vec<B256>, data: impl Into<Bytes>, ) -> Self
Construct a log without checking the topic count.
Decoders use this to round-trip node responses even when malformed.
Sourcepub fn new(
address: Address,
topics: Vec<B256>,
data: impl Into<Bytes>,
) -> Option<Self>
pub fn new( address: Address, topics: Vec<B256>, data: impl Into<Bytes>, ) -> Option<Self>
Construct a log, returning None if it carries more than four topics.
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Returns whether this log has at most four topics, as required by the EVM-compatible event log format.
Sourcepub fn topics_mut(&mut self) -> &mut [B256] ⓘ
pub fn topics_mut(&mut self) -> &mut [B256] ⓘ
The indexed topics, mutably. Grants access to the existing entries without allowing the list to grow past the topic limit.
Trait Implementations§
impl Eq for Log
impl StructuralPartialEq for Log
Auto Trait Implementations§
impl !Freeze for Log
impl RefUnwindSafe for Log
impl Send for Log
impl Sync for Log
impl Unpin for Log
impl UnsafeUnpin for Log
impl UnwindSafe for Log
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,
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: 80 bytes