rust-types

Community

Master Rust types, generics, and trait design

Authorgregoryraymond
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Rust developers frequently face the trade-offs between static and dynamic dispatch, generic code readability, and safe API design. This skill helps you design polymorphic interfaces using generics, trait objects, and type-driven patterns (like Newtype, PhantomData, and type-state) to keep APIs safe, expressive, and efficient.

Core Features & Use Cases

  • Explains static vs dynamic dispatch with concrete examples and when to choose each approach.
  • Covers Newtype wrappers, PhantomData, type-state, marker/sealed traits, and builder patterns to encode invariants in the type system.
  • Guides API design for library boundaries and performance-critical paths, balancing ergonomics with compile-time guarantees.

Quick Start

Define a newtype wrapper around a primitive, implement a trait, and demonstrate a type-state lifecycle to enforce valid state transitions.

Dependency Matrix

Required Modules

None required

Components

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-types
Download link: https://github.com/gregoryraymond/claude-agents-and-skills/archive/main.zip#rust-types

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.