pub trait BlockSubscription {
type Input;
type Item;
type ItemStream: Stream<Item = Result<Self::Item>> + Send + 'static;
// Required methods
fn decode(request: BlockSubscriptionRequest) -> Result<Self::Input>;
fn encode(item: Self::Item) -> Result<BlockSubscriptionResponse>;
fn handle<'life0, 'async_trait>(
&'life0 self,
input: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::ItemStream>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn full<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockSubscriptionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<BlockSubscriptionResponse>> + Send + 'static>>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}Required Associated Types§
type Input
type Item
type ItemStream: Stream<Item = Result<Self::Item>> + Send + 'static
Required Methods§
fn decode(request: BlockSubscriptionRequest) -> Result<Self::Input>
fn encode(item: Self::Item) -> Result<BlockSubscriptionResponse>
fn handle<'life0, 'async_trait>(
&'life0 self,
input: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::ItemStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
fn full<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockSubscriptionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<BlockSubscriptionResponse>> + Send + 'static>>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".