rust-design-patterns
Installation
SKILL.md
Rust Design Patterns
Based on Rust Design Patterns book, Effective Rust, and community idioms.
When to Use This Skill
- Structuring a new Rust module or crate
- Choosing the right abstraction pattern
- Avoiding common anti-patterns (Deref polymorphism, clone-to-satisfy-borrow-checker)
- Making APIs ergonomic and hard to misuse
- Encoding invariants in the type system
Idioms
Use Borrowed Types for Arguments
Prefer &str over &String, &[T] over &Vec<T>, &T over &Box<T>: