WasiIo
5 types25 functionsThe wasi:io streams, errors and pollables WASI 0.2 interfaces pass around,
shared by WasiCli and the other wasip2 modules that read and write streams.
Every handle here is owned by whoever received it and is dropped explicitly.
At a glance
Types
@InputStream
The input-stream resource of wasi:io/streams@0.2.3, as a handle. It
comes only from the functions here that return one. Release it with
dropInputStream.
@OutputStream
The output-stream resource of wasi:io/streams@0.2.3, as a handle. It
comes only from the functions here that return one. Release it with
dropOutputStream.
@Error
The error resource of wasi:io/error@0.2.3, as a handle. It comes only
from the functions here that return one. Release it with
dropError.
@Pollable
The pollable resource of wasi:io/poll@0.2.3, as a handle. It comes only
from the functions here that return one. Release it with
dropPollable.
StreamError
The view of WIT's stream-error type, from wasi:io/streams@0.2.3.
Functions
writeAll
Write all of bytes to out, in chunks blocking-write-and-flush accepts,
and say whether it all went. A stream that fails or closes drops the rest;
its error is dropped too.
writeAllResult
Write all of bytes to out, in chunks blocking-write-and-flush accepts.
A stream that fails or closes drops the rest and answers the stream's error,
whose @Error the caller then owns and drops.
dropInputStream
Drops the input-stream handle, from wasi:io/streams@0.2.3. Nothing else
releases it, and the handle is not used after.
dropOutputStream
Drops the output-stream handle, from wasi:io/streams@0.2.3. Nothing else
releases it, and the handle is not used after.
errorToDebugString
WIT's error.to-debug-string method, from wasi:io/error@0.2.3, in Bert's
view of its types.
dropError
Drops the error handle, from wasi:io/error@0.2.3. Nothing else releases
it, and the handle is not used after.
pollableReady
WIT's pollable.ready method, from wasi:io/poll@0.2.3, in Bert's view of
its types.
pollableBlock
WIT's pollable.block method, from wasi:io/poll@0.2.3, in Bert's view of
its types.
poll
WIT's poll function, from wasi:io/poll@0.2.3, in Bert's view of its
types.
dropPollable
Drops the pollable handle, from wasi:io/poll@0.2.3. Nothing else
releases it, and the handle is not used after.
inputStreamRead
WIT's input-stream.read method, from wasi:io/streams@0.2.3, in Bert's
view of its types.
inputStreamBlockingRead
WIT's input-stream.blocking-read method, from wasi:io/streams@0.2.3, in
Bert's view of its types.
inputStreamSkip
WIT's input-stream.skip method, from wasi:io/streams@0.2.3, in Bert's
view of its types.
inputStreamBlockingSkip
WIT's input-stream.blocking-skip method, from wasi:io/streams@0.2.3, in
Bert's view of its types.
inputStreamSubscribe
WIT's input-stream.subscribe method, from wasi:io/streams@0.2.3, in
Bert's view of its types.
outputStreamCheckWrite
WIT's output-stream.check-write method, from wasi:io/streams@0.2.3, in
Bert's view of its types.
outputStreamWrite
WIT's output-stream.write method, from wasi:io/streams@0.2.3, in Bert's
view of its types.
outputStreamBlockingWriteAndFlush
At most 4096 bytes a call; more traps.
outputStreamFlush
WIT's output-stream.flush method, from wasi:io/streams@0.2.3, in Bert's
view of its types.
outputStreamBlockingFlush
WIT's output-stream.blocking-flush method, from wasi:io/streams@0.2.3,
in Bert's view of its types.
outputStreamSubscribe
WIT's output-stream.subscribe method, from wasi:io/streams@0.2.3, in
Bert's view of its types.
outputStreamWriteZeroes
WIT's output-stream.write-zeroes method, from wasi:io/streams@0.2.3, in
Bert's view of its types.
outputStreamBlockingWriteZeroesAndFlush
WIT's output-stream.blocking-write-zeroes-and-flush method, from
wasi:io/streams@0.2.3, in Bert's view of its types.
outputStreamSplice
WIT's output-stream.splice method, from wasi:io/streams@0.2.3, in Bert's
view of its types.
outputStreamBlockingSplice
WIT's output-stream.blocking-splice method, from wasi:io/streams@0.2.3,
in Bert's view of its types.