rs42

Macro error_struct

Source
macro_rules! error_struct {
    ($struct_name:ident $( { $( $field_name:ident : $field_type:ty ),* $(,)? } )?$(,)?) => { ... };
}
Expand description

Facilitates the creation of error structures with debug display

ยงExample

use rs42::error_struct;

error_struct!(ErrorStructName);

error_struct!(
    OtherErrorStructName {
        data: u32,
    },
);