Error handling in Rust with thiserror and anyhow
Use thiserror to define clear error types for libraries, use anyhow to consolidate errors and add context for applications, and combine both.
Use thiserror to define clear error types for libraries, use anyhow to consolidate errors and add context for applications, and combine both.
How to share data between threads using Arc<Mutex<T>>, pass messages with mpsc channels, and avoid deadlock, poisoning, and other common mistakes.
Build a REST API CRUD with Axum 0.8, including routing, extractors, shared state, error handling with IntoResponse, and testing handlers without opening network ports.
When to use Box, Rc, or Arc in Rust: heap allocation, sharing ownership in a single thread and across multiple threads, along with Weak, RefCell, and Mutex.
A guide to asynchronous programming in Rust with Tokio, covering async/await, spawning tasks, join!, select!, timeout, channels, spawn_blocking, and testing async code.
Guide to using Cargo for creating Rust projects, adding dependencies correctly, writing tests, and grouping multiple crates in a workspace.
How to define enums with data, use match, if let, and let else to handle each case safely, plus common mistakes when working with enums in Rust.
Learn about closures, the three traits Fn/FnMut/FnOnce, how to use iterator adapters like map, filter, and collect, and how to write custom iterators in Rust.
Learn how to define and implement traits in Rust, use trait bounds, impl Trait, dyn Trait, and avoid common errors like the orphan rule.
Explaining borrowing, borrow checker, and lifetime annotation in Rust with easy-to-understand Order and Customer examples, plus common errors.
Learn about Option<T> and Result<T, E> in Rust: how to represent missing values, potential failures, and propagate errors using the ? operator instead of exceptions.
Learn about Rust's Ownership mechanism — how this language manages memory safely at compile-time without needing a garbage collector.