Skip to main content

Module codes

Module codes 

Source
Expand description

Stable codes for every result that is not plainly ok: what went wrong, why it matters, how to fix it and where it is documented. A script branches on the code, a person reads the fix.

Every non-ok status has a default code, so no result leaves without one; a call site that knows the cause better names a specific code with the same status.

Structs§

Entry
One code of the catalog.

Enums§

Kind
How a code presents itself.

Constants§

CATALOG
Every code speccoder uses.
DOCS
Where the codes are documented.

Functions§

default_for
The code a non-ok status gets when nothing more specific is known.
fixes
entry’s fixes with {task}, {feature} and {command} filled where known; a fix whose placeholder is unknown keeps <task>-style blanks.
lookup
The catalog entry named name.
nearest
Up to n catalog names closest to name (case-insensitive edit distance).