Module

std

source

The standard library: I/O, files and directories, the environment, processes, threads, time and floats from text over the C library (the libc package, which it does not re-export), plus the core and alloc modules, each at one std:: path: std::cmp is core::cmp, std::num is core::num, std::buffer is alloc::buffer. Two are merged: std::fmt is alloc::fmt, which re-exports core::fmt's traits (Writer, Format, Printable) and writer types, and adds the Buffer! instances and writers; and std::process, std's own, re-exports core::process::trap.

Modules

envThe environment the process was started with.
floatFloating-point numbers from text.
fsThe file system by path: whole files read and written, what a path names, directories listed, made and removed, and files renamed.
ioInput and output through the standard streams and files.
processThe process: its arguments, the processors it can run on, its hash seed, other programs run and waited for, and the ways to end it early.
threadThreads: spawn runs a closure on a new OS thread, and Thread!::join waits for it and returns what it returned.
timeTime: Instant, a reading of a monotonic clock; Duration, a span of time; and sleep.
arrayFixed-length arrays over caller-provided storage.
asciiASCII character classes and case conversion.
atomicMemory orderings for the atomic operations on raw pointers (unsafe p.atomic_load(Ordering::Acquire), unsafe fence(...), ...), with the meanings C11 gives them.
borrowBorrowed views of values through the Borrow trait.
capBranded access capabilities: one exclusive writer or a tree of shared readers.
cmpOrdering and comparison traits.
cstrNUL-terminated strings for C interfaces.
cursorText cursors for incremental parsing.
hashHashing and equality traits, and the keyed hash behind them.
iterThe iterator protocol and iterator adapters.
memMemory ownership and access vocabulary built from brands and linear values.
numNumber limits, float classification and rounding, and float bits.
optionOptional values and fallible results.
parseParsing integers from byte views.
ptrRaw pointer operations.
rawRaw reads over flat buffers.
sliceChecked contiguous views over borrowed storage.
strText: read-only views of bytes.
utf8UTF-8 validation and decoding.
arenaBump allocation for Copy values that share one lifetime and access brand.
bufferGrowable byte buffers with explicit ownership and initialized length.
collectionsOwning and arena-backed collections.
fmtFormatting adapters for owning byte buffers.
heapRaw heap allocation and checked size arithmetic.
ownedHeap ownership and the records used to open and close memory regions.