Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guides modeling and reviewing Rust service domain boundaries with newtypes, smart constructors, private invariants, and validated DTOs.
86% 91%+5 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 19 of 22 without it.
We pass duration strings like '30s' or '5m' from environment variables in Rust. How should this be wrapped as a strong domain type rather than passed as raw strings?
The duration wrapper uses a private field and a fallible parsing constructor like `TryFrom` or `FromStr`.
3 of 3 safety checks passed
Use this skill to keep invalid states out of Rust service internals. Parse raw input once at the boundary, store validated values in narrow domain types, and make unchecked construction difficult.
serde deserialize incoming
shapes, then convert DTO fields into validated domain values.pub fields or impl From<String> for fallible conversions.TryFrom<String>, TryFrom<&str>, or FromStr for fallible parsing.AsRef<str> or a named accessor for read-only exposure.Display only when the formatted value is safe to show in logs,
errors, and UI.Debug for secret-bearing values unless the debug output is
redacted.Deserialize into a request shape, then construct a command:
Next to this one in the catalogue, plus more from the same author.