Skip to main content

ff_function

Macro ff_function 

Source
macro_rules! ff_function {
    (
        $(
            $(#[$attr:meta])*
            $vis:vis $fn_name:ident (
                $args_name:ident : $args_type:ty
            ) -> $result_type:ty {
                keys( $ctx_name:ident : & $ctx_type:ty ) {
                    $( $key_expr:expr ),* $(,)?
                }
                argv {
                    $( $argv_expr:expr ),* $(,)?
                }
            }
        )*
    ) => { ... };
}
Expand description

Generate typed async FCALL wrappers from a declarative specification.

Each invocation defines one or more functions. The macro generates:

  • An async fn that takes conn, a key context, and typed args
  • Builds KEYS and ARGV vectors from the provided expressions
  • Calls FCALL <function_name> via the ferriskey client
  • Parses the result via the FromFcallResult trait