pub trait ExchangeService:
Send
+ Sync
+ 'static {
type GetDataStream: Stream<Item = Result<GetDataResponse, Status>> + Send + 'static;
type GetStreamStream: Stream<Item = Result<GetStreamResponse, Status>> + Send + 'static;
// Required methods
fn get_data<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDataRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetDataStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<GetStreamRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetStreamStream>, 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 ExchangeServiceServer.
Required Associated Types§
sourcetype GetDataStream: Stream<Item = Result<GetDataResponse, Status>> + Send + 'static
type GetDataStream: Stream<Item = Result<GetDataResponse, Status>> + Send + 'static
Server streaming response type for the GetData method.
sourcetype GetStreamStream: Stream<Item = Result<GetStreamResponse, Status>> + Send + 'static
type GetStreamStream: Stream<Item = Result<GetStreamResponse, Status>> + Send + 'static
Server streaming response type for the GetStream method.