diff --git a/command.md b/command.md index 2a6139c..f1b5188 100644 --- a/command.md +++ b/command.md @@ -2,43 +2,43 @@
wasi:cli/environment@0.2.6wasi:cli/exit@0.2.6wasi:io/error@0.2.6wasi:io/poll@0.2.6wasi:io/streams@0.2.6wasi:cli/stdin@0.2.6wasi:cli/stdout@0.2.6wasi:cli/stderr@0.2.6wasi:cli/terminal-input@0.2.6wasi:cli/terminal-output@0.2.6wasi:cli/terminal-stdin@0.2.6wasi:cli/terminal-stdout@0.2.6wasi:cli/terminal-stderr@0.2.6wasi:clocks/monotonic-clock@0.2.6wasi:clocks/wall-clock@0.2.6wasi:clocks/timezone@0.2.6wasi:filesystem/types@0.2.6wasi:filesystem/preopens@0.2.6wasi:sockets/network@0.2.6wasi:sockets/instance-network@0.2.6wasi:sockets/udp@0.2.6wasi:sockets/udp-create-socket@0.2.6wasi:sockets/tcp@0.2.6wasi:sockets/tcp-create-socket@0.2.6wasi:sockets/ip-name-lookup@0.2.6wasi:random/random@0.2.6wasi:random/insecure@0.2.6wasi:random/insecure-seed@0.2.6wasi:cli/environment@0.2.7wasi:cli/exit@0.2.7wasi:io/error@0.2.7wasi:io/poll@0.2.7wasi:io/streams@0.2.7wasi:cli/stdin@0.2.7wasi:cli/stdout@0.2.7wasi:cli/stderr@0.2.7wasi:cli/terminal-input@0.2.7wasi:cli/terminal-output@0.2.7wasi:cli/terminal-stdin@0.2.7wasi:cli/terminal-stdout@0.2.7wasi:cli/terminal-stderr@0.2.7wasi:clocks/monotonic-clock@0.2.7wasi:clocks/wall-clock@0.2.7wasi:clocks/timezone@0.2.7wasi:filesystem/types@0.2.7wasi:filesystem/preopens@0.2.7wasi:sockets/network@0.2.7wasi:sockets/instance-network@0.2.7wasi:sockets/udp@0.2.7wasi:sockets/udp-create-socket@0.2.7wasi:sockets/tcp@0.2.7wasi:sockets/tcp-create-socket@0.2.7wasi:sockets/ip-name-lookup@0.2.7wasi:random/random@0.2.7wasi:random/insecure@0.2.7wasi:random/insecure-seed@0.2.7wasi:cli/run@0.2.6wasi:cli/run@0.2.7get-environment: func. as shorthand for this.
-exit: funcresource errorA poll API intended to let users wait for I/O events on multiple handles at once.
WASI I/O is an I/O abstraction API which is currently focused on providing stream types.
In the future, the component model is expected to add built-in stream types; @@ -344,25 +344,13 @@ the last call to check-write provided a permit.
[method]output-stream.blocking-write-and-flush: funcPerform a write of up to 4096 bytes, and then flush the stream. Block until all of these operations are complete, or an error occurs.
-This is a convenience wrapper around the use of check-write,
-subscribe, write, and flush, and is implemented with the
-following pseudo-code:
let pollable = this.subscribe();
-while !contents.is_empty() {
- // Wait for the stream to become writable
- pollable.block();
- let Ok(n) = this.check-write(); // eliding error handling
- let len = min(n, contents.len());
- let (chunk, rest) = contents.split_at(len);
- this.write(chunk ); // eliding error handling
- contents = rest;
-}
-this.flush();
-// Wait for completion of `flush`
-pollable.block();
-// Check for any errors that arose during `flush`
-let _ = this.check-write(); // eliding error handling
-
+Returns success when all of the contents written are successfully +flushed to output. If an error occurs at any point before all +contents are successfully flushed, that error is returned as soon as +possible. If writing and flushing the complete contents causes the +stream to become closed, this call should return success, and +subsequent calls to check-write or other interfaces should return +stream-error::closed.
self: borrow<output-stream>Perform a write of up to 4096 zeroes, and then flush the stream. Block until all of these operations are complete, or an error occurs.
-This is a convenience wrapper around the use of check-write,
-subscribe, write-zeroes, and flush, and is implemented with
-the following pseudo-code:
let pollable = this.subscribe();
-while num_zeroes != 0 {
- // Wait for the stream to become writable
- pollable.block();
- let Ok(n) = this.check-write(); // eliding error handling
- let len = min(n, num_zeroes);
- this.write-zeroes(len); // eliding error handling
- num_zeroes -= len;
-}
-this.flush();
-// Wait for completion of `flush`
-pollable.block();
-// Check for any errors that arose during `flush`
-let _ = this.check-write(); // eliding error handling
-
+Functionality is equivelant to blocking-write-and-flush with
+contents given as a list of len containing only zeroes.
self: borrow<output-stream>splice.
u64, stream-error>type input-streamsplice.
input-stream>type output-streamsplice.
output-stream>type output-streamsplice.
output-stream>Terminal input.
In the future, this may include functions for disabling echoing, disabling input buffering so that keyboard events are sent through @@ -549,7 +521,7 @@ immediately, querying supported features, and so on.
resource terminal-inputThe input side of a terminal.
-Terminal output.
In the future, this may include functions for querying the terminal size, being notified of terminal size changes, querying supported @@ -558,7 +530,7 @@ features, and so on.
resource terminal-outputThe output side of a terminal.
-An interface providing an optional terminal-input for stdin as a
link-time authority.
terminal-input>>An interface providing an optional terminal-output for stdout as a
link-time authority.
terminal-output>>An interface providing an optional terminal-output for stderr as a
link-time authority.
terminal-output>>WASI Monotonic Clock is a clock API intended to let users measure elapsed time.
It is intended to be portable at least between Unix-family platforms and @@ -668,7 +640,7 @@ elapsed from the time this function is invoked.
pollable>WASI Wall Clock is a clock API intended to let users query the current time. The name "wall" makes an analogy to a "clock on the wall", which is not necessarily monotonic as it may be reset.
@@ -709,7 +681,7 @@ also known as Unix Time. -type datetimeWASI filesystem is a filesystem API primarily intended to let users run WASI programs that access their files on their existing filesystems, without significant overhead.
@@ -1652,7 +1624,7 @@ errors are filesystem-related errors.error-code>type descriptordescriptor>, string)>type errorerror-code>This interface provides a value-export of the default network handle..
network>type pollablefuture is natively supported in Pre
pollable>type networkudp-socket>, error-code>type input-streamok.
error-code>type networktcp-socket>, error-code>type pollablefuture is natively supported in Pre
pollable>WASI Random is a random data API.
It is intended to be portable at least between Unix-family platforms and Windows.
@@ -3104,7 +3076,7 @@ represented as au64.
-The insecure interface for insecure pseudo-random numbers.
It is intended to be portable at least between Unix-family platforms and Windows.
@@ -3133,7 +3105,7 @@ a long period. -The insecure-seed interface for seeding hash-map DoS resistance.
It is intended to be portable at least between Unix-family platforms and Windows.
@@ -3157,7 +3129,7 @@ protection. -run: funcwasi:cli/environment@0.2.6wasi:cli/exit@0.2.6wasi:io/error@0.2.6wasi:io/poll@0.2.6wasi:io/streams@0.2.6wasi:cli/stdin@0.2.6wasi:cli/stdout@0.2.6wasi:cli/stderr@0.2.6wasi:cli/terminal-input@0.2.6wasi:cli/terminal-output@0.2.6wasi:cli/terminal-stdin@0.2.6wasi:cli/terminal-stdout@0.2.6wasi:cli/terminal-stderr@0.2.6wasi:clocks/monotonic-clock@0.2.6wasi:clocks/wall-clock@0.2.6wasi:clocks/timezone@0.2.6wasi:filesystem/types@0.2.6wasi:filesystem/preopens@0.2.6wasi:sockets/network@0.2.6wasi:sockets/instance-network@0.2.6wasi:sockets/udp@0.2.6wasi:sockets/udp-create-socket@0.2.6wasi:sockets/tcp@0.2.6wasi:sockets/tcp-create-socket@0.2.6wasi:sockets/ip-name-lookup@0.2.6wasi:random/random@0.2.6wasi:random/insecure@0.2.6wasi:random/insecure-seed@0.2.6wasi:cli/environment@0.2.7wasi:cli/exit@0.2.7wasi:io/error@0.2.7wasi:io/poll@0.2.7wasi:io/streams@0.2.7wasi:cli/stdin@0.2.7wasi:cli/stdout@0.2.7wasi:cli/stderr@0.2.7wasi:cli/terminal-input@0.2.7wasi:cli/terminal-output@0.2.7wasi:cli/terminal-stdin@0.2.7wasi:cli/terminal-stdout@0.2.7wasi:cli/terminal-stderr@0.2.7wasi:clocks/monotonic-clock@0.2.7wasi:clocks/wall-clock@0.2.7wasi:clocks/timezone@0.2.7wasi:filesystem/types@0.2.7wasi:filesystem/preopens@0.2.7wasi:sockets/network@0.2.7wasi:sockets/instance-network@0.2.7wasi:sockets/udp@0.2.7wasi:sockets/udp-create-socket@0.2.7wasi:sockets/tcp@0.2.7wasi:sockets/tcp-create-socket@0.2.7wasi:sockets/ip-name-lookup@0.2.7wasi:random/random@0.2.7wasi:random/insecure@0.2.7wasi:random/insecure-seed@0.2.7get-environment: func. as shorthand for this.
-exit: funcresource errorA poll API intended to let users wait for I/O events on multiple handles at once.
WASI I/O is an I/O abstraction API which is currently focused on providing stream types.
In the future, the component model is expected to add built-in stream types; @@ -339,25 +339,13 @@ the last call to check-write provided a permit.
[method]output-stream.blocking-write-and-flush: funcPerform a write of up to 4096 bytes, and then flush the stream. Block until all of these operations are complete, or an error occurs.
-This is a convenience wrapper around the use of check-write,
-subscribe, write, and flush, and is implemented with the
-following pseudo-code:
let pollable = this.subscribe();
-while !contents.is_empty() {
- // Wait for the stream to become writable
- pollable.block();
- let Ok(n) = this.check-write(); // eliding error handling
- let len = min(n, contents.len());
- let (chunk, rest) = contents.split_at(len);
- this.write(chunk ); // eliding error handling
- contents = rest;
-}
-this.flush();
-// Wait for completion of `flush`
-pollable.block();
-// Check for any errors that arose during `flush`
-let _ = this.check-write(); // eliding error handling
-
+Returns success when all of the contents written are successfully +flushed to output. If an error occurs at any point before all +contents are successfully flushed, that error is returned as soon as +possible. If writing and flushing the complete contents causes the +stream to become closed, this call should return success, and +subsequent calls to check-write or other interfaces should return +stream-error::closed.
self: borrow<output-stream>Perform a write of up to 4096 zeroes, and then flush the stream. Block until all of these operations are complete, or an error occurs.
-This is a convenience wrapper around the use of check-write,
-subscribe, write-zeroes, and flush, and is implemented with
-the following pseudo-code:
let pollable = this.subscribe();
-while num_zeroes != 0 {
- // Wait for the stream to become writable
- pollable.block();
- let Ok(n) = this.check-write(); // eliding error handling
- let len = min(n, num_zeroes);
- this.write-zeroes(len); // eliding error handling
- num_zeroes -= len;
-}
-this.flush();
-// Wait for completion of `flush`
-pollable.block();
-// Check for any errors that arose during `flush`
-let _ = this.check-write(); // eliding error handling
-
+Functionality is equivelant to blocking-write-and-flush with
+contents given as a list of len containing only zeroes.
self: borrow<output-stream>splice.
u64, stream-error>type input-streamsplice.
input-stream>type output-streamsplice.
output-stream>type output-streamsplice.
output-stream>Terminal input.
In the future, this may include functions for disabling echoing, disabling input buffering so that keyboard events are sent through @@ -544,7 +516,7 @@ immediately, querying supported features, and so on.
resource terminal-inputThe input side of a terminal.
-Terminal output.
In the future, this may include functions for querying the terminal size, being notified of terminal size changes, querying supported @@ -553,7 +525,7 @@ features, and so on.
resource terminal-outputThe output side of a terminal.
-An interface providing an optional terminal-input for stdin as a
link-time authority.
terminal-input>>An interface providing an optional terminal-output for stdout as a
link-time authority.
terminal-output>>An interface providing an optional terminal-output for stderr as a
link-time authority.
terminal-output>>WASI Monotonic Clock is a clock API intended to let users measure elapsed time.
It is intended to be portable at least between Unix-family platforms and @@ -663,7 +635,7 @@ elapsed from the time this function is invoked.
pollable>WASI Wall Clock is a clock API intended to let users query the current time. The name "wall" makes an analogy to a "clock on the wall", which is not necessarily monotonic as it may be reset.
@@ -704,7 +676,7 @@ also known as Unix Time. -type datetimeWASI filesystem is a filesystem API primarily intended to let users run WASI programs that access their files on their existing filesystems, without significant overhead.
@@ -1647,7 +1619,7 @@ errors are filesystem-related errors.error-code>type descriptordescriptor>, string)>type errorerror-code>This interface provides a value-export of the default network handle..
network>type pollablefuture is natively supported in Pre
pollable>type networkudp-socket>, error-code>type input-streamok.
error-code>type networktcp-socket>, error-code>type pollablefuture is natively supported in Pre
pollable>WASI Random is a random data API.
It is intended to be portable at least between Unix-family platforms and Windows.
@@ -3099,7 +3071,7 @@ represented as au64.
-The insecure interface for insecure pseudo-random numbers.
It is intended to be portable at least between Unix-family platforms and Windows.
@@ -3128,7 +3100,7 @@ a long period. -The insecure-seed interface for seeding hash-map DoS resistance.
It is intended to be portable at least between Unix-family platforms and Windows.
diff --git a/wit/command.wit b/wit/command.wit index 6d3cc83..dfecf91 100644 --- a/wit/command.wit +++ b/wit/command.wit @@ -1,4 +1,4 @@ -package wasi:cli@0.2.6; +package wasi:cli@0.2.7; @since(version = 0.2.0) world command { diff --git a/wit/deps.lock b/wit/deps.lock index edb4038..dc0c862 100644 --- a/wit/deps.lock +++ b/wit/deps.lock @@ -1,24 +1,24 @@ [clocks] -sha256 = "59b8db7b6f3f8a72418510453c1fa9e437c7c7c2369c0bd5da83aa5d6d1d9b73" -sha512 = "06ce14bbf34d5588ed0c26bd932d46b3025c16723d5b4558def5b8107781b2251471c1f7170640342e3d4f78efb560d5ff6383c6a127c1d9e757e83db31a0185" +sha256 = "d0a8d048c41b566b978cd8ecd03fa51ec1f65af4c26be2f0fc9cfdd7dd6f34f3" +sha512 = "8d1c9ddaaea70ae54376bfc02dcdd0437336fb4fc67f89763ce09540caefe84cbae89a8de3605aa7613c49188636e925047bcd150c2c60685850095fefb68b73" [filesystem] -url = "https://github.com/WebAssembly/wasi-filesystem/archive/v0.2.6.tar.gz" -sha256 = "9eb3e27ea559c679e9fb3c775a7091efedd0dc52aec56d7cd28caba36a76309c" -sha512 = "4207a911dd647ecbe82727af2145d88fc536f013ef76fc173d7d07729c71e9ff8c08ce911f25fa8511705d62e60d4888c5cc43d498cd3753b164bbe1be2d3a55" +url = "https://github.com/WebAssembly/wasi-filesystem/archive/v0.2.7.tar.gz" +sha256 = "55942d9c31ed62d05d32d62d211a5c93983df7c0f1489124ca120cf58c4d61c0" +sha512 = "1250a19334ad6acf18adead4503f22c99bfbca7cfb7267431547d4bcca34f91e9635648d00f064276086887a9c80ffacbf68bee832b9e4cd1c921bec0776717f" deps = ["clocks", "io"] [io] -sha256 = "671761f464d312e6c26bcaab5e79fe14ac876b72267867579d5c65e053fe2301" -sha512 = "57e5ed34fa85f35899b324ac7a2473c5fa5cece51d07e6f077637191fadd3c8b6f79324d31a8d497a6ce7b92cfb2a2505ab894337e2c82889f1bdb21f4f24634" +sha256 = "62ae80f2e340cddbac8e94f78e6270735aea536367ecb98de5f4ac6aef66b5c4" +sha512 = "a02a1ebd261ae884b0315b3528d1a93819ddc4b616f66c77f2bea9dd1de888208dc3b9004a553363f5e8491ea925d65ebbd0d68eaa87238316b47469a3bf97bb" [random] -url = "https://github.com/WebAssembly/wasi-random/archive/v0.2.6.tar.gz" -sha256 = "5fc77fdcbf6fc236250c5ba32149ea2fde7a8191696d9a4ed3931bb07202bcc0" -sha512 = "1f3be8d65185552abad4532ed4603643b3f9eed1847d4c1acaec107964701990f18b1a036dcdccead85c29f037f272b3d1ce300c6e4316002b36431c04c00abd" +url = "https://github.com/WebAssembly/wasi-random/archive/v0.2.7.tar.gz" +sha256 = "168a5a22cfc489bbde2a2ce38d3a20b5c418fb099d3993196fca2129f8e9bfc0" +sha512 = "1641fed653abe0991cdeee330bf6d3f6e17b9d2b3b9766588c792f181e8133727efa20feb41d0f325e3db8158ce51948c2d6648e02e8998df8eba3c88959bfca" [sockets] -url = "https://github.com/WebAssembly/wasi-sockets/archive/v0.2.6.tar.gz" -sha256 = "4f98b623cb6ff6f02c2975cea615fa36de2087dc48e76c4865e0297499c005a1" -sha512 = "cf72b97c46913e752dff2d1c93d2c9bd87210d5714fe43d4eb93fb7512b1c786737e69b444521e77725e12a2689673da786bd0f3f94ce77bf7772671637d7878" +url = "https://github.com/WebAssembly/wasi-sockets/archive/v0.2.7.tar.gz" +sha256 = "33b150bb413c6f4e2ab1ab12b6da822d6c712f13a0644177b108f57dff5783d6" +sha512 = "47efa2fea61374da2853b4ff2aed394b54c8e1d164ce6706332bd1056a16c2eb0a8d7c0ab5408a8b08537b615197ff4a44bdb5d132772a8d6049de5c39ec5e68" deps = ["clocks", "io"] diff --git a/wit/deps.toml b/wit/deps.toml index f7a7430..fd5a701 100644 --- a/wit/deps.toml +++ b/wit/deps.toml @@ -1,3 +1,3 @@ -filesystem = "https://github.com/WebAssembly/wasi-filesystem/archive/v0.2.6.tar.gz" -random = "https://github.com/WebAssembly/wasi-random/archive/v0.2.6.tar.gz" -sockets = "https://github.com/WebAssembly/wasi-sockets/archive/v0.2.6.tar.gz" +filesystem = "https://github.com/WebAssembly/wasi-filesystem/archive/v0.2.7.tar.gz" +random = "https://github.com/WebAssembly/wasi-random/archive/v0.2.7.tar.gz" +sockets = "https://github.com/WebAssembly/wasi-sockets/archive/v0.2.7.tar.gz" diff --git a/wit/deps/clocks/monotonic-clock.wit b/wit/deps/clocks/monotonic-clock.wit index f3bc839..98a9ad4 100644 --- a/wit/deps/clocks/monotonic-clock.wit +++ b/wit/deps/clocks/monotonic-clock.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.6; +package wasi:clocks@0.2.7; /// WASI Monotonic Clock is a clock API intended to let users measure elapsed /// time. /// @@ -10,7 +10,7 @@ package wasi:clocks@0.2.6; @since(version = 0.2.0) interface monotonic-clock { @since(version = 0.2.0) - use wasi:io/poll@0.2.6.{pollable}; + use wasi:io/poll@0.2.7.{pollable}; /// An instant in time, in nanoseconds. An instant is relative to an /// unspecified initial value, and can only be compared to instances from diff --git a/wit/deps/clocks/timezone.wit b/wit/deps/clocks/timezone.wit index ca98ad1..4740bde 100644 --- a/wit/deps/clocks/timezone.wit +++ b/wit/deps/clocks/timezone.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.6; +package wasi:clocks@0.2.7; @unstable(feature = clocks-timezone) interface timezone { diff --git a/wit/deps/clocks/wall-clock.wit b/wit/deps/clocks/wall-clock.wit index 76636a0..2179b6c 100644 --- a/wit/deps/clocks/wall-clock.wit +++ b/wit/deps/clocks/wall-clock.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.6; +package wasi:clocks@0.2.7; /// WASI Wall Clock is a clock API intended to let users query the current /// time. The name "wall" makes an analogy to a "clock on the wall", which /// is not necessarily monotonic as it may be reset. diff --git a/wit/deps/clocks/world.wit b/wit/deps/clocks/world.wit index 5c53c51..a08ff2c 100644 --- a/wit/deps/clocks/world.wit +++ b/wit/deps/clocks/world.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.6; +package wasi:clocks@0.2.7; @since(version = 0.2.0) world imports { diff --git a/wit/deps/filesystem/preopens.wit b/wit/deps/filesystem/preopens.wit index f228479..b1a0a99 100644 --- a/wit/deps/filesystem/preopens.wit +++ b/wit/deps/filesystem/preopens.wit @@ -1,4 +1,4 @@ -package wasi:filesystem@0.2.6; +package wasi:filesystem@0.2.7; @since(version = 0.2.0) interface preopens { diff --git a/wit/deps/filesystem/types.wit b/wit/deps/filesystem/types.wit index 75c1904..a7da2b7 100644 --- a/wit/deps/filesystem/types.wit +++ b/wit/deps/filesystem/types.wit @@ -1,4 +1,4 @@ -package wasi:filesystem@0.2.6; +package wasi:filesystem@0.2.7; /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead. @@ -26,9 +26,9 @@ package wasi:filesystem@0.2.6; @since(version = 0.2.0) interface types { @since(version = 0.2.0) - use wasi:io/streams@0.2.6.{input-stream, output-stream, error}; + use wasi:io/streams@0.2.7.{input-stream, output-stream, error}; @since(version = 0.2.0) - use wasi:clocks/wall-clock@0.2.6.{datetime}; + use wasi:clocks/wall-clock@0.2.7.{datetime}; /// File size or length of a region within a file. @since(version = 0.2.0) diff --git a/wit/deps/filesystem/world.wit b/wit/deps/filesystem/world.wit index 65597f9..67309b4 100644 --- a/wit/deps/filesystem/world.wit +++ b/wit/deps/filesystem/world.wit @@ -1,4 +1,4 @@ -package wasi:filesystem@0.2.6; +package wasi:filesystem@0.2.7; @since(version = 0.2.0) world imports { diff --git a/wit/deps/io/error.wit b/wit/deps/io/error.wit index 784f74a..acab3a8 100644 --- a/wit/deps/io/error.wit +++ b/wit/deps/io/error.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.6; +package wasi:io@0.2.7; @since(version = 0.2.0) interface error { diff --git a/wit/deps/io/poll.wit b/wit/deps/io/poll.wit index 7f71183..a525164 100644 --- a/wit/deps/io/poll.wit +++ b/wit/deps/io/poll.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.6; +package wasi:io@0.2.7; /// A poll API intended to let users wait for I/O events on multiple handles /// at once. diff --git a/wit/deps/io/streams.wit b/wit/deps/io/streams.wit index c5da38c..7ae29a3 100644 --- a/wit/deps/io/streams.wit +++ b/wit/deps/io/streams.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.6; +package wasi:io@0.2.7; /// WASI I/O is an I/O abstraction API which is currently focused on providing /// stream types. @@ -154,27 +154,13 @@ interface streams { /// Perform a write of up to 4096 bytes, and then flush the stream. Block /// until all of these operations are complete, or an error occurs. /// - /// This is a convenience wrapper around the use of `check-write`, - /// `subscribe`, `write`, and `flush`, and is implemented with the - /// following pseudo-code: - /// - /// ```text - /// let pollable = this.subscribe(); - /// while !contents.is_empty() { - /// // Wait for the stream to become writable - /// pollable.block(); - /// let Ok(n) = this.check-write(); // eliding error handling - /// let len = min(n, contents.len()); - /// let (chunk, rest) = contents.split_at(len); - /// this.write(chunk ); // eliding error handling - /// contents = rest; - /// } - /// this.flush(); - /// // Wait for completion of `flush` - /// pollable.block(); - /// // Check for any errors that arose during `flush` - /// let _ = this.check-write(); // eliding error handling - /// ``` + /// Returns success when all of the contents written are successfully + /// flushed to output. If an error occurs at any point before all + /// contents are successfully flushed, that error is returned as soon as + /// possible. If writing and flushing the complete contents causes the + /// stream to become closed, this call should return success, and + /// subsequent calls to check-write or other interfaces should return + /// stream-error::closed. @since(version = 0.2.0) blocking-write-and-flush: func( contents: list