pub trait EventExt: Sealed {
// Required method
fn decode_log_parts<I>(
&self,
topics: I,
data: &[u8],
validate: bool,
) -> Result<DecodedEvent>
where I: IntoIterator<Item = B256>;
// Provided method
fn decode_log(&self, log: &LogData, validate: bool) -> Result<DecodedEvent> { ... }
}
Expand description
Required Methods§
Sourcefn decode_log_parts<I>(
&self,
topics: I,
data: &[u8],
validate: bool,
) -> Result<DecodedEvent>where
I: IntoIterator<Item = B256>,
fn decode_log_parts<I>(
&self,
topics: I,
data: &[u8],
validate: bool,
) -> Result<DecodedEvent>where
I: IntoIterator<Item = B256>,
Decodes the given log info according to this item’s input types.
The topics
parameter is the list of indexed topics, and the data
parameter is the non-indexed data.
The first topic is skipped, unless the event is anonymous.
For more details, see the Solidity reference.
§Errors
This function will return an error if the decoded data does not match the expected input types.
Provided Methods§
Sourcefn decode_log(&self, log: &LogData, validate: bool) -> Result<DecodedEvent>
fn decode_log(&self, log: &LogData, validate: bool) -> Result<DecodedEvent>
Decodes the given log object according to this item’s input types.
See decode_log
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.