Structs§
- DupFlags
O_*constants for use withdup2.- Errno
errno—An error code.- FdFlags
FD_*constants for use withfcntl_getfdandfcntl_setfd.- IoSlice
- A buffer type used with
Write::write_vectored. - IoSlice
Mut - A buffer type used with
Read::read_vectored.
Functions§
- close⚠
close(raw_fd)—Closes aRawFddirectly.- dup
dup(fd)—Creates a newOwnedFdinstance that shares the same underlying file description asfd.- dup2
dup2(fd, new)—Changes the file description of a file descriptor.- dup3
dup3(fd, new, flags)—Changes the file description of a file descriptor, with flags.- fcntl_
dupfd_ cloexec 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 fcntl(fd, F_GETFD)—Returns a file descriptor’s flags.- fcntl_
setfd fcntl(fd, F_SETFD, flags)—Sets a file descriptor’s flags.- ioctl_
fionbio ioctl(fd, FIONBIO, &value)—Enables or disables non-blocking mode.- ioctl_
fionread ioctl(fd, FIONREAD)—Returns the number of bytes ready to be read.- pread
pread(fd, buf, offset)—Reads from a file at a given position.- preadv
preadv(fd, bufs, offset)—Reads from a file at a given position into multiple buffers.- pwrite
pwrite(fd, bufs)—Writes to a file at a given position.- pwritev
pwritev(fd, bufs, offset)—Writes to a file at a given position from multiple buffers.- read
read(fd, buf)—Reads from a stream.- readv
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
writev(fd, bufs)—Writes to a stream from multiple buffers.