blob: 4e7dfc1852a1e7bc9410b631ac668c2e90a31857 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Rust friendly bindings to the various *nix system functions."><meta name="keywords" content="rust, rustlang, rust-lang, nix"><title>nix - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../normalize.css"><link rel="stylesheet" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../ayu.css" disabled><link rel="stylesheet" href="../dark.css" disabled><link rel="stylesheet" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="../crates.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../nix/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../nix/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Crate nix</a></h2><div class="sidebar-elems"><ul class="block"><li class="version">Version 0.26.2</li><li><a id="all-types" href="all.html">All Items</a></li></ul><section><ul class="block"><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#traits">Traits</a></li><li><a href="#types">Type Definitions</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Crate <a class="mod" href="#">nix</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/nix/lib.rs.html#1-333">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Rust friendly bindings to the various *nix system functions.</p>
<p>Modules are structured according to the C header file that they would be
defined in.</p>
<h2 id="features"><a href="#features">Features</a></h2>
<p>Nix uses the following Cargo features to enable optional functionality.
They may be enabled in any combination.</p>
<ul>
<li><code>acct</code> - Process accounting</li>
<li><code>aio</code> - POSIX AIO</li>
<li><code>dir</code> - Stuff relating to directory iteration</li>
<li><code>env</code> - Manipulate environment variables</li>
<li><code>event</code> - Event-driven APIs, like <code>kqueue</code> and <code>epoll</code></li>
<li><code>feature</code> - Query characteristics of the OS at runtime</li>
<li><code>fs</code> - File system functionality</li>
<li><code>hostname</code> - Get and set the system’s hostname</li>
<li><code>inotify</code> - Linux’s <code>inotify</code> file system notification API</li>
<li><code>ioctl</code> - The <code>ioctl</code> syscall, and wrappers for my specific instances</li>
<li><code>kmod</code> - Load and unload kernel modules</li>
<li><code>mman</code> - Stuff relating to memory management</li>
<li><code>mount</code> - Mount and unmount file systems</li>
<li><code>mqueue</code> - POSIX message queues</li>
<li><code>net</code> - Networking-related functionality</li>
<li><code>personality</code> - Set the process execution domain</li>
<li><code>poll</code> - APIs like <code>poll</code> and <code>select</code></li>
<li><code>process</code> - Stuff relating to running processes</li>
<li><code>pthread</code> - POSIX threads</li>
<li><code>ptrace</code> - Process tracing and debugging</li>
<li><code>quota</code> - File system quotas</li>
<li><code>reboot</code> - Reboot the system</li>
<li><code>resource</code> - Process resource limits</li>
<li><code>sched</code> - Manipulate process’s scheduling</li>
<li><code>socket</code> - Sockets, whether for networking or local use</li>
<li><code>signal</code> - Send and receive signals to processes</li>
<li><code>term</code> - Terminal control APIs</li>
<li><code>time</code> - Query the operating system’s clocks</li>
<li><code>ucontext</code> - User thread context</li>
<li><code>uio</code> - Vectored I/O</li>
<li><code>user</code> - Stuff relating to users and groups</li>
<li><code>zerocopy</code> - APIs like <code>sendfile</code> and <code>copy_file_range</code></li>
</ul>
</div></details><h2 id="reexports" class="small-section-header"><a href="#reexports">Re-exports</a></h2><div class="item-table"><div class="item-row"><div class="item-left import-item" id="reexport.libc"><code>pub use <a class="mod" href="../libc/index.html" title="mod libc">libc</a>;</code></div></div></div><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="errno/index.html" title="nix::errno mod">errno</a></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="fcntl/index.html" title="nix::fcntl mod">fcntl</a></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="sys/index.html" title="nix::sys mod">sys</a></div><div class="item-right docblock-short">Mostly platform-specific functionality</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="unistd/index.html" title="nix::unistd mod">unistd</a></div><div class="item-right docblock-short">Safe wrappers around functions found in libc “unistd.h” header</div></div></div><h2 id="traits" class="small-section-header"><a href="#traits">Traits</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.NixPath.html" title="nix::NixPath trait">NixPath</a></div><div class="item-right docblock-short">Common trait used to represent file system paths by many Nix functions.</div></div></div><h2 id="types" class="small-section-header"><a href="#types">Type Definitions</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="type" href="type.Error.html" title="nix::Error type">Error</a></div><div class="item-right docblock-short">Nix’s main error type.</div></div><div class="item-row"><div class="item-left module-item"><a class="type" href="type.Result.html" title="nix::Result type">Result</a></div><div class="item-right docblock-short">Nix Result Type</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="nix" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>