[][src]Crate uapi

Unix API crate

NOTE: The crate documentation is in the docs module.

Modules

c

Re-export of the libc crate with missing items added

docs

Module containing the crate documentation

Macros

format_ustr

Forwards its arguments to format! and wraps the result in a Ustring

map_err

fn(<integer type>) -> Result<integer type>

ustr

fn(<string literal>) -> &'static Ustr

Structs

AssertPacked

Transparent wrapper that asserts that a type is Packed

AssertPod

Transparent wrapper that asserts that a type is Pod

Bstr

Thin wrapper for a [u8]

Dir

Wrapper for *mut libc::DIR

Dirent

Wrapper for *const libc::dirent

Errno

c_int newtype which wraps ERRNO values

Fd

A borrowed file descriptor

InitializedIovec

A wrapper for a partially initialized iovec

InitializedIovecIter

An iterator over the initialized components of an iovec

Msghdr

Rusty version of an immutable c::msghdr

MsghdrMut

Rusty version of a mutable c::msghdr

OwnedFd

An owned file descriptor

Ustr

Thin wrapper for a [u8] that has a trailing nul byte

UstrPtr

Wrapper for a *const *const libc::c_char with a terminating null pointer

Ustring

Thin wrapper for a Vec<u8> that has a trailing nul byte

UtsName

Wrapper for libc::utsname

Constants

IOCPARM_MASK

IOCPARAM_SHIFT

IOCPARM_MAX

IOCPARM_MAX

IOCPARM_SHIFT

IOCPARAM_SHIFT

IOC_DIRMASK

IOC_DIRMASK

IOC_IN

IOC_IN

IOC_INOUT

IOC_INOUT

IOC_OUT

IOC_OUT

IOC_VOID

IOC_VOID

Traits

AsUstr

Used for cheap conversion from into &Ustr

Bytes

Trait for objects which can be turned into bytes

IntoUstr

Trait for objects which can be turned into Cow<'a, Ustr>

MaybeUninitIovec

A possibly uninitialized iovec

MaybeUninitIovecMut

A possibly uninitialized iovec (mutable)

MaybeUninitSliceExt

Extension for MaybeUninit

Packed

Marker trait for types without padding

Pod

Marker trait for Pod types

SockAddr

Marker trait for socket address types

UapiReadExt

Read extensions

Functions

IOCBASECMD

IOCBASECMD

IOCGROUP

IOCGROUP

IOCPARM_LEN

IOCPARM_LEN

WCOREDUMP

wait(2)

WEXITSTATUS

wait(2)

WIFCONTINUED

wait(2)

WIFEXITED

wait(2)

WIFSIGNALED

wait(2)

WIFSTOPPED

wait(2)

WSTOPSIG

wait(2)

WTERMSIG

wait(2)

_IO

_IO

_IOC

_IOC

_IOR

_IOR

_IOW

_IOW

_IOWINT

_IOWINT

_IOWR

_IOWR

accept

accept(2)

access

access(2)

as_bytes

Returns the object representation of t

as_bytes_mut

Returns the mutable object representation of t

as_maybe_uninit

Casts the argument to MaybeUninit of the same type

as_maybe_uninit_bytes

Returns the object representation of t

as_maybe_uninit_bytes_mut

Returns the mutable object representation of t

as_maybe_uninit_mut

Casts the argument to MaybeUninit of the same type

assert_packed

Asserts that T is Packed

assert_pod

Asserts that T is Pod

bind

bind(2)

chdir

chdir(2)

chmod

chmod(2)

chown

chown(2)

chroot

chroot(2)

clock_getres

clock_getres(2)

clock_gettime

clock_gettime(2)

clock_settime

clock_settime(2)

close

close(2)

cmsg_read

Reads a cmsg from a buffer

cmsg_space

Returns the number of bytes needed to store a cmsg with data-length data_len

cmsg_write

Writes a cmsg to a buffer

connect

connect(2)

daemon

daemon(3)

dirfd

dirfd(3)

dup

dup(2)

dup2

dup2(2)

empty_sig_set

Returns an empty sig set

errno_location

Gets a pointer to the current thread's errno

execv

execv(3)

execve

execve(2)

execvp

execvp(3)

faccessat

faccessat(2)

fchdir

fchdir(2)

fchmod

fchmod(2)

fchmodat

fchmodat(2)

fchown

fchown(2)

fchownat

fchownat(2)

fcntl_dupfd

fcntl(2) with cmd = F_DUPFD

fcntl_dupfd_cloexec

fcntl(2) with cmd = F_DUPFD_CLOEXEC

fcntl_getfd

fcntl(2) with cmd = F_GETFD

fcntl_getfl

fcntl(2) with cmd = F_GETFL

