Module posish::io[][src]

Expand description

I/O operations.

Structs

DupFlags

O_* constants for use with dup2.

Error

The error type for posish APIs.

MapFlags

MAP_* flags for use with mmap.

PipeFlags

O_* constants for use with pipe2.

PollFd

struct pollfd

PollFdVec

A Vec of pollfd.

PollFlags

POLL*

ProtFlags

PROT_* flags for use with mmap.

UserFaultFdFlags

The O_* flags accepted by userfaultfd.

Constants

ICANON

ICANON

PIPE_BUF

PIPE_BUF

Functions

dup

dup(fd)

dup2

dup3(fd, new, flags)

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.

isatty

isatty(fd)

mmap

mmap(fd, len, prot, flags, fd, offset)

munmap

munmap(ptr, len)

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())

stderr

STDERR_FILENO

stdin

STDIN_FILENO

stdout

STDOUT_FILENO

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

struct termios

Winsize

struct winsize