rust-traits-generics
CommunityCanonical Rust traits and generics reference.
Software Engineering#rust#generics#traits#associated-types#static-dispatch#trait-objects#object-safety
Authoradelabdelgawad
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Rust programs often struggle with designing clean, reusable abstractions. This section helps you understand how to apply traits, generics, associated types, and dispatch strategies to write flexible, maintainable Rust code without sacrificing performance.
Core Features & Use Cases
- Canonical guidance on when to use trait objects (
dyn Trait) versus static dispatch with generics andimpl Trait. - Best practices for default methods, associated types, and the orphan/coherence rules to keep APIs ergonomic and safe.
- Use Case: library authors designing ergonomic APIs that adapt to multiple concrete types while preserving zero-cost abstraction.
Quick Start
Apply these guidelines to design Rust traits and generics in your codebase.
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: rust-traits-generics Download link: https://github.com/adelabdelgawad/rust-fullstack-agents/archive/main.zip#rust-traits-generics 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 510,000+ vetted skills library on demand.