mirror of
https://github.com/async-rs/async-std.git
synced 2025-01-30 01:05:31 +00:00
Clarify async fn return type
This commit is contained in:
parent
2ef1a762de
commit
7f9dae9e5f
1 changed files with 1 additions and 1 deletions
|
@ -102,7 +102,7 @@ While the `Future` trait has existed in Rust for a while, it was inconvenient to
|
|||
|
||||
Amazingly little difference, right? All we did is label the function `async` and insert 2 special commands: `.await`.
|
||||
|
||||
This function sets up a deferred computation. When this function is called, it will produce a `Future<Output=String>` instead of immediately returning a String. (Or, more precisely, generate a type for you that implements `Future<Output=String>`.)
|
||||
This function sets up a deferred computation. When this function is called, it will produce a `Future<Output=Result<String, io::Error>>` instead of immediately returning a `Result<String, io::Error>`. (Or, more precisely, generate a type for you that implements `Future<Output=Result<String, io::Error>>`.)
|
||||
|
||||
## What does `.await` do?
|
||||
|
||||
|
|
Loading…
Reference in a new issue