LogoClawIndex
CasesSkillsAbout
LogoClawIndex

m04-zero-cost - Zero-cost abstraction in Rust generics and traits

Choose between compile-time and runtime polymorphism using generics and trait objects

Tags

Updated: 2026-03-10

Capabilities

Typical Inputs

Typical Outputs

What this skill does

  • analyze error codes
  • choose polymorphism type
  • determine dispatch method
  • design trait abstraction
  • compare performance trade-offs
  • apply static dispatch
  • apply dynamic dispatch
  • check object safety
  • resolve type errors
  • select code pattern

Inputs

  • compile-time type information
  • runtime type information
  • performance priority
  • error code (E0277, E0308, E0599)
  • type requirements

Outputs

  • static dispatch implementation
  • dynamic dispatch implementation
  • trait abstraction design
  • code pattern recommendation
  • error resolution
  • polymorphism strategy

Requirements

  • Rust compiler
  • type error diagnosis

Source

  • Spec: SKILL.md

ClawIndex

OpenClaw Skills & Use Case Index

ClawIndex is an ecosystem-driven index of OpenClaw skills and real-world use cases.

Index

Skills·
Cases

Meta

About·
Disclaimer·
Email·
GitHub
© 2026 ClawIndex All Rights Reserved.
rust
generics
traits
zero-cost abstraction
static dispatch
dynamic dispatch
polymorphism
type system
analyze error codes
choose polymorphism type
determine dispatch method
design trait abstraction
compile-time type information
runtime type information
performance priority
static dispatch implementation
dynamic dispatch implementation
trait abstraction design