Module io

Module io 

Source
Expand description

Async IO abstractions.

Re-exports§

pub use crate::runtime::AsyncPollable;

Structs§

AsyncInputByteStream
Wrapper of AsyncInputStream that impls futures_lite::stream::Stream with item Result<u8, std::io::Error>.
AsyncInputChunkStream
Wrapper of AsyncInputStream that impls futures_lite::stream::Stream with an item of Result<Vec<u8>, std::io::Error>
AsyncInputStream
A wrapper for WASI’s InputStream resource that provides implementations of AsyncRead and AsyncPollable.
AsyncOutputStream
A wrapper for WASI’s output-stream resource that provides implementations of AsyncWrite and AsyncPollable.
Cursor
A Cursor wraps an in-memory buffer and provides it with a AsyncSeek implementation.
Empty
Error
The error type for I/O operations.
Stderr
Use the program’s stdout as an AsyncOutputStream.
Stdin
Use the program’s stdin as an AsyncInputStream.
Stdout
Use the program’s stdout as an AsyncOutputStream.

Enums§

SeekFrom
Enumeration of possible methods to seek within an I/O object.

Traits§

AsyncRead
Read bytes from a source.
AsyncSeek
The Seek trait provides a cursor which can be moved within a stream of bytes.
AsyncWrite
Write bytes to a sink.

Functions§

copy
Copy bytes from a reader to a writer.
empty
Creates a value that is always at EOF for reads, and ignores all data written.
stderr
Get the program’s stdout for use as an AsyncOutputStream.
stdin
Get the program’s stdin for use as an AsyncInputStream.
stdout
Get the program’s stdout for use as an AsyncOutputStream.

Type Aliases§

Result
A specialized Result type for I/O operations.