Expand description
Error type for the RNP binding.
Maps rnp_result_t (a u32) to a structured snafu error. Each non-success
code carries both its raw numeric form and a categorized ErrorKind,
letting callers react to categories of failure without re-parsing the
numeric code.
The category split mirrors the high-nibble grouping in
include/rnp/rnp_err.h:
| prefix | category |
|---|---|
0x00… | Success |
0x10… | Common |
0x11… | Storage |
0x12… | Crypto |
0x13… | Parsing |
0x14… | Sig-validation |
Enums§
- Error
- A failure returned by the underlying librnp call, or a wrapper-level precondition violation.
- Error
Kind - Coarse category of an RNP failure, derived from the high nibble of the
rnp_result_tplus a few exact-code overrides.
Functions§
- from_
rnp_ code - Construct an
Error::Rnpfrom a rawrnp_result_tcode, looking up its kind and message. Use when integrating with hand-written FFI bindings that return rawu32codes. - unknown_
variant - Construct an
Error::UnknownVariant. Public so other modules (e.g.strconv) can raise it without depending on snafu internals.