Function rmp_rpc::serve[][src]

pub fn serve<'a, S: Service + 'a, T: AsyncRead + AsyncWrite + 'a + Send>(
    stream: T,
    service: S
) -> impl Future<Item = (), Error = Error> + 'a + Send

Creates a future for running a Service on a stream.

The returned future will run until the stream is closed; if the stream encounters an error, then the future will propagate it and terminate.