Skip to main content
Run any Skill in Manus
with one click

api-typestate

Stars17
Forks0
UpdatedJuly 3, 2026 at 07:45

Use the typestate pattern to encode state-machine invariants in Rust's type system instead of runtime checks. Apply when designing or reviewing any Rust type that tracks a lifecycle/mode (connection, transaction, builder, session, handshake, subscription) and currently guards operations with an enum field plus runtime `if`/`match` checks. Also use when reviewing PRs that add a new "invalid state" error variant to an existing struct.

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

SKILL.md
readonly