[][src]Trait tower_grpc::generic::server::StreamingService

pub trait StreamingService<RequestStream> {
    type Response;
    type ResponseStream: Stream<Item = Self::Response, Error = Status>;
    type Future: Future<Item = Response<Self::ResponseStream>, Error = Status>;
    fn call(&mut self, request: Request<RequestStream>) -> Self::Future;
}

A specialization of tower_service::Service.

Existing tower_service::Service implementations with the correct form will automatically implement GrpcService.

Associated Types

type Response

Protobuf response message type

type ResponseStream: Stream<Item = Self::Response, Error = Status>

Stream of outbound response messages

type Future: Future<Item = Response<Self::ResponseStream>, Error = Status>

Response future

Loading content...

Required methods

fn call(&mut self, request: Request<RequestStream>) -> Self::Future

Call the service

Loading content...

Implementors

impl<T, S1, S2> StreamingService<S1> for T where
    T: Service<Request<S1>, Response = Response<S2>, Error = Status>,
    S1: Stream<Error = Status>,
    S2: Stream<Error = Status>, 
[src]

type Response = S2::Item

type ResponseStream = S2

type Future = T::Future

Loading content...