macro_rules! drop_code {
[
@raw $(#[ $meta:meta ]:)* $name_struct:ident ( $($($args_in:tt)+)? ) {
$($drop_code:tt)*
}
] => { ... };
[
$(#[ $meta:meta ]:)* $name_struct:ident ( $($args_in:tt)* ) {
$($drop_code:tt)*
}
] => { ... };
[
$(#[ $meta:meta ]:)* ( $($args_in:tt)* ) {
$($drop_code:tt)*
}
] => { ... };
[
$($drop_code:tt)*
] => { ... };
[ $($unk:tt)* ] => { ... };
}
Expand description
Macro for ensuring critical code execution on function return or panics in Rust, making it easy to include essential code for reliable operation.