Rust gives you two main ways to write code that works with many different types. One is generics, which runs at full speed because the compiler knows the exact type ahead of time. The other is trait objects, which lets you handle types decided at runtime but costs a tiny bit of performance.
This guide helps you pick the right tool for each job. You will learn when to use static dispatch with generics and when to use dynamic dispatch with trait objects. It also shows how to fix common errors like E0277 and E0308.
A simple decision chart and quick reference table make it easy to choose. The goal is to write fast, flexible Rust code without unnecessary overhead.
Global
mkdir -p ~/.claude/skills/m04-zero-costProject
mkdir -p .claude/skills/m04-zero-costSource Repository
Typescript Advanced Typeswshobson/agents
Master advanced TypeScript types for safer and more flexible code
Python Executorqu-skills/skills
Execute Python code safely with 100+ libraries for data, scraping, and media
Golang Error Handlingsamber/cc-skills-golang
Learn to create, wrap, inspect, and log Go errors like a professional engineer
Golang Performancesamber/cc-skills-golang
Speed up your Go code using proven patterns for allocation reduction and CPU efficiency
Golang Design Patternssamber/cc-skills-golang
Idiomatic Go patterns for clean constructors error handling and graceful shutdown
Golang Concurrencysamber/cc-skills-golang
Write safe Go concurrency with goroutines, channels, and sync primitives
Golang Data Structuressamber/cc-skills-golang
Optimize Go data structures for speed and memory efficiency with internals knowledge
Golang Contextsamber/cc-skills-golang
Master Go context for cancellations, timeouts, and request values