Back to Tracks

Rust Standard Library

Explore the Rust Standard Library and learn how to use its powerful features.

String Basics

BEGINNER

Learn the difference between String and &str, and practice basic string operations in Rust.

String Manipulation

EASY

Master common string methods: trimming, case conversion, searching, replacing, and splitting.

String Parsing

EASY

Learn to parse strings into typed values using parse(), FromStr trait, and error handling.

String Building

MEDIUM

Build formatted strings efficiently using format!, write!, Display trait, and concatenation.

Unicode and Graphemes

MEDIUM

Understand UTF-8 encoding, count characters vs bytes, and safely slice Unicode strings.

String Iterators

EASY

Iterate over characters, words, and lines using Rust's string iterator methods.

String Patterns

MEDIUM

Search for substrings, check prefixes/suffixes, find pattern positions, and extract text between markers.

OsString and Platform Strings

MEDIUM

Handle platform-specific strings with OsString and OsStr for cross-platform file path operations.

HashSet Operations

EASY

Learn set operations with HashSet: unique elements, intersection, union, difference, and subset checks.

BTreeMap Basics

EASY

Learn ordered maps with BTreeMap: sorted iteration, range queries, and first/last element access.

VecDeque Usage

MEDIUM

Master double-ended queues with VecDeque: FIFO operations, peek, and rotation.

Collection Conversions

MEDIUM

Master iterator-based collection conversions: Vec to HashSet, HashMap from tuples, and more.

BTreeSet Ranges

MEDIUM

Master ordered sets with BTreeSet: range queries, finding closest elements, and efficient subset iteration.

Entry API Pattern

HARD

Master HashMap's Entry API for efficient map updates: or_insert, or_insert_with, and_modify patterns.

Binary Heap Operations

MEDIUM

Master priority queues with BinaryHeap: max-heap, min-heap, top-K elements, and heap sort.

LinkedList Basics

EASY

Learn LinkedList operations: add/remove from both ends, peek, move-to-front for LRU patterns, and list concatenation.

HashMap Advanced

MEDIUM

Optimize HashMap performance with capacity management, reserve, shrink, bulk operations, and efficient merging.

Reading Files

BEGINNER

Learn basic file reading patterns: read_to_string, BufReader, counting lines and words, and reading specific lines.

Writing Files

EASY

Master file writing patterns: write_all, BufWriter, appending to files, and efficient buffered writes.

Path Operations

EASY

Master cross-platform path handling with Path and PathBuf: joining, extracting components, and modifying extensions.

Directory Traversal

MEDIUM

Learn to traverse directory trees: list files, find by extension/name, calculate sizes, and count files recursively.

File Metadata

MEDIUM

Learn to work with file metadata: get file size, type, permissions, modification times, and compare files.

Stdio Operations

EASY

Master standard I/O operations: reading from stdin, writing to stdout/stderr, and buffer flushing.

Temporary Files

MEDIUM

Work with temporary files and directories: creation, cleanup patterns, and RAII-style automatic deletion.

Iterator Combinators

EASY

Master iterator combinators: chain, zip, take, skip, rev, and create interleaved and sliding pair sequences.

Iterator Inspection

MEDIUM

Learn iterator inspection methods: enumerate for indices, peekable for lookahead, and inspect for debugging.

Fold and Scan

MEDIUM

Master stateful iteration with fold() for aggregation and scan() for running computations like cumulative sums and averages.

Iterator Filtering

EASY

Master iterator filtering methods: filter, filter_map, take_while, skip_while for selective data processing.

Iterator Flattening

MEDIUM

Process nested collections with flatten() and flat_map() to work with hierarchical data structures.

Custom Iterators

HARD

Implement the Iterator trait to create custom iterators: Fibonacci, StepRange, Collatz, Windows, and Unfold patterns.

From and Into Traits

EASY

Master Rust's standard conversion traits From and Into for type-safe, ergonomic conversions between types.

TryFrom and TryInto

MEDIUM

Learn fallible conversions with TryFrom and TryInto traits for validated type transformations that can fail gracefully.

AsRef and AsMut

MEDIUM

Learn AsRef and AsMut traits for cheap reference-to-reference conversions, enabling generic functions that accept multiple types.

Borrow and ToOwned

MEDIUM

Master Borrow and ToOwned traits for owned vs borrowed patterns, and use Cow for efficient copy-on-write data handling.

ToString and Display

EASY

Learn the Display trait for user-facing output and how ToString is automatically implemented when you implement Display.

Deref and DerefMut

HARD

Master Deref and DerefMut traits for smart pointer patterns and deref coercion.

Duration Operations

EASY

Learn to work with std::time::Duration for time spans, formatting, arithmetic, and comparisons.

SystemTime Usage

MEDIUM

Work with std::time::SystemTime for timestamps, Unix epoch calculations, and time comparisons.

Environment Variables

EASY

Learn to read environment variables, parse configuration values, and access process information using std::env.

Process and Exit

MEDIUM

Work with process IDs, exit codes, and process lifecycle management using std::process.

Number Conversions

MEDIUM

Learn safe numeric type conversions using TryFrom/TryInto and overflow-safe arithmetic with checked, saturating, and wrapping operations.

Floating Point Edge Cases

MEDIUM

Handle floating-point special values (NaN, infinity), rounding, approximate comparisons, and safe arithmetic operations.

Integer Parsing

EASY

Parse integers from strings in various bases (decimal, binary, hex, octal) with error handling and automatic base detection.

Number Formatting

EASY

Format numbers for display with padding, alignment, different bases (binary, hex, octal), precision, and currency formatting.

Clone and Copy Traits

BEGINNER

Understand Clone and Copy traits for duplicating values: derive macros, Copy constraints, and generic clone patterns.

Debug and Display Derive

EASY

Master Debug and Display traits for formatting types: derive Debug automatically, implement Display manually for user-facing output.

PartialEq and Eq

EASY

Learn equality traits PartialEq and Eq: derive for standard comparison, implement manually for custom equality logic.

PartialOrd and Ord

MEDIUM

Master ordering traits PartialOrd and Ord: derive for standard ordering, implement custom comparison logic for sorting and min/max.

Hash Trait

MEDIUM

Master the Hash trait for using custom types as HashMap keys and HashSet elements: derive vs manual implementation, consistency with Eq.

Default Trait Patterns

EASY

Master the Default trait for creating default values: derive for standard defaults, implement custom defaults, struct update syntax patterns.

Box and Heap Allocation

EASY

Learn heap allocation with Box<T>: boxing values, recursive types, and modifying boxed data.

Rc and Reference Counting

MEDIUM

Learn shared ownership with Rc<T>: reference counting, Weak references, shared data structures, and observer patterns.

Arc and Thread Safety

MEDIUM

Learn thread-safe shared ownership with Arc<T>: atomic reference counting, Mutex for shared mutable state, and AtomicUsize for lock-free counters.

Cell and RefCell

HARD

Master interior mutability with Cell<T> and RefCell<T>: runtime borrow checking, shared mutable state, and the Rc<RefCell<T>> pattern.

Cow (Copy-on-Write)

MEDIUM

Master the Cow smart pointer for efficient borrowed vs owned data handling: avoid unnecessary clones with copy-on-write semantics.