Trait substreams_ethereum_core::Event
source · [−]pub trait Event: Sized {
const NAME: &'static str;
fn match_log(log: &Log) -> bool;
fn decode(log: &Log) -> Result<Self, String>;
fn match_and_decode(log: impl AsRef<Log>) -> Option<Self> { ... }
}
Required Associated Constants
Required Methods
Provided Methods
sourcefn match_and_decode(log: impl AsRef<Log>) -> Option<Self>
fn match_and_decode(log: impl AsRef<Log>) -> Option<Self>
Attempts to match and decode the log.
If Self::match_log(log)
is false
, returns None
.
If it matches, but decoding fails, logs the decoding error and returns None
.