Skip to main content

Module error

Module error 

Source
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:

prefixcategory
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.
ErrorKind
Coarse category of an RNP failure, derived from the high nibble of the rnp_result_t plus a few exact-code overrides.

Functions§

from_rnp_code
Construct an Error::Rnp from a raw rnp_result_t code, looking up its kind and message. Use when integrating with hand-written FFI bindings that return raw u32 codes.
unknown_variant
Construct an Error::UnknownVariant. Public so other modules (e.g. strconv) can raise it without depending on snafu internals.

Type Aliases§

Result