Structs§
- DupFlags
Non-WASI O_*constants for use withdup2.- Errno
errno—An error code.- FdFlags
FD_*constants for use withfcntl_getfdandfcntl_setfd.- IoSlice
Non-Windows - A buffer type used with
Write::write_vectored. - IoSlice
Mut Non-Windows - A buffer type used with
Read::read_vectored. - Read
Write Flags linux_kerneland non-Android RWF_*constants for use withpreadv2andpwritev2.
Functions§
- close⚠
close(raw_fd)—Closes aRawFddirectly.- dup
Non-Windows and non-WASI dup(fd)—Creates a newOwnedFdinstance that shares the same underlying file description asfd.- dup2
Non-Windows and non-WASI dup2(fd, new)—Changes the file description of a file descriptor.- dup3
Non-Windows and neither target_os=aixnortarget_os=espidfnortarget_os=horizonnortarget_os=ntonortarget_os=vitanor WASI dup3(fd, new, flags)—Changes the file description of a file descriptor, with flags.- fcntl_
dupfd_ cloexec Non-Windows and neither target_os=espidfnor WASI fcntl(fd, F_DUPFD_CLOEXEC)—Creates a newOwnedFdinstance, with value at leastmin, that hasO_CLOEXECset and that shares the same underlying file description asfd.- fcntl_
getfd Non-Windows fcntl(fd, F_GETFD)—Returns a file descriptor’s flags.- fcntl_
setfd Non-Windows fcntl(fd, F_SETFD, flags)—Sets a file descriptor’s flags.- ioctl_
fioclex appleorlinux_kernel ioctl(fd, FIOCLEX, NULL)—Set the close-on-exec flag.- ioctl_
fionbio ioctl(fd, FIONBIO, &value)—Enables or disables non-blocking mode.- ioctl_
fionclex appleorlinux_kernel ioctl(fd, FIONCLEX, NULL)—Remove the close-on-exec flag.- ioctl_
fionread Neither target_os=espidfnortarget_os=horizonnortarget_os=vita ioctl(fd, FIONREAD)—Returns the number of bytes ready to be read.- pread
Non-Windows pread(fd, buf, offset)—Reads from a file at a given position.- preadv
Neither Windows nor Cygwin nor target_os=espidfnor Haiku nortarget_os=horizonnortarget_os=ntonor Redox nor Solaris nortarget_os=vita preadv(fd, bufs, offset)—Reads from a file at a given position into multiple buffers.- preadv2
linux_kerneland non-Android preadv2(fd, bufs, offset, flags)—Reads data, with several options.- pwrite
Non-Windows pwrite(fd, bufs)—Writes to a file at a given position.- pwritev
Neither Windows nor Cygwin nor target_os=espidfnor Haiku nortarget_os=horizonnortarget_os=ntonor Redox nor Solaris nortarget_os=vita pwritev(fd, bufs, offset)—Writes to a file at a given position from multiple buffers.- pwritev2
linux_kerneland non-Android pwritev2(fd, bufs, offset, flags)—Writes data, with several options.- read
read(fd, buf)—Reads from a stream.- readv
Neither Windows nor target_os=espidfnortarget_os=horizon readv(fd, bufs)—Reads from a stream into multiple buffers.- retry_
on_ intr - Call
funtil it either succeeds or fails other thanErrno::INTR. - write
write(fd, buf)—Writes to a stream.- writev
Neither Windows nor target_os=espidfnortarget_os=horizon writev(fd, bufs)—Writes to a stream from multiple buffers.