rustix

Module io

Source
Expand description

I/O operations.

If you’re looking for SeekFrom, that’s in the fs module.

Structs§

Functions§

  • close(raw_fd)—Closes a RawFd directly.
  • dup(fd)—Creates a new OwnedFd instance that shares the same underlying file description as fd.
  • dup2(fd, new)—Changes the file description of a file descriptor.
  • dup3(fd, new, flags)—Changes the file description of a file descriptor, with flags.
  • fcntl(fd, F_DUPFD_CLOEXEC)—Creates a new OwnedFd instance, with value at least min, that has O_CLOEXEC set and that shares the same underlying file description as fd.
  • fcntl(fd, F_GETFD)—Returns a file descriptor’s flags.
  • fcntl(fd, F_SETFD, flags)—Sets a file descriptor’s flags.
  • ioctl(fd, FIONBIO, &value)—Enables or disables non-blocking mode.
  • ioctl(fd, FIONREAD)—Returns the number of bytes ready to be read.
  • pread(fd, buf, offset)—Reads from a file at a given position.
  • pread(fd, buf, offset)—Reads from a file at a given position.
  • preadv(fd, bufs, offset)—Reads from a file at a given position into multiple buffers.
  • preadv2(fd, bufs, offset, flags)—Reads data, with several options.
  • pwrite(fd, bufs)—Writes to a file at a given position.
  • pwritev(fd, bufs, offset)—Writes to a file at a given position from multiple buffers.
  • pwritev2(fd, bufs, offset, flags)—Writes data, with several options.
  • read(fd, buf)—Reads from a stream.
  • read(fd, buf)—Reads from a stream.
  • readv(fd, bufs)—Reads from a stream into multiple buffers.
  • Call f until it either succeeds or fails other than Errno::INTR.
  • write(fd, buf)—Writes to a stream.
  • writev(fd, bufs)—Writes to a stream from multiple buffers.

Type Aliases§