rust-traits

Installation
SKILL.md

Trait Design and Dispatch

Do not default to dyn Trait. Pick the dispatch mechanism first, then design the trait to fit it.

The Rust default order:

  1. Closed set → model it as an enum.
  2. Open set, concrete type known at the call site → use generics / impl Trait.
  3. True type erasure (plugins, heterogeneous collections) → use dyn Trait.

This is the same ecosystem guidance as rust-idiomatic Rules 7–8, applied to trait design.

The Central Decision: How to Dispatch

Make the dispatch choice explicitly. Use this decision path:

Installs
1
First Seen
Jul 9, 2026
rust-traits — tomevault-io/skills-registry