pub trait EventDecoder: Send + Sync {
// Required method
fn decode(&self, log: &Log, view: &dyn StateView) -> Vec<StateUpdate>;
}Expand description
Decode one log into zero or more targeted StateUpdates.
decode is a pure function of (log, pre-state): it performs no I/O and emits
data (the updates are serializable and replayable against matching pre-state).
The pipeline applies the result through
apply_updates.
A decoder returns vec![] for any log it does not recognise (wrong topic0, an
unregistered emitting address, a malformed payload). The pipeline counts a log
as decoded only when some decoder produced at least one update for it.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".