Rust Errors

Design Rust error types and panic policy — Result over unwrap, thiserror for libraries, anyhow for binaries, context that survives the call stack. Use when code calls unwrap or expect outside tests, when designing or refactoring an error enum, when choosing between thiserror and anyhow, or when the user asks how errors should be handled or propagated.

rewrite-rs a17326d 3 files · 14.3 KB Updated

File contents

rewrite-rs/skills/tree/main/skills/rust/rust-errors commit a17326da94

Frequently asked questions

npx skillmds@latest add rewrite-rs/rust-errors