Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions wit-0.3.0-draft/types.wit
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,15 @@ interface types {
/// Multiple read, write, and append streams may be active on the same open
/// file and they do not interfere with each other.
///
/// This function returns a future, which will resolve to an error code if
/// reading full contents of the file fails.
/// This function returns a `stream` which provides the data received from the
/// file, and a `future` providing additional error information in case an
/// error is encountered.
///
/// If no error is encountered, `stream.read` on the `stream` will return
/// `read-status::closed` with no `error-context` and the future resolves to
/// the value `ok`. If an error is encountered, `stream.read` on the
/// `stream` returns `read-status::closed` with an `error-context` and the future
/// resolves to `err` with an `error-code`.
///
/// Note: This is similar to `pread` in POSIX.
@since(version = 0.3.0)
Expand Down