pub trait Echo:
Send
+ Sync
+ 'static {
type ServerStreamStream: Stream<Item = Result<EchoResponse, Status>> + Send + 'static;
type BidirectionalStreamStream: Stream<Item = Result<EchoResponse, Status>> + Send + 'static;
// Required methods
fn echo<'life0, 'async_trait>(
&'life0 self,
request: Request<EchoRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<EchoResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn server_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<EchoRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ServerStreamStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn client_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<EchoRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<EchoResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn bidirectional_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<EchoRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::BidirectionalStreamStream>, 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 EchoServer.
Required Associated Types§
Sourcetype ServerStreamStream: Stream<Item = Result<EchoResponse, Status>> + Send + 'static
type ServerStreamStream: Stream<Item = Result<EchoResponse, Status>> + Send + 'static
Server streaming response type for the ServerStream method.
Sourcetype BidirectionalStreamStream: Stream<Item = Result<EchoResponse, Status>> + Send + 'static
type BidirectionalStreamStream: Stream<Item = Result<EchoResponse, Status>> + Send + 'static
Server streaming response type for the BidirectionalStream method.
Required Methods§
fn echo<'life0, 'async_trait>(
&'life0 self,
request: Request<EchoRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<EchoResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn server_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<EchoRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ServerStreamStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn client_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<EchoRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<EchoResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn bidirectional_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<EchoRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::BidirectionalStreamStream>, 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".