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>
Register interests with the subscriber.
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".