macro_rules! caf {
    (|$($arg:tt: $arg_ty:ty),*| $(-> $return_ty:ty)? { $body:expr }) => { ... };
}
Expand description

Re-export from const_anonymous_functions. A macro for creating const anonymous functions.

The syntax is closure syntax but with a couple of caveats. Namely:

  • All types must be explicitly annotated, including the return type.
  • The body must always be surrounded by braces.

See the module-level documentation for more info.