fast3d/gbi/
macros.rs

1/// Define a GBI command macro.
2///
3/// This macro simplifies the creation of GBI command functions.
4/// It takes a name and a processing expression and generates a function with the specified name.
5///
6/// # Example
7///
8/// ```rust ignore
9/// gbi_command!(my_command, |params| {
10///     // processing logic here
11/// });
12/// ```
13macro_rules! gbi_command {
14    ($name:ident, $process:expr) => {
15        #[allow(non_snake_case)]
16        pub(crate) fn $name(params: &mut GBICommandParams) -> GBIResult {
17            let process_closure = $process;
18            process_closure(params)
19        }
20    };
21}
22
23pub(crate) use gbi_command;