Skip to main content

Echo

Trait Echo 

Source
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§

Source

type ServerStreamStream: Stream<Item = Result<EchoResponse, Status>> + Send + 'static

Server streaming response type for the ServerStream method.

Source

type BidirectionalStreamStream: Stream<Item = Result<EchoResponse, Status>> + Send + 'static

Server streaming response type for the BidirectionalStream method.

Required Methods§

Source

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,

Source

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,

Source

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,

Source

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".

Implementors§