fcntl_getlk

fcntl(2) with cmd = F_GETLK

fcntl_setfd

fcntl(2) with cmd = F_SETFD

fcntl_setfl

fcntl(2) with cmd = F_SETFL

fcntl_setlk

fcntl(2) with cmd = F_SETLK

fcntl_setlkw

fcntl(2) with cmd = F_SETLKW

fdatasync

fdatasync(2)

fdopendir

fdopendir(3)

fexecve

fexecve(3)

flock

flock(2)

fork

fork(2)

fpathconf

fpathconf(3)

fstat

fstat(2)

fstatat

fstatat(2)

fstatvfs

fstatvfs(3)

fsync

fsync(2)

ftruncate

ftruncate(2)

futimens

futimens(2)

futimes

futimes(3)

get_errno

Gets the current thread's errno

getcwd

getcwd(3)

getegid

getegid(2)

geteuid

geteuid(2)

getgid

getgid(2)

getgroups

getgroups(2)

gethostname

gethostname(2)

getpeername

getpeername(2)

getpgrp

getpgrp(2)

getpid

getpid(2)

getppid

getppid(2)

getpriority

getpriority(2)

getsid

getsid(2)

getsockname

getsockname(2)

getsockopt

getsockopt(2)

getuid

getuid(2)

isatty

isatty(3)

kill

kill(2)

lchown

lchown(2)

link

link(2)

linkat

linkat(2)

listen

listen(2)

lseek

lseek(2)

lstat

lstat(2)

lutimes

lutimes(3)

mkdir

mkdir(2)

mkdirat

mkdirat(2)

mkfifo

mkfifo(3)

mkfifoat

mkfifoat(3)

mknod

mknod(2)

mknodat

mknodat(2)

msghdr_control_none_mut

Returns Option::<&mut [u8]>::None

msghdr_control_none_ref

Returns Option::<&[u8]>::None

nice

nice(2)

open

open(2)

openat

openat(2)

opendir

opendir(3)

pathconf

pathconf(3)

pause

pause(2)

pipe

pipe(2)

pod_iter

Converts u into an iterator of T

pod_read

Converts u to T

pod_read_init

Converts an initial port of u to T

pod_write

Writes u to t

pod_zeroed

Returns an instance of T whose object representation is 0 in all non-padding bytes

poll

poll(2)

posix_fadvise

posix_fadvise(2)

posix_fallocate

posix_fallocate(3)

pread

pread(2)

preadv

preadv(2)

pthread_sigmask

pthread_sigmask(3)

pwrite

pwrite(2)

pwritev

pwritev(2)

raise

raise(3)

read

read(2)

read_link_to_new_ustring

Shortcut for read_link_to_ustring with a new Ustring

read_link_to_ustring

Uses readlinkat(2) on (fd, path) and appends the result to buf

readdir

readdir(3)

readlink

readlink(2)

readlinkat

readlinkat(2)

readv

readv(2)

recv

recv(2)

recvfrom

recvfrom(2)

recvmsg

recvmsg(2)

rename

rename(2)

renameat

renameat(2)

rewinddir

rewinddir(3)

sched_yield

sched_yield(2)

seekdir

seekdir(3)

send

send(2)

sendmsg

sendmsg(2)

sendto

sendto(2)

set_errno

Sets the current thread's errno

setegid

setegid(2)

seteuid

seteuid(2)

setgid

setgid(2)

setgroups

setgroups(2)

sethostname

sethostname(2)

setpgid

setpgid(2)

setpriority

setpriority(2)

setresgid

setresgid(2)

setresuid

setresuid(2)

setsid

setsid(2)

setsockopt

setsockopt(2)

setuid

setuid(2)

shutdown

shutdown(2)

sigaddset

sigsetops(3)

sigdelset

sigsetops(3)

sigemptyset

sigsetops(3)

sigfillset

sigsetops(3)

sigismember

sigsetops(3)

sigtimedwait

sigtimedwait(2)

sigwait

sigwait(3)

sigwaitinfo

sigwaitinfo(2)

sockaddr_none_mut

Returns Option::<&mut c::sockaddr>::None

sockaddr_none_ref

Returns Option::<&c::sockaddr>::None

socket

socket(2)

socketpair

socketpair(2)

stat

stat(2)

statvfs

statvfs(3)

symlink

symlink(2)

symlinkat

symlinkat(2)

sync

sync(2)

sysconf

sysconf(3)

telldir

telldir(3)

truncate

truncate(2)

umask

umask(2)

uname

uname(2)

unlink

unlink(2)

unlinkat

unlinkat(2)

utimensat

utimensat(2)

wait

wait(2)

waitpid

waitpid(2)

write

write(2)

writev

writev(2)

Type Definitions

Result