Trait tonic::server::ServerStreamingService[][src]

pub trait ServerStreamingService<R> {
    type Response;
    type ResponseStream: Stream<Item = Result<Self::Response, Status>>;
    type Future: Future<Output = Result<Response<Self::ResponseStream>, Status>>;
    fn call(&mut self, request: Request<R>) -> Self::Future;

A specialization of tower_service::Service.

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

Associated Types

type Response[src]

Protobuf response message type

type ResponseStream: Stream<Item = Result<Self::Response, Status>>[src]

Stream of outbound response messages

type Future: Future<Output = Result<Response<Self::ResponseStream>, Status>>[src]

Response future

Loading content...

Required methods

fn call(&mut self, request: Request<R>) -> Self::Future[src]

Call the service

Loading content...


impl<T, S, M1, M2> ServerStreamingService<M1> for T where
    T: Service<Request<M1>, Response = Response<S>, Error = Status>,
    S: Stream<Item = Result<M2, Status>>, 

type Response = M2

type ResponseStream = S

type Future = T::Future

Loading content...