Skip to main content
在 Manus 中运行任何 Skill
一键导入

enum-struct-pattern

星标19
分支0
更新时间2026年5月23日 08:47

How to define Rust enum command/event types using the tuple-variant + named-struct pattern with `impl_from_variant!`. Use this skill whenever defining new enums for commands, events, messages, or any dispatch-style enum where variants carry structured data. Also use when refactoring existing inline-field enum variants into this pattern.

安装

用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。

SKILL.md
readonly