thiserror-expert
CommunityIdiomatic error types with thiserror.
AuthorEmilLindfors
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Provides guidance on creating custom error types with thiserror, including derive macros, error messages, and source error chaining.
Core Features & Use Cases
- Pattern 1: Basic Error Enum: Replace manual Display/Error implementations with #[derive(Error)].
- Pattern 2: Error Messages with Fields: Rich error messages using named or positional fields.
- Pattern 3: Wrapping Source Errors with #[from]: Automatic From implementations for seamless error propagation.
- Additional guidance on error context, chaining, and readability.
Quick Start
Define a simple error enum with #[derive(Error)] and use #[from] wrappers for io::Error.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: thiserror-expert Download link: https://github.com/EmilLindfors/claude-marketplace/archive/main.zip#thiserror-expert Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.