Module io

Source
Expand description

Runtime interface for IO-like operations.

Structs§

Endpoint
IoCtx
IoFlags
Possible flags for IO operations.

Enums§

EndpointKind
SeekFrom
Possible seek start points and offset.

Functions§

twz_rt_fd_pread
Read a file descriptor into a buffer, up to buf.len() bytes. On success, returns the number of bytes actually read, which may be fewer than requested.
twz_rt_fd_pread_from
Read a file descriptor into a buffer, up to buf.len() bytes. On success, returns the number of bytes actually read, which may be fewer than requested.
twz_rt_fd_preadv
Read a file descriptor into a multiple buffers. On success, returns the number of bytes actually read, which may be fewer than requested. If offset is None, use the file descriptor’s internal position. If the file descriptor refers to a non-seekable file, and offset is Some, this function returns an error.
twz_rt_fd_pwrite
Write bytes from a buffer into a file descriptor, up to buf.len() bytes. On success, returns the number of bytes actually written, which may be fewer than requested.
twz_rt_fd_pwrite_to
Write bytes from a buffer into a file descriptor, up to buf.len() bytes. On success, returns the number of bytes actually written, which may be fewer than requested.
twz_rt_fd_pwritev
Write multiple buffers into a file descriptor. On success, returns the number of bytes actually written, which may be fewer than requested. If offset is None, use the file descriptor’s internal position. If the file descriptor refers to a non-seekable file, and offset is Some, this function returns an error.
twz_rt_fd_seek
Seek a file descriptor, changing the internal position.

Type Aliases§

IoSlice
Type of an IO vec buffer and length.