Rust API References
Official API documentation for Rust standard library modules, types, functions, and traits.
Core Library (core)
Foundational functionality available to all Rust code, including types like i32
and Vec
.
Primitive Types
bool
boolean typei8
8-bit signed intString
Heap-allocated UTF-8 string
Macros
concat!
Compile-time string concatenationvec!
Create aVec
at compile timeformat!
Run-time formatting
Standard Library (std)
Full-featured library built on top of the core library, including std::io
and std::thread
Collections
Vec
Dynamic arrayHashMap
Hash map with ownership safetyString
UTF-8 string type
Concurrent Utilities
thread::spawn
Spawns a new threadsync::Mutex
Safe shared-state concurrencysync::mpsc
Multiple-producer single-consumer channels
Language Items
Special traits and definitions that are fundamental to the language.
Traits
Drop
Custom cleanupClone
Deep cloningDeref
Pointer dereferencing behavior
Operators
+
Addition operator implementation==
Equality comparison!
Logical negation
Common Usage Examples
Memory Safety
// Safe string manipulation
let s = String::from("Hello");
let len = s.len();
// Compile-time ownership checks
let s2 = s;
// s is now invalid - moves only
Concurrent Programming
use std::thread;
thread::spawn(|| {
println!("Hello from a thread!");
}).join();
Explore the Full API
Search for specific functions, types, or modules using the navigation below:
Error Handling
Concurrency
Built with the same tools used by the Rust team
GitHub Project