Skip to main content

gen_magnus_error_methods_struct

Function gen_magnus_error_methods_struct 

Source
pub fn gen_magnus_error_methods_struct(
    error: &ErrorDef,
    core_import: &str,
) -> String
Expand description

Generate a Magnus-wrapped Rust struct that stores the whitelisted error introspection method return values and exposes them as Ruby instance methods.

Returns an empty string when error.methods is empty.