Module posish::io[][src]

Expand description

I/O operations.

Structs

Error

The error type for posish APIs.

PipeFlags

O_* constants for use with pipe2.

PollFd

pollfd

PollFdVec

A Vec of pollfd.

PollFlags

POLL*

UserFaultFdFlags

The O_* flags accepted by userfaultfd.

Constants

ICANON

Re-export ICANON.

PIPE_BUF

Re-export PIPE_BUF.

Functions

dup

dup(fd)

ioctl_fionread

ioctl(fd, FIONREAD).

ioctl_tcgets

ioctl(fd, TCGETS)

ioctl_tiocgwinsz

ioctl(fd, TIOCGWINSZ).

is_read_write

Returns a pair of booleans indicating whether the file descriptor is readable and/or writeable, respectively. Unlike is_file_read_write, this correctly detects whether sockets have been shutdown, partially or completely.

isatty

isatty(fd)

pipe2

pipe2(flags)

pread

pread(fd, buf.as_ptr(), bufs.len(), offset)

preadv

preadv(fd, bufs.as_ptr(), bufs.len(), offset)

preadv2

preadv2(fd, bufs.as_ptr(), bufs.len(), offset, flags)

pwrite

pwrite(fd, bufs.as_ptr(), bufs.len())

pwritev

pwritev(fd, bufs.as_ptr(), bufs.len(), offset)

pwritev2

pwritev2(fd, bufs.as_ptr(), bufs.len(), offset, flags)

read

read(fd, buf.as_ptr(), buf.len())

readv

readv(fd, bufs.as_ptr(), bufs.len())

ttyname

ttyname_r(fd)

userfaultfd

userfaultfd(flags)

write

write(fd, buf.ptr(), buf.len())

writev

writev(fd, bufs.as_ptr(), bufs.len())

Type Definitions

Result

A specialized Result type for posish APIs.

Termios

Re-export termios.

Winsize

Re-export winsize.