Skip to main content

ProofSubscription

Trait ProofSubscription 

Source
pub trait ProofSubscription {
    type Input;
    type Item;
    type ItemStream: Stream<Item = Result<Self::Item>> + Send + 'static;

    // Required methods
    fn decode(request: ProofSubscriptionRequest) -> Result<Self::Input>;
    fn encode(item: Self::Item) -> Result<ProofSubscriptionResponse>;
    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<ProofSubscriptionRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<ProofSubscriptionResponse>> + Send + 'static>>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}

Required Associated Types§

Source

type Input

Source

type Item

Source

type ItemStream: Stream<Item = Result<Self::Item>> + Send + 'static

Required Methods§

Source

fn decode(request: ProofSubscriptionRequest) -> Result<Self::Input>

Source

fn encode(item: Self::Item) -> Result<ProofSubscriptionResponse>

Source

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§

Source

fn full<'life0, 'async_trait>( &'life0 self, request: Request<ProofSubscriptionRequest>, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<ProofSubscriptionResponse>> + 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".

Implementors§