mirror of
https://github.com/OMGeeky/tarpc.git
synced 2025-12-29 15:49:52 +01:00
Update README
This commit is contained in:
12
README.md
12
README.md
@@ -117,10 +117,10 @@ service! {
|
||||
struct HelloServer;
|
||||
|
||||
impl FutureService for HelloServer {
|
||||
type HelloFut = futures::Finished<String, Never>;
|
||||
type HelloFut = Result<String, Never>;
|
||||
|
||||
fn hello(&self, name: String) -> Self::HelloFut {
|
||||
futures::finished(format!("Hello, {}!", name))
|
||||
Ok(format!("Hello, {}!", name))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,10 +187,10 @@ service! {
|
||||
struct HelloServer;
|
||||
|
||||
impl FutureService for HelloServer {
|
||||
type HelloFut = futures::Finished<String, Never>;
|
||||
type HelloFut = Result<String, Never>;
|
||||
|
||||
fn hello(&mut self, name: String) -> Self::HelloFut {
|
||||
futures::finished(format!("Hello, {}!", name))
|
||||
Ok(format!("Hello, {}!", name))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,10 +264,10 @@ and the following future-based trait:
|
||||
|
||||
```rust
|
||||
impl FutureService for HelloServer {
|
||||
type HelloFut = futures::Finished<String, Message>;
|
||||
type HelloFut = Result<String, Message>;
|
||||
|
||||
fn hello(&mut self, name: String) -> Self::HelloFut {
|
||||
futures::finished(format!("Hello, {}!", name))
|
||||
Ok(format!("Hello, {}!", name))
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user