Skip to main content

SubscriptionService

Trait SubscriptionService 

Source
pub trait SubscriptionService:
    Send
    + Sync
    + 'static {
    // Provided methods
    fn subscribe_checkpoints<'life0, 'async_trait>(
        &'life0 self,
        request: Request<SubscribeCheckpointsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<BoxStream<SubscribeCheckpointsResponse>>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn subscribe_transactions<'life0, 'async_trait>(
        &'life0 self,
        request: Request<SubscribeTransactionsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<BoxStream<SubscribeTransactionsResponse>>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn subscribe_events<'life0, 'async_trait>(
        &'life0 self,
        request: Request<SubscribeEventsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<BoxStream<SubscribeEventsResponse>>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with SubscriptionServiceServer.

Provided Methods§

Source

fn subscribe_checkpoints<'life0, 'async_trait>( &'life0 self, request: Request<SubscribeCheckpointsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BoxStream<SubscribeCheckpointsResponse>>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Subscribe to the stream of checkpoints.

The stream begins at the latest executed checkpoint as seen by the server and yields checkpoints matching the filter as they are executed. A checkpoint matches if any transaction it contains satisfies the filter.

Source

fn subscribe_transactions<'life0, 'async_trait>( &'life0 self, request: Request<SubscribeTransactionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BoxStream<SubscribeTransactionsResponse>>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Subscribe to the stream of transactions.

The stream begins at the latest executed checkpoint as seen by the server and yields transactions matching the filter as they are executed.

Source

fn subscribe_events<'life0, 'async_trait>( &'life0 self, request: Request<SubscribeEventsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BoxStream<SubscribeEventsResponse>>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Subscribe to the stream of events.

The stream begins at the latest executed checkpoint as seen by the server and yields events matching the filter as they are emitted.

Implementors§