Skip to main content

QueryApi

Trait QueryApi 

Source
pub trait QueryApi:
    Send
    + Sync
    + 'static {
    type SubscribeTopicsStream: Stream<Item = Result<SubscribeTopicsResponse, Status>> + Send + 'static;
    type SubscribeStream: Stream<Item = Result<SubscribeResponse, Status>> + Send + 'static;

    // Required methods
    fn query_envelopes<'life0, 'async_trait>(
        &'life0 self,
        request: Request<QueryEnvelopesRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<QueryEnvelopesResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn subscribe_topics<'life0, 'async_trait>(
        &'life0 self,
        request: Request<SubscribeTopicsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeTopicsStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn subscribe<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Streaming<SubscribeRequest>>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_inbox_ids<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetInboxIdsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<GetInboxIdsResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_newest_envelope<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetNewestEnvelopeRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<GetNewestEnvelopeResponse>, 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 QueryApiServer.

Required Associated Types§

Source

type SubscribeTopicsStream: Stream<Item = Result<SubscribeTopicsResponse, Status>> + Send + 'static

Server streaming response type for the SubscribeTopics method.

Source

type SubscribeStream: Stream<Item = Result<SubscribeResponse, Status>> + Send + 'static

Server streaming response type for the Subscribe method.

Required Methods§

Source

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

Source

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

Source

fn subscribe<'life0, 'async_trait>( &'life0 self, request: Request<Streaming<SubscribeRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

XIP-83 bidirectional mutable subscription: a single long-lived stream the client mutates in place (add/remove topics) with ping/pong liveness, in contrast to SubscribeTopics’ fixed, immutable, server-streaming filter set. Bidi streaming requires HTTP/2 (not grpc-web / connect-web); browser clients stay on SubscribeTopics.

Source

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

Source

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

Implementors§