#[mod_fn]Expand description
This macro is used to define a module function for the ABI. It takes an optional name argument to specify the exported function name.
ยงExamples
#[mod_fn(name = "my_function")]
fn my_function(arg1: String, arg2: i32) -> FnResult<String, String> {
Ok(format!("{} {}", arg1, arg2))
}This will generate a function wrapped in a compatible interface for usage with the module runtime.