pub trait BlockSubscriber:
Send
+ Sync
+ 'static {
type Prepared: Send;
type PrepareBlockFut<'a>: Future<Output = Result<Self::Prepared>> + Send + 'a;
type HandleBlockFut<'a>: Future<Output = Result<()>> + Send + 'a;
// Required methods
fn prepare_block<'a>(
&'a self,
cx: &'a BlockSubscriberContext,
) -> Self::PrepareBlockFut<'a>;
fn handle_block<'a>(
&'a self,
cx: &'a BlockSubscriberContext,
prepared: Self::Prepared,
) -> Self::HandleBlockFut<'a>;
}Required Associated Types§
type Prepared: Send
type PrepareBlockFut<'a>: Future<Output = Result<Self::Prepared>> + Send + 'a
type HandleBlockFut<'a>: Future<Output = Result<()>> + Send + 'a
Required Methods§
fn prepare_block<'a>( &'a self, cx: &'a BlockSubscriberContext, ) -> Self::PrepareBlockFut<'a>
fn handle_block<'a>( &'a self, cx: &'a BlockSubscriberContext, prepared: Self::Prepared, ) -> Self::HandleBlockFut<'a>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.