Errors serve callers and operators
A typed enum lets callers handle expected categories without parsing human text. `Display` remains an operator-facing description, while `std::error::Error` enables generic boundaries and optional source chaining.
rust / LEVEL 3
THEORY / RETRIEVAL
A typed enum lets callers handle expected categories without parsing human text. `Display` remains an operator-facing description, while `std::error::Error` enables generic boundaries and optional source chaining.
Converting every failure to `String` or `Box<dyn Error>` at a low layer removes exhaustiveness and stable branching. Erasure is useful at application boundaries, after domain code has preserved the distinctions it owns.
CHECKPOINT
02 / IMPLEMENTATION
Implement the typed port parser and its stable Display messages. Empty input, invalid decimal syntax, and values outside 1..=65535 must stay distinct.
Runner is waiting for a submission.