Trait substreams_ethereum_core::Function
source · [−]pub trait Function: Sized {
const NAME: &'static str;
fn match_call(log: &Call) -> bool;
fn decode(log: &Call) -> Result<Self, String>;
fn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
;
fn match_and_decode(call: impl AsRef<Call>) -> Option<Self> { ... }
}
Required Associated Constants
Required Methods
fn match_call(log: &Call) -> bool
fn decode(log: &Call) -> Result<Self, String>
fn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Provided Methods
sourcefn match_and_decode(call: impl AsRef<Call>) -> Option<Self>
fn match_and_decode(call: impl AsRef<Call>) -> Option<Self>
Attempts to match and decode the call.
If Self::match_call(log)
is false
, returns None
.
If it matches, but decoding fails, logs the decoding error and returns None
.