1. Renames
Some of the items in this module were renamed to be less generic:
- Handler => Incoming
- ClientHandler => Requests
- ResponseHandler => InFlightRequest
- Channel::{respond_with => requests}
In the case of Handler: handler of *what*? Now it's a bit clearer that
this is a stream of Channels (aka *incoming* connections).
Similarly, ClientHandler was a stream of requests over a single
connection. Hopefully Requests better reflects that.
ResponseHandler was renamed InFlightRequest because it no longer
contains the serving function. Instead, it is just the request, plus
the response channel and an abort hook. As a result of this,
Channel::respond_with underwent a big change: it used to take the
serving function and return a ClientHandler; now it has been renamed
Channel::requests and does not take any args.
2. Execute methods
All methods thats actually result in responses being generated
have been consolidated into methods named `execute`:
- InFlightRequest::execute returns a future that completes when a
response has been generated and sent to the server Channel.
- Requests::execute automatically spawns response handlers for all
requests over a single channel.
- Channel::execute is a convenience for `channel.requests().execute()`.
- Incoming::execute automatically spawns response handlers for all
requests over all channels.
3. Removal of Server.
server::Server was removed, as it provided no value over the Incoming/Channel
abstractions. Additionally, server::new was removed, since it just
returned a Server.
It appears the header of the diffs output by cargo fmt have changed. It now says "Diff in /blah/blah/blah.rs at line 99:" Matching on lines starting with + or - should be more future-proof against changes to the surroundings.
* Rewrite tarpc on top of tokio.
* Add examples
* Move error types to their own module.
Also, cull unused error variants.
* Remove unused fn
* Remove CanonicalRpcError* types. They're 100% useless.
* Track tokio master (WIP)
* The great error revamp.
Removed the canonical rpc error type. Instead, the user declares
the error type for each rpc:
In the above example, the error type is Baz. Declaring an error is
optional; if none is specified, it defaults to Never, a convenience
struct that wraps the never type (exclamation mark) to impl Serialize, Deserialize,
Error, etc. Also adds the convenience type StringError for easily
using a String as an error type.
* Add missing license header
* Minor cleanup
* Rename StringError => Message
* Create a sync::Connect trait.
Along with this, the existing Connect trait moves to future::Connect. The future
and sync modules are reexported from the crate root.
Additionally, the utility errors Never and Message are no longer reexported from
the crate root.
* Update readme
* Track tokio/futures master. Add a Spawn utility trait to replace the removed forget.
* Fix pre-push hook
* Add doc comment to SyncServiceExt.
* Fix up some documentation
* Track tokio-proto master
* Don't set tcp nodelay
* Make future::Connect take an associated type for the future.
* Unbox FutureClient::connect return type
* Use type alias instead of newtype struct for ClientFuture
* Fix benches/latency.rs
* Write a plugin to convert lower_snake_case idents/types to UpperCamelCase.
Use it to add associated types to FutureService instead of boxing the return futures.
* Specify plugin = true in snake_to_camel/Cargo.toml. Weird things happen otherwise.
* Add clippy.toml
* shasum suffixes the checksum with '- filename' so pipe in the text instead.
* rustfmt prefixes the formatting with 'Using rustfmt config file filename' so pipe in the text instead.