pub trait EventSubscriber<N: Network = Ethereum>: Send {
// Required methods
fn register_interests(
&mut self,
interests: &[ReactiveInterest<N>],
) -> Result<(), SubscriberError>;
fn next_batch(&mut self) -> SubscriberNextBatch<'_, N>;
}Expand description
Provider-agnostic subscriber interface.
Required Methods§
Sourcefn register_interests(
&mut self,
interests: &[ReactiveInterest<N>],
) -> Result<(), SubscriberError>
fn register_interests( &mut self, interests: &[ReactiveInterest<N>], ) -> Result<(), SubscriberError>
Replace all interests registered with the subscriber.
Implementations may use this as a full setup/reset operation. The
in-crate AlloySubscriber clears owner-scoped interest state and
delivery/dedupe bookkeeping when this method is called.
Sourcefn next_batch(&mut self) -> SubscriberNextBatch<'_, N>
fn next_batch(&mut self) -> SubscriberNextBatch<'_, N>
Return the next input batch, or Ok(None) when the stream is exhausted.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".