Skip to main content

gen_ffi_error_codes

Function gen_ffi_error_codes 

Source
pub fn gen_ffi_error_codes(error: &ErrorDef) -> String
Expand description

Generate a C enum of error codes plus an error-message function declaration.

Produces a typedef enum with PREFIX_ERROR_NONE = 0 followed by one entry per variant, plus a function that returns the default message for a given code.