Skip to main content

PeerServer

Trait PeerServer 

Source
pub trait PeerServer:
    Send
    + Sync
    + 'static {
    type QueryStream: Stream<Item = Result<QueryResultChunk, Status>> + Send + 'static;
    type DatomsStream: Stream<Item = Result<DatomChunk, Status>> + Send + 'static;
    type TxRangeStream: Stream<Item = Result<TxChunk, Status>> + Send + 'static;
    type SubscribeStream: Stream<Item = Result<SubscribeItem, Status>> + Send + 'static;

    // Required methods
    fn query<'life0, 'async_trait>(
        &'life0 self,
        request: Request<QueryRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::QueryStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn pull<'life0, 'async_trait>(
        &'life0 self,
        request: Request<PullRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<PullResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn transact<'life0, 'async_trait>(
        &'life0 self,
        request: Request<TransactRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<TransactResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn datoms<'life0, 'async_trait>(
        &'life0 self,
        request: Request<DatomsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::DatomsStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn tx_range<'life0, 'async_trait>(
        &'life0 self,
        request: Request<TxRangeRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::TxRangeStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn db_stats<'life0, 'async_trait>(
        &'life0 self,
        request: Request<DbStatsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<DbStatsResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn subscribe<'life0, 'async_trait>(
        &'life0 self,
        request: Request<SubscribeRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeStream>, 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 PeerServerServer.

Required Associated Types§

Source

type QueryStream: Stream<Item = Result<QueryResultChunk, Status>> + Send + 'static

Server streaming response type for the Query method.

Source

type DatomsStream: Stream<Item = Result<DatomChunk, Status>> + Send + 'static

Server streaming response type for the Datoms method.

Source

type TxRangeStream: Stream<Item = Result<TxChunk, Status>> + Send + 'static

Server streaming response type for the TxRange method.

Source

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

Server streaming response type for the Subscribe method.

Required Methods§

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§