Module lib

Source
Expand description

A facade around all the types we need from the std, core, and alloc crates. This avoids elaborate import wrangling having to happen in every module.

Modules§

cmp
Utilities for comparing and ordering values.
core 🔒
error
Interfaces for working with Errors.
f32
Constants for the f32 single-precision floating point type.
f64
Constants for the f64 double-precision floating point type.
fmt
Utilities for formatting and printing Strings.
iter
Composable external iteration.
mem
Basic functions for dealing with memory.
net
Networking primitives for TCP/UDP communication.
num
Additional functionality for numerics.
result
Error handling with the Result type.
str
Utilities for the str primitive type.

Structs§

Arc
A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.
ArcWeak
Weak is a version of Arc that holds a non-owning reference to the managed allocation.
AtomicBool
A boolean type which can be safely shared between threads.
AtomicI8
An integer type which can be safely shared between threads.
AtomicI16
An integer type which can be safely shared between threads.
AtomicI32
An integer type which can be safely shared between threads.
AtomicI64
An integer type which can be safely shared between threads.
AtomicIsize
An integer type which can be safely shared between threads.
AtomicU8
An integer type which can be safely shared between threads.
AtomicU16
An integer type which can be safely shared between threads.
AtomicU32
An integer type which can be safely shared between threads.
AtomicU64
An integer type which can be safely shared between threads.
AtomicUsize
An integer type which can be safely shared between threads.
BTreeMap
An ordered map based on a B-Tree.
BTreeSet
An ordered set based on a B-Tree.
BinaryHeap
A priority queue implemented with a binary heap.
Box
A pointer type that uniquely owns a heap allocation of type T.
CStr
Representation of a borrowed C string.
CString
A type representing an owned, C-compatible, nul-terminated string with no nul bytes in the middle.
Cell
A mutable memory location.
Duration
A Duration type to represent a span of time, typically used for system timeouts.
HashMap
A hash map implemented with quadratic probing and SIMD lookup.
HashSet
A hash set implemented as a HashMap where the value is ().
LinkedList
A doubly-linked list with owned nodes.
Mutex
A mutual exclusion primitive useful for protecting shared data
OsStr
Borrowed reference to an OS string (see OsString).
OsString
A type that can represent owned, mutable platform-native strings, but is cheaply inter-convertible with Rust strings.
Path
A slice of a path (akin to str).
PathBuf
An owned, mutable path (akin to String).
PhantomData
Zero-sized type used to mark things that “act like” they own a T.
Range
A (half-open) range bounded inclusively below and exclusively above (start..end).
RangeFrom
A range only bounded inclusively below (start..).
RangeInclusive
A range bounded inclusively below and above (start..=end).
RangeTo
A range only bounded exclusively above (..end).
Rc
A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference Counted’.
RcWeak
Weak is a version of Rc that holds a non-owning reference to the managed allocation.
RefCell
A mutable memory location with dynamically checked borrow rules
Reverse
A helper struct for reverse ordering.
RwLock
A reader-writer lock
Saturating
Provides intentionally-saturating arithmetic on T.
String
A UTF-8–encoded, growable string.
SystemTime
A measurement of the system clock, useful for talking to external entities like the file system or other processes.
Vec
A contiguous growable array type, written as Vec<T>, short for ‘vector’.
VecDeque
A double-ended queue implemented with a growable ring buffer.
Wrapping
Provides intentionally-wrapped arithmetic on T.

Enums§

Bound
An endpoint of a range of keys.
Cow
A clone-on-write smart pointer.
Ordering
Atomic memory orderings

Constants§

UNIX_EPOCH
An anchor in time which can be used to create new SystemTime instances or learn about where in time a SystemTime lies.

Traits§

BuildHasher
A trait for creating instances of Hasher.
Debug
? formatting.
Display
Format trait for an empty format, {}.
FmtWrite
A trait for writing or formatting into Unicode-accepting buffers or streams.
Hash
A hashable type.
ToOwned
A generalization of Clone to borrowed data.
ToString
A trait for converting a value to a String.
Write
A trait for objects which are byte-oriented sinks.

Derive Macros§

Debug
Derive macro generating an impl of the trait Debug.
Hash
Derive macro generating an impl of the trait Hash.