Expand description
Typed errors.
Callers must be able to distinguish “this format is not supported” from “this file is
corrupt” from “the disk is full”, because those three demand different actions from the
user and different exit codes from the CLI. That is why strypt-core uses thiserror
and never anyhow (ADR-0008): a boxed, stringly-typed error erases exactly the
distinction the front-ends need to make.
§These messages must never contain metadata values
An error string is durable — it lands in terminal scrollback, in a shell’s history file,
in a bug report pasted into a public issue tracker. A message that helpfully quoted the
GPS coordinate it failed to parse would be a durable copy of the secret the user was
trying to destroy (docs/THREAT_MODEL.md §5.5). Errors here name fields, offsets, and
counts. They never name values.
Enums§
- IoAction
- What an I/O operation was attempting when it failed.
- Malformed
Detail - Which structural rule a malformed file broke.
- Resource
Limit - Which parser ceiling a file hit.
- Strypt
Error - Everything that can go wrong in
strypt-core. - Unsupported
Kind - A format strypt can identify but cannot yet process.
Type Aliases§
- Result
- The result type used throughout
strypt-core.