Make separate section in the readme for additional features

This commit is contained in:
Tim Kuehn
2016-01-17 19:45:13 -08:00
parent 26ddd3e610
commit a5a9ec3d4f

View File

@@ -33,13 +33,14 @@ fn main() {
}
```
The `rpc!` macro generates a module in the current module. In the above example, the module is named `hello_service`. This module will contain a `Client` type, a `Service` trait, and a `serve` function. `serve` can be used to start a server listening on a tcp port. A `Client` can connect to such a service. Any type implementing the `Service` trait can be passed to `serve`. Any doc attributes on rpc items in the `service { }` block will appear as documentation on both the Service trait methods as well as on the Client's stub methods. These generated types are specific to the echo service, and make it easy and ergonomic to write servers without dealing with sockets or serialization directly. See the tarpc_examples package for more sophisticated examples.
The `rpc!` macro generates a module in the current module. In the above example, the module is named `hello_service`. This module will contain a `Client` type, a `Service` trait, and a `serve` function. `serve` can be used to start a server listening on a tcp port. A `Client` can connect to such a service. Any type implementing the `Service` trait can be passed to `serve`. These generated types are specific to the echo service, and make it easy and ergonomic to write servers without dealing with sockets or serialization directly. See the tarpc_examples package for more sophisticated examples.
## Additional Features
- Imports can be specified in an `item {}` block that appears above the `service {}` block.
- Attributes can be specified on rpc methods. These will be included on both the `Service` trait methods as well as on the `Client`'s stub methods.
## Planned Improvements (actively being worked on)
- [ ] Automatically reconnect on the client side when the connection cuts out.
- [ ] Allow omitting the return type in rpc definitions when the type is `()`.
- [x] Allow users to specify imports inside the `rpc!` macro
- [ ] Support arbitrary serialization (currently `bincode` is used for all serialization).
- [ ] Support asynchronous server implementations (currently thread per connection).
- [x] Support doc comments on rpc method definitions
- Automatically reconnect on the client side when the connection cuts out.
- Allow omitting the return type in rpc definitions when the type is `()`.
- Support arbitrary serialization (currently `bincode` is used for all serialization).
- Support asynchronous server implementations (currently thread per connection).