Return a concrete type from server::listen (#113)

* Return a concrete type from `server::listen`.
* Change `FutureServiceExt::listen` to return `(SocketAddr, Listen)`, where `Listen` is a struct created by the `service!` macro that `impls Future<Item=(),  Error=()>` and represents server execution.
* Disable `conservative_impl_trait` as it's no longer used.
* Update `FutureServiceExt` doc comment.
* Update `SyncServiceExt` doc comment. Also annotate `server::Handle` with `#[must_use]`.
* `cargo fmt`
This commit is contained in:
Tim
2017-02-21 22:01:59 -08:00
committed by GitHub
parent 44792347b1
commit 2b8f3db1fd
14 changed files with 326 additions and 116 deletions

View File

@@ -3,7 +3,7 @@
// Licensed under the MIT License, <LICENSE or http://opensource.org/licenses/MIT>.
// This file may not be copied, modified, or distributed except according to those terms.
#![feature(conservative_impl_trait, plugin)]
#![feature(plugin)]
#![plugin(tarpc_plugins)]
extern crate futures;
@@ -19,7 +19,6 @@ use std::sync::mpsc;
use std::thread;
use tarpc::{client, server};
use tarpc::client::sync::ClientExt;
use tarpc::util::FirstSocketAddr;
service! {
rpc hello(name: String) -> String | NoNameGiven;